java: Rename Test class to TestBasic

test2
Akihiko Odaki 8 years ago
parent 8ac54c5d65
commit 01f6dda00a
  1. 14
      bindings/java/TestArm.java
  2. 8
      bindings/java/TestArm64.java
  3. 2
      bindings/java/TestBasic.java
  4. 10
      bindings/java/TestMips.java
  5. 8
      bindings/java/TestPpc.java
  6. 10
      bindings/java/TestSparc.java
  7. 8
      bindings/java/TestSystemz.java
  8. 14
      bindings/java/TestX86.java
  9. 8
      bindings/java/TestXcore.java

@ -108,18 +108,18 @@ public class TestArm {
public static void main(String argv[]) { public static void main(String argv[]) {
final Test.platform[] all_tests = { final TestBasic.platform[] all_tests = {
new Test.platform(Capstone.CS_ARCH_ARM, Capstone.CS_MODE_ARM, hexString2Byte(ARM_CODE), "ARM"), new TestBasic.platform(Capstone.CS_ARCH_ARM, Capstone.CS_MODE_ARM, hexString2Byte(ARM_CODE), "ARM"),
new Test.platform(Capstone.CS_ARCH_ARM, Capstone.CS_MODE_THUMB, hexString2Byte(THUMB_CODE), "Thumb"), new TestBasic.platform(Capstone.CS_ARCH_ARM, Capstone.CS_MODE_THUMB, hexString2Byte(THUMB_CODE), "Thumb"),
new Test.platform(Capstone.CS_ARCH_ARM, Capstone.CS_MODE_THUMB, hexString2Byte(ARM_CODE2), "Thumb-mixed"), new TestBasic.platform(Capstone.CS_ARCH_ARM, Capstone.CS_MODE_THUMB, hexString2Byte(ARM_CODE2), "Thumb-mixed"),
new Test.platform(Capstone.CS_ARCH_ARM, Capstone.CS_MODE_THUMB, Capstone.CS_OPT_SYNTAX_NOREGNAME, hexString2Byte(THUMB_CODE2), "Thumb-2 & register named with numbers"), new TestBasic.platform(Capstone.CS_ARCH_ARM, Capstone.CS_MODE_THUMB, Capstone.CS_OPT_SYNTAX_NOREGNAME, hexString2Byte(THUMB_CODE2), "Thumb-2 & register named with numbers"),
}; };
for (int i=0; i<all_tests.length; i++) { for (int i=0; i<all_tests.length; i++) {
Test.platform test = all_tests[i]; TestBasic.platform test = all_tests[i];
System.out.println(new String(new char[16]).replace("\0", "*")); System.out.println(new String(new char[16]).replace("\0", "*"));
System.out.println("Platform: " + test.comment); System.out.println("Platform: " + test.comment);
System.out.println("Code: " + Test.stringToHex(test.code)); System.out.println("Code: " + TestBasic.stringToHex(test.code));
System.out.println("Disasm:"); System.out.println("Disasm:");
cs = new Capstone(test.arch, test.mode); cs = new Capstone(test.arch, test.mode);

@ -96,15 +96,15 @@ public class TestArm64 {
public static void main(String argv[]) { public static void main(String argv[]) {
final Test.platform[] all_tests = { final TestBasic.platform[] all_tests = {
new Test.platform(Capstone.CS_ARCH_ARM64, Capstone.CS_MODE_ARM, hexString2Byte(ARM64_CODE), "ARM-64"), new TestBasic.platform(Capstone.CS_ARCH_ARM64, Capstone.CS_MODE_ARM, hexString2Byte(ARM64_CODE), "ARM-64"),
}; };
for (int i=0; i<all_tests.length; i++) { for (int i=0; i<all_tests.length; i++) {
Test.platform test = all_tests[i]; TestBasic.platform test = all_tests[i];
System.out.println(new String(new char[16]).replace("\0", "*")); System.out.println(new String(new char[16]).replace("\0", "*"));
System.out.println("Platform: " + test.comment); System.out.println("Platform: " + test.comment);
System.out.println("Code: " + Test.stringToHex(test.code)); System.out.println("Code: " + TestBasic.stringToHex(test.code));
System.out.println("Disasm:"); System.out.println("Disasm:");
cs = new Capstone(test.arch, test.mode); cs = new Capstone(test.arch, test.mode);

@ -3,7 +3,7 @@
import capstone.Capstone; import capstone.Capstone;
public class Test { public class TestBasic {
public static class platform { public static class platform {
public int arch; public int arch;
public int mode; public int mode;

@ -60,16 +60,16 @@ public class TestMips {
public static void main(String argv[]) { public static void main(String argv[]) {
final Test.platform[] all_tests = { final TestBasic.platform[] all_tests = {
new Test.platform(Capstone.CS_ARCH_MIPS, Capstone.CS_MODE_MIPS32 + Capstone.CS_MODE_BIG_ENDIAN, hexString2Byte(MIPS_CODE), "MIPS-32 (Big-endian)"), new TestBasic.platform(Capstone.CS_ARCH_MIPS, Capstone.CS_MODE_MIPS32 + Capstone.CS_MODE_BIG_ENDIAN, hexString2Byte(MIPS_CODE), "MIPS-32 (Big-endian)"),
new Test.platform(Capstone.CS_ARCH_MIPS, Capstone.CS_MODE_MIPS64 + Capstone.CS_MODE_LITTLE_ENDIAN, hexString2Byte(MIPS_CODE2), "MIPS-64-EL (Little-endian)"), new TestBasic.platform(Capstone.CS_ARCH_MIPS, Capstone.CS_MODE_MIPS64 + Capstone.CS_MODE_LITTLE_ENDIAN, hexString2Byte(MIPS_CODE2), "MIPS-64-EL (Little-endian)"),
}; };
for (int i=0; i<all_tests.length; i++) { for (int i=0; i<all_tests.length; i++) {
Test.platform test = all_tests[i]; TestBasic.platform test = all_tests[i];
System.out.println(new String(new char[16]).replace("\0", "*")); System.out.println(new String(new char[16]).replace("\0", "*"));
System.out.println("Platform: " + test.comment); System.out.println("Platform: " + test.comment);
System.out.println("Code: " + Test.stringToHex(test.code)); System.out.println("Code: " + TestBasic.stringToHex(test.code));
System.out.println("Disasm:"); System.out.println("Disasm:");
cs = new Capstone(test.arch, test.mode); cs = new Capstone(test.arch, test.mode);

@ -67,15 +67,15 @@ public class TestPpc {
public static void main(String argv[]) { public static void main(String argv[]) {
final Test.platform[] all_tests = { final TestBasic.platform[] all_tests = {
new Test.platform(Capstone.CS_ARCH_PPC, Capstone.CS_MODE_BIG_ENDIAN, hexString2Byte(PPC_CODE), "PPC-64"), new TestBasic.platform(Capstone.CS_ARCH_PPC, Capstone.CS_MODE_BIG_ENDIAN, hexString2Byte(PPC_CODE), "PPC-64"),
}; };
for (int i=0; i<all_tests.length; i++) { for (int i=0; i<all_tests.length; i++) {
Test.platform test = all_tests[i]; TestBasic.platform test = all_tests[i];
System.out.println(new String(new char[16]).replace("\0", "*")); System.out.println(new String(new char[16]).replace("\0", "*"));
System.out.println("Platform: " + test.comment); System.out.println("Platform: " + test.comment);
System.out.println("Code: " + Test.stringToHex(test.code)); System.out.println("Code: " + TestBasic.stringToHex(test.code));
System.out.println("Disasm:"); System.out.println("Disasm:");
cs = new Capstone(test.arch, test.mode); cs = new Capstone(test.arch, test.mode);

@ -67,16 +67,16 @@ public class TestSparc {
public static void main(String argv[]) { public static void main(String argv[]) {
final Test.platform[] all_tests = { final TestBasic.platform[] all_tests = {
new Test.platform(Capstone.CS_ARCH_SPARC, Capstone.CS_MODE_BIG_ENDIAN, hexString2Byte(SPARC_CODE), "Sparc"), new TestBasic.platform(Capstone.CS_ARCH_SPARC, Capstone.CS_MODE_BIG_ENDIAN, hexString2Byte(SPARC_CODE), "Sparc"),
new Test.platform(Capstone.CS_ARCH_SPARC, Capstone.CS_MODE_BIG_ENDIAN + Capstone.CS_MODE_V9, hexString2Byte(SPARCV9_CODE), "SparcV9"), new TestBasic.platform(Capstone.CS_ARCH_SPARC, Capstone.CS_MODE_BIG_ENDIAN + Capstone.CS_MODE_V9, hexString2Byte(SPARCV9_CODE), "SparcV9"),
}; };
for (int i=0; i<all_tests.length; i++) { for (int i=0; i<all_tests.length; i++) {
Test.platform test = all_tests[i]; TestBasic.platform test = all_tests[i];
System.out.println(new String(new char[16]).replace("\0", "*")); System.out.println(new String(new char[16]).replace("\0", "*"));
System.out.println("Platform: " + test.comment); System.out.println("Platform: " + test.comment);
System.out.println("Code: " + Test.stringToHex(test.code)); System.out.println("Code: " + TestBasic.stringToHex(test.code));
System.out.println("Disasm:"); System.out.println("Disasm:");
cs = new Capstone(test.arch, test.mode); cs = new Capstone(test.arch, test.mode);

@ -67,15 +67,15 @@ public class TestSystemz {
public static void main(String argv[]) { public static void main(String argv[]) {
final Test.platform[] all_tests = { final TestBasic.platform[] all_tests = {
new Test.platform(Capstone.CS_ARCH_SYSZ, 0, hexString2Byte(SYSZ_CODE), "SystemZ"), new TestBasic.platform(Capstone.CS_ARCH_SYSZ, 0, hexString2Byte(SYSZ_CODE), "SystemZ"),
}; };
for (int i=0; i<all_tests.length; i++) { for (int i=0; i<all_tests.length; i++) {
Test.platform test = all_tests[i]; TestBasic.platform test = all_tests[i];
System.out.println(new String(new char[16]).replace("\0", "*")); System.out.println(new String(new char[16]).replace("\0", "*"));
System.out.println("Platform: " + test.comment); System.out.println("Platform: " + test.comment);
System.out.println("Code: " + Test.stringToHex(test.code)); System.out.println("Code: " + TestBasic.stringToHex(test.code));
System.out.println("Disasm:"); System.out.println("Disasm:");
cs = new Capstone(test.arch, test.mode); cs = new Capstone(test.arch, test.mode);

@ -137,18 +137,18 @@ public class TestX86 {
public static void main(String argv[]) { public static void main(String argv[]) {
final Test.platform[] all_tests = { final TestBasic.platform[] all_tests = {
new Test.platform(Capstone.CS_ARCH_X86, Capstone.CS_MODE_16, hexString2Byte(X86_CODE16), "X86 16bit (Intel syntax)"), new TestBasic.platform(Capstone.CS_ARCH_X86, Capstone.CS_MODE_16, hexString2Byte(X86_CODE16), "X86 16bit (Intel syntax)"),
new Test.platform(Capstone.CS_ARCH_X86, Capstone.CS_MODE_32, Capstone.CS_OPT_SYNTAX_ATT, hexString2Byte(X86_CODE32), "X86 32 (AT&T syntax)"), new TestBasic.platform(Capstone.CS_ARCH_X86, Capstone.CS_MODE_32, Capstone.CS_OPT_SYNTAX_ATT, hexString2Byte(X86_CODE32), "X86 32 (AT&T syntax)"),
new Test.platform(Capstone.CS_ARCH_X86, Capstone.CS_MODE_32, hexString2Byte(X86_CODE32), "X86 32 (Intel syntax)"), new TestBasic.platform(Capstone.CS_ARCH_X86, Capstone.CS_MODE_32, hexString2Byte(X86_CODE32), "X86 32 (Intel syntax)"),
new Test.platform(Capstone.CS_ARCH_X86, Capstone.CS_MODE_64, hexString2Byte(X86_CODE64), "X86 64 (Intel syntax)"), new TestBasic.platform(Capstone.CS_ARCH_X86, Capstone.CS_MODE_64, hexString2Byte(X86_CODE64), "X86 64 (Intel syntax)"),
}; };
for (int i=0; i<all_tests.length; i++) { for (int i=0; i<all_tests.length; i++) {
Test.platform test = all_tests[i]; TestBasic.platform test = all_tests[i];
System.out.println(new String(new char[16]).replace("\0", "*")); System.out.println(new String(new char[16]).replace("\0", "*"));
System.out.println("Platform: " + test.comment); System.out.println("Platform: " + test.comment);
System.out.println("Code: " + Test.stringToHex(test.code)); System.out.println("Code: " + TestBasic.stringToHex(test.code));
System.out.println("Disasm:"); System.out.println("Disasm:");
cs = new Capstone(test.arch, test.mode); cs = new Capstone(test.arch, test.mode);

@ -60,15 +60,15 @@ public class TestXcore {
public static void main(String argv[]) { public static void main(String argv[]) {
final Test.platform[] all_tests = { final TestBasic.platform[] all_tests = {
new Test.platform(Capstone.CS_ARCH_XCORE, Capstone.CS_MODE_BIG_ENDIAN, hexString2Byte(XCORE_CODE), "XCore"), new TestBasic.platform(Capstone.CS_ARCH_XCORE, Capstone.CS_MODE_BIG_ENDIAN, hexString2Byte(XCORE_CODE), "XCore"),
}; };
for (int i=0; i<all_tests.length; i++) { for (int i=0; i<all_tests.length; i++) {
Test.platform test = all_tests[i]; TestBasic.platform test = all_tests[i];
System.out.println(new String(new char[16]).replace("\0", "*")); System.out.println(new String(new char[16]).replace("\0", "*"));
System.out.println("Platform: " + test.comment); System.out.println("Platform: " + test.comment);
System.out.println("Code: " + Test.stringToHex(test.code)); System.out.println("Code: " + TestBasic.stringToHex(test.code));
System.out.println("Disasm:"); System.out.println("Disasm:");
cs = new Capstone(test.arch, test.mode); cs = new Capstone(test.arch, test.mode);

Loading…
Cancel
Save