[Nice-commit] Nice/testsuite/compiler globalVariables.testsuite,1.7,1.8
Brought to you by:
bonniot
|
From: <ar...@us...> - 2003-04-30 20:07:48
|
Update of /cvsroot/nice/Nice/testsuite/compiler
In directory sc8-pr-cvs1:/tmp/cvs-serv10830/F:/nice/testsuite/compiler
Modified Files:
globalVariables.testsuite
Log Message:
Implemented global constants: "let" type() name() "=" sideEffectFreeExpression() ";"
For some unknown reason doesn't compile gnu.expr it to final fields.
Index: globalVariables.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/globalVariables.testsuite,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** globalVariables.testsuite 19 Feb 2003 14:16:11 -0000 1.7
--- globalVariables.testsuite 30 Apr 2003 19:39:07 -0000 1.8
***************
*** 75,76 ****
--- 75,106 ----
var int f = 0;
var String v = f;
+
+
+ /// PASS
+ assert(x==0);
+ /// TOPLEVEL
+ let int x = 0;
+
+ /// FAIL
+ s = "";
+ /// TOPLEVEL
+ let String s = "abc";
+
+ /// PASS
+ String t = s;
+ /// TOPLEVEL
+ let String s = "abc";
+
+ /// PASS
+ /// package a
+ /// TOPLEVEL
+ let int x = 1;
+ /// package b import a
+ assert(x == 1);
+
+ /// FAIL
+ /// package a
+ /// TOPLEVEL
+ let int x = 0;
+ /// package b import a
+ x = 1;
|