Changeset 364 for trunk/TestCase
- Timestamp:
- Oct 24, 2007, 12:32:20 AM (17 years ago)
- Location:
- trunk/TestCase/SimpleTestCase
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TestCase/SimpleTestCase/SPrintFTest.ab
r358 r364 15 15 s = FloatToChars(1., e, sign) 16 16 UnitTest("FloatToChars(1)", s = "10000000000000000" And e = 0 And sign = False) 17 18 17 s = FloatToChars(-93.75e-3, e, sign) 19 18 UnitTest("FloatToChars(-93.75e-3)", s = "93750000000000000" And e = 1 - 3 And sign = True) 20 21 19 s = FloatToChars(.0, e, sign) 22 20 UnitTest("FloatToChars(0)", s = "00000000000000000" And e = 0 And sign = False) … … 24 22 s = FormatFloatE(9.876543e021, 6, 0, None) 25 23 UnitTest("FormatFloatE(9876543e+21)", s = "9.876543e+21") 26 27 24 s = FormatFloatE(7.81250000E-03, 8, 0, Cap) 28 25 UnitTest("FormatFloatE(7.81250000E-03)", s = "7.81250000E-03") … … 49 46 s = FormatFloatE(1.2345e+67, 4, 0, Cap) 50 47 UnitTest("FormatFloatE(1.2345E+67, Cap)", s = "1.2345E+67") 51 52 48 s = FormatFloatE(1.2345e67, 3, 0, None) 53 49 UnitTest("FormatFloatE(1.2345e+67, precision = 3)", s = "1.234e+67") … … 56 52 s = FormatIntegerU(777, 0, 0, None) 57 53 UnitTest("FormatIntegerU(777)", s = "777") 58 59 54 s = FormatIntegerU(513, 0, 5, None) 60 55 UnitTest("FormatIntegerU(513, field width = 5)", s = " 513") … … 62 57 s = FormatIntegerD(-3, 2, 0, Sign) 63 58 UnitTest("FormatIntegerD(-3, precision = 2)", s = "-03") 64 65 59 s = FormatIntegerD(3, 0, 5, Sign) 66 60 UnitTest("FormatIntegerD(+3, field width = 5)", s = " +3") … … 68 62 s = FormatIntegerO(&o1234567, DWORD_MAX, 0, None) 69 63 UnitTest("FormatIntegerO(&o1234567)", s = "1234567") 70 71 64 s = FormatIntegerO(&o1234567, DWORD_MAX, 0, Alt) 72 65 UnitTest("FormatIntegerO(&o1234567, Alt)", s = "01234567") 73 74 66 s = FormatIntegerO(0, DWORD_MAX, 0, Alt) 75 67 UnitTest("FormatIntegerO(0, Alt)", s = "0") … … 77 69 s = FormatIntegerX(&hffff, DWORD_MAX, 0, None) 78 70 UnitTest("FormatIntegerX(&hffff)", s = "ffff") 79 80 71 s = FormatIntegerX(&hffff, DWORD_MAX, 0, Cap) 81 72 UnitTest("FormatIntegerX(&hffff, Cap)", s = "FFFF") 82 83 73 s = FormatIntegerX(&h12345678, DWORD_MAX, 0, Alt) 84 74 UnitTest("FormatIntegerX(&h12345678, Alt)", s = "0x12345678") 85 86 75 s = FormatIntegerX(1, 2, 0, Alt Or Cap) 87 76 UnitTest("FormatIntegerX(1, precision = 2, Alt, Cap)", s = "0X01") 88 89 77 s = FormatIntegerX(0, 4, 0, Alt) 90 78 UnitTest("FormatIntegerX(0, precision = 4, Alt)", s = "0000") 79 80 s = FormatFloatF(1, 2, 0, None) 81 UnitTest("FormatFloatF(1.00, precision = 2)", s = "1.00") 82 s = FormatFloatF(123.456, 3, 0, None) 83 UnitTest("FormatFloatF(123.456, precision = 3)", s = "123.456") 84 s = FormatFloatF(2., 0, 0, Alt) 85 UnitTest("FormatFloatF(2., precision = 0, Alt", s = "2.") 86 s = FormatFloatF(-1.234e-1, 3, 0, None) 87 UnitTest("FormatFloatF(-1.234e-1, precision = 3) = -0.123", s = "-0.123") 88 s = FormatFloatF(-1.234e-2, 3, 0, None) 89 UnitTest("FormatFloatF(-1.234e-2, precision = 3) = -0.012", s = "-0.012") 90 s = FormatFloatF(-1.234e-3, 3, 0, None) 91 UnitTest("FormatFloatF(-1.234e-3, precision = 3) = -0.001", s = "-0.001") 92 s = FormatFloatF(-1.234e-4, 3, 0, None) 93 UnitTest("FormatFloatF(-1.234e-4, precision = 3) = -0.000", s = "-0.000") 94 '現状では末尾の桁の誤差を制御しきれないので、文字列全体の一致比較を避けている。 95 s = FormatFloatF(12345678901234567e3, 2, 0, None) 96 UnitTest("FormatFloatF(1.00, precision = 2)", Right$(s, 6) = "000.00") 91 97 92 98 ' s = FormatIntegerLU(8589934590, DWORD_MAX, 0, None) -
trunk/TestCase/SimpleTestCase/SimpleTestCase.idx
r358 r364 28 28 #include "InterfaceTest.ab" 29 29 _ClearNamespaceImported 30 31 'リソースファイル 32 #include "resource.ab" 33 #resource "SimpleTestCase.rc" -
trunk/TestCase/SimpleTestCase/SimpleTestCase.pj
r358 r364 23 23 #DEBUG_EXE_PATH= 24 24 25 #RESOURCE= 025 #RESOURCE=SimpleTestCase.rc 26 26 27 27 #SOURCE
Note:
See TracChangeset
for help on using the changeset viewer.