|
From: <jas...@us...> - 2006-08-21 08:31:35
|
Revision: 1577 Author: jasonpmorrison Date: 2006-08-21 01:31:18 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1577&view=rev Log Message: ----------- * Added test to old type inferrer a while ago Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/ti/TypeInferrerTest.java Modified: branches/type_inferrence/trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/ti/TypeInferrerTest.java =================================================================== --- branches/type_inferrence/trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/ti/TypeInferrerTest.java 2006-08-21 08:30:19 UTC (rev 1576) +++ branches/type_inferrence/trunk/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/ti/TypeInferrerTest.java 2006-08-21 08:31:18 UTC (rev 1577) @@ -63,6 +63,12 @@ assertInfersTypeWithoutDoubt(inferrer.infer(script, 10), "Fixnum"); // "y" } + public void testLocalVariableAssignmentToLocalVariableTwice() throws Exception { + String script = "x=5;y=x;z=y;z;y;x"; + assertInfersTypeWithoutDoubt(inferrer.infer(script, 12), "Fixnum"); // "z" + assertInfersTypeWithoutDoubt(inferrer.infer(script, 14), "Fixnum"); // "y" + assertInfersTypeWithoutDoubt(inferrer.infer(script, 16), "Fixnum"); // "x" + } public void testLocalVariableAssignmentToWellKnownMethodCall() throws Exception { assertInfersTypeWithoutDoubt(inferrer.infer("x=5.to_s;x", 9), "String"); } @@ -70,6 +76,9 @@ public void testLocalVariableAssignmentToClassInstantiation() throws Exception { assertInfersTypeWithoutDoubt(inferrer.infer("x=Regexp.new;x", 13), "Regexp"); } + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |