inline some test code snippets

This commit is contained in:
Dmitry Jemerov
2011-04-08 20:07:45 +02:00
parent e9d49c76de
commit f8acb78f01
5 changed files with 4 additions and 8 deletions
-1
View File
@@ -1 +0,0 @@
fun f() : Long { return System.currentTimeMillis(); }
@@ -1 +0,0 @@
fun f(o: Any) : Int { return System.identityHashCode(o); }
-1
View File
@@ -1 +0,0 @@
fun foo(a : Int) = a
-1
View File
@@ -1 +0,0 @@
fun f() : Int { return 42; }
@@ -36,7 +36,7 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
} }
public void testReturnOne() throws Exception { public void testReturnOne() throws Exception {
myFixture.configureByFile(JetParsingTest.getTestDataDir() + "/codegen/returnOne.jet"); loadText("fun f() : Int { return 42; }");
final String text = generateToText(); final String text = generateToText();
System.out.println(text); System.out.println(text);
@@ -46,7 +46,7 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
} }
public void testReturnA() throws Exception { public void testReturnA() throws Exception {
myFixture.configureByFile(JetParsingTest.getTestDataDir() + "/codegen/returnA.jet"); loadText("fun foo(a : Int) = a");
final String text = generateToText(); final String text = generateToText();
System.out.println(text); System.out.println(text);
@@ -66,7 +66,7 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
} }
public void testCurrentTime() throws Exception { public void testCurrentTime() throws Exception {
loadFile("currentTime.jet"); loadText("fun f() : Long { return System.currentTimeMillis(); }");
System.out.println(generateToText()); System.out.println(generateToText());
final Method main = generateFunction(); final Method main = generateFunction();
final long returnValue = (Long) main.invoke(null); final long returnValue = (Long) main.invoke(null);
@@ -75,7 +75,7 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
} }
public void testIdentityHashCode() throws Exception { public void testIdentityHashCode() throws Exception {
loadFile("identityHashCode.jet"); loadText("fun f(o: Any) : Int { return System.identityHashCode(o); }");
System.out.println(generateToText()); System.out.println(generateToText());
final Method main = generateFunction(); final Method main = generateFunction();
Object o = new Object(); Object o = new Object();