pytorch/c10/test/util/bit_cast_test.cpp
Fernando Gasperi d290511ecd [gtest-static-listing] Enable for cc_test (#107186)
Reviewed By: Nekitosss

Differential Revision: D48323659

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107186
Approved by: https://github.com/jeanschmidt
2023-08-15 22:31:32 +00:00

17 lines
256 B
C++

#include <c10/util/bit_cast.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <cstdint>
namespace c10 {
namespace {
TEST(bitCastTest, basic) {
ASSERT_THAT(bit_cast<std::int8_t>('a'), testing::Eq(97));
}
} // namespace
} // namespace c10