aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Westkämper <[email protected]>2014-07-30 22:29:18 +0300
committerTimo Westkämper <[email protected]>2014-07-30 22:29:18 +0300
commitcd5d3fab37fa4b1b240875ad13bac404a6312bd8 (patch)
tree03b600fd90f3e0a8c1de0d6f425a8555a9c8c8a5
parentb7f165affed6259a40dc7394a19b9e29db501108 (diff)
Add test
-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));
+ }
+
+}