From 6c35af2ca331935bb663c4f1dadbc1d108999df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Tue, 14 Apr 1998 15:09:49 -0700 Subject: [PATCH] fixed some tests Rev: src/testsuite.in:1.91 --- src/testsuite.in | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/testsuite.in b/src/testsuite.in index 671d391af3..98e2f42d34 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -test_true([["$Id: testsuite.in,v 1.90 1998/04/14 15:08:53 hedda Exp $"]]) +test_true([["$Id: testsuite.in,v 1.91 1998/04/14 22:09:49 hubbe Exp $"]]) test_eq(1e1,10.0) test_eq(1E1,10.0) test_eq(1e+1,10.0) @@ -189,9 +189,7 @@ test_program(inherit test; int a() { return foo; } ) test_define_program(test,[[class TEST { int a() { return 1; } }]]) test_program(inherit test; inherit TEST; ) -dnl This test cannot be performed without a way to tell the -dnl compiler that foo *is* an Stdio.File, not inherits an Stdio.File -dnl test_compile_error(class c { object(Stdio.File) foo; object(Regexp) bar=foo; }) +test_compile_error(class c { object(Stdio.File) foo=class {} ();}) test_do(class c { object foo; object(Regexp) bar=foo; }) test_do(class c { object(Stdio.File) foo; object bar=foo; }) test_any(if(int i=1) return i; return 0;,1) @@ -561,10 +559,28 @@ test_any(function bar=clone(test)->foo; return bar(),17) // sscanf test_any([[mixed a; return sscanf("11","%d",a)]],1) + test_any([[mixed a; sscanf("11","%d",a); return a]],11) test_any([[mixed a; sscanf("11","%o",a); return a]],011) test_any([[mixed a; sscanf("11","%x",a); return a]],0x11) test_any([[mixed a; sscanf("11","%D",a); return a]],11) + + +test_any([[mixed a; sscanf("11","%2d",a); return a]],11) +test_any([[mixed a; sscanf("11","%2o",a); return a]],011) +test_any([[mixed a; sscanf("11","%2x",a); return a]],0x11) +test_any([[mixed a; sscanf("11","%2D",a); return a]],11) + +test_any([[mixed a; sscanf("11","%4711d",a); return a]],11) +test_any([[mixed a; sscanf("11","%4711o",a); return a]],011) +test_any([[mixed a; sscanf("11","%4711x",a); return a]],0x11) +test_any([[mixed a; sscanf("11","%4711D",a); return a]],11) + +test_any([[mixed a; sscanf("11","%1d",a); return a]],1) +test_any([[mixed a; sscanf("11","%1o",a); return a]],1) +test_any([[mixed a; sscanf("11","%1x",a); return a]],1) +test_any([[mixed a; sscanf("11","%1D",a); return a]],1) + test_any([[mixed a; sscanf("0x11","%D",a); return a]],0x11) test_any([[mixed a; sscanf("011","%D",a); return a]],011) test_any([[mixed a,b; return sscanf("11foo","%dfoo",a)]],1) -- GitLab