Nice/testsuite/compiler/typing dti.testsuite,1.6,1.7

Arjan Boeijink <[email protected]>
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/testsuite/compiler/typing
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17660/F:/nice/testsuite/compiler/typing

Modified Files:
	dti.testsuite 
Log Message:
Additional testcases for nullness inference.

Index: dti.testsuite
===================================================================
RCS file: /cvsroot/nice/Nice/testsuite/compiler/typing/dti.testsuite,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dti.testsuite	7 Mar 2005 20:52:52 -0000	1.6
--- dti.testsuite	7 Mar 2005 23:02:44 -0000	1.7
***************
*** 7,10 ****
--- 7,23 ----
  /// PASS
    ?String s = maybeString();
+   s = "abc";
+   s.substring(1);
+ 
+ /// FAIL
+   ?String s = maybeString();
+   if (s == null)
+     s = "abc";
+ 
+   s = null;
+   s. /*/// FAIL HERE*/ substring(1);
+ 
+ /// PASS
+   ?String s = maybeString();
    if (s == null)
      s = "abc";
***************
*** 13,16 ****
--- 26,69 ----
  
  /// PASS
+   ?String s = maybeString();
+   s = "abc";
+   if (s != null)
+     s = null;
+ 
+ /// FAIL
+   ?String s = "abc";
+   if (s != null)
+     s = null;
+ 
+   s. /*/// FAIL HERE*/ substring(1);
+ 
+ /// FAIL
+   ?String s = maybeString();
+   s = "abc";
+   if (maybeTrue())
+     {
+       if (maybeTrue())
+         s = null;
+       else
+         s = "abc";
+     }
+   else
+     s = "abc";
+ 
+   s. /*/// FAIL HERE*/ substring(1);
+ 
+ /// PASS bug
+   ?String s = maybeString();
+   if (maybeTrue())
+     {
+       if (s == null)
+         s = "abc";
+     }
+   else
+     s = "abc";
+ 
+   s.substring(1);
+ 
+ /// PASS
    // Nullness analysis on assignments. RFE# 681385
    func( null ).append( "123" );



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.