Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpelder2007-06-01 16:33:35 -0400
committerpelder2007-06-01 16:33:35 -0400
commit6cabfeb8b0015f25ddb03bb575d9801c5a05b54c (patch)
treeabcc20b3f12b77e2fbb2b47c0697ca177f1379e0 /tests
parentb90ede1920bca18583181e1d713ee9d832d18d7a (diff)
downloadorg.eclipse.jet-6cabfeb8b0015f25ddb03bb575d9801c5a05b54c.tar.gz
org.eclipse.jet-6cabfeb8b0015f25ddb03bb575d9801c5a05b54c.tar.xz
org.eclipse.jet-6cabfeb8b0015f25ddb03bb575d9801c5a05b54c.zip
[190570] JET Editor does not have access to required JET internals
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.jet.tests/data/alljet2.jet.expected.java65
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java3
2 files changed, 67 insertions, 1 deletions
diff --git a/tests/org.eclipse.jet.tests/data/alljet2.jet.expected.java b/tests/org.eclipse.jet.tests/data/alljet2.jet.expected.java
new file mode 100644
index 0000000..4d19cf8
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/alljet2.jet.expected.java
@@ -0,0 +1,65 @@
+package org.eclipse.emf.examples;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Template;
+import org.eclipse.jet.JET2Writer;
+
+public class Foo implements JET2Template {
+
+
+int foo() {
+ return 3;
+}
+
+ public Foo() {
+ super();
+ }
+
+ private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ public void generate(final JET2Context context, final JET2Writer __out) {
+ JET2Writer out = __out;
+ out.write("Some top level text."); //$NON-NLS-1$
+ out.write(NL);
+ out.write( "An expression" );
+ out.write(NL);
+
+if(foo() > 0) {
+ foo();
+}
+
+ out.write("<test:container one=\"test one\" two='test two'>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write(" <test:empty/>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write(" <test:container>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write(" some text <nontest:text attributes=\"foo\"/>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write(" </test:container>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write("</test:container>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write("<test:container>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write(" "); //$NON-NLS-1$
+ out.write( foo(); );
+ out.write(NL);
+ if(foo() > 0) {
+ out.write(" some text"); //$NON-NLS-1$
+ out.write(NL);
+ }
+ out.write("</test:container>"); //$NON-NLS-1$
+ out.write(NL);
+ if(foo() > 0) {
+ out.write(" some text"); //$NON-NLS-1$
+ out.write(NL);
+ out.write(" <test:empty/>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write(" <test:container>"); //$NON-NLS-1$
+ out.write(NL);
+ out.write(" </test:container>"); //$NON-NLS-1$
+ out.write(NL);
+ }
+ }
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java
index cb7b1d0..631c78c 100644
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/compiler/AllTests.java
@@ -13,8 +13,9 @@ public class AllTests {
suite.addTestSuite(TestSimplifiedCompiler.class);
suite.addTestSuite(TestJET2Parser.class);
suite.addTest(TextTrimmingTests.suite());
+ suite.addTest(TestCompilationHelper.suite());
suite.addTestSuite(LineInfoTests.class);
- //$JUnit-END$
+//$JUnit-END$
return suite;
}

Back to the top