aboutsummaryrefslogtreecommitdiffstats
path: root/api/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/test/java/org')
-rw-r--r--api/src/test/java/org/osjava/jardiff/ToolsTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/api/src/test/java/org/osjava/jardiff/ToolsTest.java b/api/src/test/java/org/osjava/jardiff/ToolsTest.java
new file mode 100644
index 0000000..8066264
--- /dev/null
+++ b/api/src/test/java/org/osjava/jardiff/ToolsTest.java
@@ -0,0 +1,19 @@
+package org.osjava.jardiff;
+
+import org.junit.Test;
+import org.objectweb.asm.Opcodes;
+import static org.junit.Assert.*;
+
+public class ToolsTest {
+
+ @Test
+ public void isAccessChange() {
+ assertTrue(Tools.isAccessChange(0, Opcodes.ACC_FINAL));
+ assertTrue(Tools.isAccessChange(0, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL));
+ assertTrue(Tools.isAccessChange(Opcodes.ACC_FINAL + Opcodes.ACC_PUBLIC, 0));
+ assertTrue(Tools.isAccessChange(Opcodes.ACC_PUBLIC, Opcodes.ACC_PROTECTED));
+ assertFalse(Tools.isAccessChange(Opcodes.ACC_FINAL, 0));
+ assertFalse(Tools.isAccessChange(Opcodes.ACC_FINAL + Opcodes.ACC_PUBLIC, Opcodes.ACC_PUBLIC));
+ }
+
+}