summaryrefslogtreecommitdiffstats
path: root/jack-tests/tests/com/android/jack/annotation
diff options
context:
space:
mode:
authorJean-Marie Henaff <jmhenaff@google.com>2014-05-19 17:34:13 +0200
committerJean-Marie Henaff <jmhenaff@google.com>2014-10-14 10:35:18 +0200
commitf265ce821c48ed54ad8d00060664b55a8f8e1bb7 (patch)
tree798f4464e8669ce31fbd5bbe0a2e3404d4e47ff1 /jack-tests/tests/com/android/jack/annotation
parent706b60417fe72a4a70bc61da2f915fe3693dd0c2 (diff)
downloadtoolchain_jack-f265ce821c48ed54ad8d00060664b55a8f8e1bb7.zip
toolchain_jack-f265ce821c48ed54ad8d00060664b55a8f8e1bb7.tar.gz
toolchain_jack-f265ce821c48ed54ad8d00060664b55a8f8e1bb7.tar.bz2
WIP Use JUnit for jack-tests.
(cherry picked from commit 452cbd7d69db557ecdbbd20875a669752cf2d9d7) Change-Id: I96a34b90c9525fa4403f6f940d6fcdf4656722ab
Diffstat (limited to 'jack-tests/tests/com/android/jack/annotation')
-rw-r--r--jack-tests/tests/com/android/jack/annotation/AnnotationTests.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/jack-tests/tests/com/android/jack/annotation/AnnotationTests.java b/jack-tests/tests/com/android/jack/annotation/AnnotationTests.java
new file mode 100644
index 0000000..e68228e
--- /dev/null
+++ b/jack-tests/tests/com/android/jack/annotation/AnnotationTests.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.jack.annotation;
+
+import com.android.jack.Main;
+import com.android.jack.test.category.RuntimeRegressionTest;
+import com.android.jack.test.helper.CheckDexStructureTestHelper;
+import com.android.jack.test.helper.RuntimeTestHelper;
+import com.android.jack.test.runtime.RuntimeTest;
+import com.android.jack.test.runtime.RuntimeTestInfo;
+import com.android.jack.test.toolchain.AbstractTestTools;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+
+public class AnnotationTests extends RuntimeTest {
+
+ private static final File ANNOTATION001_PATH =
+ AbstractTestTools.getTestRootDir("com.android.jack.annotation.test001.jack");
+
+ private RuntimeTestInfo TEST001 = new RuntimeTestInfo(
+ AbstractTestTools.getTestRootDir("com.android.jack.annotation.test001"),
+ "com.android.jack.annotation.test001.dx.Tests");
+
+ @BeforeClass
+ public static void setUpClass() {
+ Main.class.getClassLoader().setDefaultAssertionStatus(true);
+ }
+
+ @Test
+ public void checkStructure() throws Exception {
+ CheckDexStructureTestHelper env =
+ new CheckDexStructureTestHelper(new File(ANNOTATION001_PATH, "Annotation2.java"));
+ env.setWithDebugInfo(true);
+ env.compare();
+ }
+
+ @Test
+ @Category(RuntimeRegressionTest.class)
+ public void runtimeTest001() throws Exception {
+ new RuntimeTestHelper(TEST001).compileAndRunTest();
+ }
+
+ @Override
+ protected void fillRtTestInfos() {
+ rtTestInfos.add(TEST001);
+ }
+
+}