mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/140472 Approved by: https://github.com/ezyang
14 lines
356 B
C++
14 lines
356 B
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#include <c10/util/error.h>
|
|
#include <gtest/gtest.h>
|
|
#include <cstring>
|
|
|
|
using namespace ::testing;
|
|
|
|
TEST(StrErrorTest, cmp_test) {
|
|
for (int err = 0; err <= EACCES; err++) {
|
|
// NOLINTNEXTLINE(concurrency-mt-unsafe)
|
|
ASSERT_EQ(c10::utils::str_error(err), std::string(strerror(err)));
|
|
}
|
|
}
|