Changes in directory llvm-test/SingleSource/UnitTests/Integer:
constval.cpp updated: 1.1 -> 1.2
constval.reference_output updated: 1.1 -> 1.2
---
Log message:
Augment this test case to check conversions of radix 2, 8 and 16 values
as well as just radix 10.
---
Diffs of the changes: (+22 -4)
constval.cpp | 19 +--
constval.reference_output |7 +--
2 files changed, 22 insertions(+), 4 deletions(-)
Index: llvm-test/SingleSource/UnitTests/Integer/constval.cpp
diff -u llvm-test/SingleSource/UnitTests/Integer/constval.cpp:1.1
llvm-test/SingleSource/UnitTests/Integer/constval.cpp:1.2
--- llvm-test/SingleSource/UnitTests/Integer/constval.cpp:1.1 Tue Apr 17
19:53:49 2007
+++ llvm-test/SingleSource/UnitTests/Integer/constval.cpp Wed May 16
14:34:37 2007
@@ -15,9 +15,24 @@
void my_test()
{
uint21 x = bitsFromString("123456", 21);
+ printf( "x = %d = ", int(x));
+ printBits(x);
+
uint16 y = bitsFromString("123456", 16);
- printf( "x = %d\n", int(x));
- printf( "y = %d\n", int(y));
+ printf( "\ny = %d = ", int(y));
+ printBits(y);
+
+ int256 z =
bitsFromHexString("0fff",
256);
+ printf( "\nz = " );
+ printBits(z);
+
+ int69 a = bitsFromOctalString("01234567012345670123456", 69);
+ printf( "\na = " );
+ printBits(a);
+ int68 b =
bitsFromBinaryString("10101010101010101010101010101010101010101010101010101010101010101010",
68);
+ printf( "\nb = " );
+ printBits(b);
+ printf("\n");
}
int main(int argc, char** argv)
Index: llvm-test/SingleSource/UnitTests/Integer/constval.reference_output
diff -u llvm-test/SingleSource/UnitTests/Integer/constval.reference_output:1.1
llvm-test/SingleSource/UnitTests/Integer/constval.reference_output:1.2
--- llvm-test/SingleSource/UnitTests/Integer/constval.reference_output:1.1
Tue Apr 17 19:53:49 2007
+++ llvm-test/SingleSource/UnitTests/Integer/constval.reference_output Wed May
16 14:34:37 2007
@@ -1,3 +1,6 @@
-x = 123456
-y = 57920
+x = 123456 = 000100100
+y = 57920 = 111000100100
+z =
+a = 010100111001011101110101001110010111011101010011100101110
+b = 10101010101010101010101010101010101010101010101010101010101010101010
exit 0
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits