Mercurial > hg > CbC > CbC_llvm
comparison unittests/Support/ScaledNumberTest.cpp @ 148:63bd29f05246
merged
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Aug 2019 19:46:37 +0900 |
parents | c2174574ed3a |
children |
comparison
equal
deleted
inserted
replaced
146:3fc4d5c3e21e | 148:63bd29f05246 |
---|---|
1 //===- llvm/unittest/Support/ScaledNumberTest.cpp - ScaledPair tests -----==// | 1 //===- llvm/unittest/Support/ScaledNumberTest.cpp - ScaledPair tests -----==// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 // | 4 // See https://llvm.org/LICENSE.txt for license information. |
5 // This file is distributed under the University of Illinois Open Source | 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 // License. See LICENSE.TXT for details. | |
7 // | 6 // |
8 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
9 | 8 |
10 #include "llvm/Support/ScaledNumber.h" | 9 #include "llvm/Support/ScaledNumber.h" |
11 #include "llvm/Support/DataTypes.h" | 10 #include "llvm/Support/DataTypes.h" |
561 TEST(ScaledNumberHelpersTest, toIntBug) { | 560 TEST(ScaledNumberHelpersTest, toIntBug) { |
562 ScaledNumber<uint32_t> n(1, 0); | 561 ScaledNumber<uint32_t> n(1, 0); |
563 EXPECT_EQ(1u, (n * n).toInt<uint32_t>()); | 562 EXPECT_EQ(1u, (n * n).toInt<uint32_t>()); |
564 } | 563 } |
565 | 564 |
565 static_assert(is_trivially_copyable<ScaledNumber<uint32_t>>::value, | |
566 "trivially copyable"); | |
567 | |
566 } // end namespace | 568 } // end namespace |