diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-19 19:58:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-19 19:58:19 +0000 |
commit | 9472a9d6502f943548981955ff36ae6b3c05638b (patch) | |
tree | 8eeaa8fd3bd6d9d78a478033b029eb978d17646a /unittests | |
parent | 04087d069a17265b964b30e8210262bbdbc4fbec (diff) | |
download | external_llvm-9472a9d6502f943548981955ff36ae6b3c05638b.zip external_llvm-9472a9d6502f943548981955ff36ae6b3c05638b.tar.gz external_llvm-9472a9d6502f943548981955ff36ae6b3c05638b.tar.bz2 |
Add min and max tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Support/raw_ostream_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Support/raw_ostream_test.cpp b/unittests/Support/raw_ostream_test.cpp index feb0152..3e22a05 100644 --- a/unittests/Support/raw_ostream_test.cpp +++ b/unittests/Support/raw_ostream_test.cpp @@ -53,6 +53,10 @@ TEST(raw_ostreamTest, Types_Buffered) { EXPECT_EQ("0x0", printToString((void*) 0)); EXPECT_EQ("0xbeef", printToString((void*) 0xbeef)); EXPECT_EQ("0xdeadbeef", printToString((void*) 0xdeadbeef)); + + // Min and max. + EXPECT_EQ("18446744073709551615", printToString(UINT64_MAX)); + EXPECT_EQ("-9223372036854775808", printToString(INT64_MIN)); } TEST(raw_ostreamTest, Types_Unbuffered) { @@ -80,6 +84,10 @@ TEST(raw_ostreamTest, Types_Unbuffered) { EXPECT_EQ("0x0", printToStringUnbuffered((void*) 0)); EXPECT_EQ("0xbeef", printToStringUnbuffered((void*) 0xbeef)); EXPECT_EQ("0xdeadbeef", printToStringUnbuffered((void*) 0xdeadbeef)); + + // Min and max. + EXPECT_EQ("18446744073709551615", printToStringUnbuffered(UINT64_MAX)); + EXPECT_EQ("-9223372036854775808", printToStringUnbuffered(INT64_MIN)); } } |