org.jetbrains.jet.j2k.JetTestCaseBase



API Populatity

1 Client projects

Project: org.jetbrains

Project JetBrains/kotlin in file .../test.org.jetbrains.jet.j2k.ast.ArrayTypeTest.java (2011-10-31)
@@ -0,0 +1,37 @@
+package org.jetbrains.jet.j2k.ast;
+
+import junit.framework.Assert;
+import org.jetbrains.jet.j2k.JetTestCaseBase;
+
+/**
+ * @author ignatov
+ */
+public class ArrayTypeTest extends JetTestCaseBase {
+  public void testNewStringArray() throws Exception {
+    Assert.assertEquals(
+      statementToKotlin("String[] a = new String[]{\"abc\"}"),
+      "var a : Array<String?>? = array(\"abc\")"
+    );
+  }
+
+  public void testNewIntArray() throws Exception {
+    Assert.assertEquals(
+      statementToKotlin("int[] a = new int[]{1, 2, 3}"),
+      "var a : IntArray? = array(1, 2, 3)"
+    );
+  }
+
+  public void testDoubleArray() throws Exception {
+    Assert.assertEquals(
+      statementToKotlin("double[] a = new double[]{1, 2, 3}"),
+      "var a : DoubleArray? = array(1, 2, 3)"
+    );
+  }
+
+  public void testLongArray() throws Exception {
+    Assert.assertEquals(
+      statementToKotlin("long[] a = new long[]{1, 2, 3}"),
+      "var a : LongArray? = array(1, 2, 3)"
+    );
+  }
+}
Project JetBrains/kotlin in file ...rg.jetbrains.jet.j2k.ast.InProjectionTypeTest.java (2011-11-01)
@@ -0,0 +1,16 @@
+package org.jetbrains.jet.j2k.ast;
+
+import junit.framework.Assert;
+import org.jetbrains.jet.j2k.JetTestCaseBase;
+
+/**
+ * @author ignatov
+ */
+public class InProjectionTypeTest extends JetTestCaseBase {
+  public void testMethodParams() throws Exception {
+    Assert.assertEquals(
+      methodToSingleLineKotlin("void popAll(Collection<? super E> dst) {}"),
+      "fun popAll(dst : Collection<in E?>?) : Unit { }"
+    );
+  }
+}
Project JetBrains/kotlin in file ...g.jetbrains.jet.j2k.ast.OutProjectionTypeTest.java (2011-11-01)
@@ -0,0 +1,16 @@
+package org.jetbrains.jet.j2k.ast;
+
+import junit.framework.Assert;
+import org.jetbrains.jet.j2k.JetTestCaseBase;
+
+/**
+ * @author ignatov
+ */
+public class OutProjectionTypeTest extends JetTestCaseBase {
+  public void testMethodParams() throws Exception {
+    Assert.assertEquals(
+      methodToSingleLineKotlin("void pushAll(Collection<? extends E> src) {}"),
+      "fun pushAll(src : Collection<out E?>?) : Unit { }"
+    );
+  }
+}