summaryrefslogtreecommitdiffstats
path: root/tests/format.test
diff options
context:
space:
mode:
authorstanton <stanton>1998-11-02 23:04:13 (GMT)
committerstanton <stanton>1998-11-02 23:04:13 (GMT)
commit099b6e9e41a346098526d7088680732358fa2e72 (patch)
treef83adf3b279fbc76856cab9fd4e55a88127e5a8c /tests/format.test
parentf8c896766a7b11645db9f8c553ccb6fff4529996 (diff)
downloadtcl-099b6e9e41a346098526d7088680732358fa2e72.zip
tcl-099b6e9e41a346098526d7088680732358fa2e72.tar.gz
tcl-099b6e9e41a346098526d7088680732358fa2e72.tar.bz2
cleaned up test suite so most of the tests pass on Windows
Diffstat (limited to 'tests/format.test')
-rw-r--r--tests/format.test40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/format.test b/tests/format.test
index 2cb4436..e3d8be0 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: format.test,v 1.2 1998/09/14 18:40:09 stanton Exp $
+# RCS: @(#) $Id: format.test,v 1.3 1998/11/02 23:04:13 stanton Exp $
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -79,20 +79,20 @@ test format-2.4 {string formatting} {
format "%s %s %% %c %s" abcd {This is a very long test string.} 120 x
} {abcd This is a very long test string. % x x}
-test format-3.1 {e and f formats} {
+test format-3.1 {e and f formats} {eformat} {
format "%e %e %e %e" 34.2e12 68.514 -.125 -16000. .000053
} {3.420000e+13 6.851400e+01 -1.250000e-01 -1.600000e+04}
-test format-3.2 {e and f formats} {
+test format-3.2 {e and f formats} {eformat} {
format "%20e %20e %20e %20e" 34.2e12 68.514 -.125 -16000. .000053
} { 3.420000e+13 6.851400e+01 -1.250000e-01 -1.600000e+04}
if {!$roundOffBug} {
- test format-3.3 {e and f formats} {
+ test format-3.3 {e and f formats} {eformat} {
format "%.1e %.1e %.1e %.1e" 34.2e12 68.514 -.126 -16000. .000053
} {3.4e+13 6.9e+01 -1.3e-01 -1.6e+04}
- test format-3.4 {e and f formats} {
+ test format-3.4 {e and f formats} {eformat} {
format "%020e %020e %020e %020e" 34.2e12 68.514 -.126 -16000. .000053
} {000000003.420000e+13 000000006.851400e+01 -00000001.260000e-01 -00000001.600000e+04}
- test format-3.5 {e and f formats} {
+ test format-3.5 {e and f formats} {eformat} {
format "%7.1e %7.1e %7.1e %7.1e" 34.2e12 68.514 -.126 -16000. .000053
} {3.4e+13 6.9e+01 -1.3e-01 -1.6e+04}
test format-3.6 {e and f formats} {
@@ -102,7 +102,7 @@ if {!$roundOffBug} {
test format-3.7 {e and f formats} {nonPortable} {
format "%.4f %.4f %.4f %.4f %.4f" 34.2e12 68.514 -.125 -16000. .000053
} {34200000000000.0000 68.5140 -0.1250 -16000.0000 0.0001}
-test format-3.8 {e and f formats} {
+test format-3.8 {e and f formats} {eformat} {
format "%.4e %.5e %.6e" -9.99996 -9.99996 9.99996
} {-1.0000e+01 -9.99996e+00 9.999960e+00}
test format-3.9 {e and f formats} {
@@ -114,7 +114,7 @@ test format-3.10 {e and f formats} {
test format-3.11 {e and f formats} {
format "%-020f %020f" -9.99996 -9.99996 9.99996
} {-9.999960 -000000000009.999960}
-test format-3.12 {e and f formats} {
+test format-3.12 {e and f formats} {eformat} {
format "%.0e %#.0e" -9.99996 -9.99996 9.99996
} {-1e+01 -1.e+01}
test format-3.13 {e and f formats} {
@@ -130,10 +130,10 @@ test format-3.16 {e and f formats} {
format "%3.1f %3.1f %3.1f %3.1f" 0.0 0.1 0.01 0.001
} {0.0 0.1 0.0 0.0}
-test format-4.1 {g-format} {
+test format-4.1 {g-format} {eformat} {
format "%.3g" 12341.0
} {1.23e+04}
-test format-4.2 {g-format} {
+test format-4.2 {g-format} {eformat} {
format "%.3G" 1234.12345
} {1.23E+03}
test format-4.3 {g-format} {
@@ -160,10 +160,10 @@ test format-4.9 {g-format} {
test format-4.10 {g-format} {
format "%.3g" .00012341
} {0.000123}
-test format-4.11 {g-format} {
+test format-4.11 {g-format} {eformat} {
format "%.3g" .00001234
} {1.23e-05}
-test format-4.12 {g-format} {
+test format-4.12 {g-format} {eformat} {
format "%.4g" 9999.6
} {1e+04}
test format-4.13 {g-format} {
@@ -181,29 +181,29 @@ test format-4.16 {g-format} {
test format-4.17 {g-format} {
format "%.3g" .001
} {0.001}
-test format-4.18 {g-format} {
+test format-4.18 {g-format} {eformat} {
format "%.3g" .00001
} {1e-05}
-test format-4.19 {g-format} {
+test format-4.19 {g-format} {eformat} {
format "%#.3g" 1234.0
} {1.23e+03}
-test format-4.20 {g-format} {
+test format-4.20 {g-format} {eformat} {
format "%#.3G" 9999.5
} {1.00E+04}
-test format-5.1 {floating-point zeroes} {
+test format-5.1 {floating-point zeroes} {eformat} {
format "%e %f %g" 0.0 0.0 0.0 0.0
} {0.000000e+00 0.000000 0}
-test format-5.2 {floating-point zeroes} {
+test format-5.2 {floating-point zeroes} {eformat} {
format "%.4e %.4f %.4g" 0.0 0.0 0.0 0.0
} {0.0000e+00 0.0000 0}
-test format-5.3 {floating-point zeroes} {
+test format-5.3 {floating-point zeroes} {eformat} {
format "%#.4e %#.4f %#.4g" 0.0 0.0 0.0 0.0
} {0.0000e+00 0.0000 0.000}
-test format-5.4 {floating-point zeroes} {
+test format-5.4 {floating-point zeroes} {eformat} {
format "%.0e %.0f %.0g" 0.0 0.0 0.0 0.0
} {0e+00 0 0}
-test format-5.5 {floating-point zeroes} {
+test format-5.5 {floating-point zeroes} {eformat} {
format "%#.0e %#.0f %#.0g" 0.0 0.0 0.0 0.0
} {0.e+00 0. 0.}
test format-5.6 {floating-point zeroes} {