1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 #include "base/bit_cast.h"
8 #include "testing/gtest/include/gtest/gtest.h"
13 TEST(BitCastTest, FloatIntFloat) {
15 int i = bit_cast<int32_t>(f);
16 float f2 = bit_cast<float>(i);
24 TEST(BitCastTest, StructureInt) {
26 int b = bit_cast<int>(a);