Advertisement
Guest User

Testing the library

a guest
May 15th, 2020
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.36 KB | None | 0 0
  1. //I'm using java to test this since it's the only other language I have readily available right now
  2.  
  3. public interface Test extends Library {
  4.         Test INSTANCE = (Test) Native.load("ROCKETLOBBYSYSTEM", Test.class);
  5.         boolean testThisThingy(String c0, String c1);
  6.         String testThisThingy2();
  7.  
  8.         void message_addToQueue(long id, String message, String nullStr);
  9.  
  10.         boolean message_pollMessage();
  11.         long message_polledMessageID();
  12.         String message_polledMessageContents();
  13.     }
  14.  
  15.     public static void main(String[] args) {
  16.         int funny = 5;
  17.         System.out.println(Test.INSTANCE.testThisThingy("hey", "hey"));
  18.         System.out.println(Test.INSTANCE.testThisThingy2());
  19.         System.out.println(Test.INSTANCE.testThisThingy2());
  20.  
  21.         Test.INSTANCE.message_addToQueue(3, null, "null");
  22.         Test.INSTANCE.message_addToQueue(5, "hey there pal", null);
  23.         Test.INSTANCE.message_addToQueue(7, "null", "null");
  24.         Test.INSTANCE.message_addToQueue(7, "AYY", "null");
  25.  
  26.         while(Test.INSTANCE.message_pollMessage()) {
  27.             System.out.println(String.format("%d - %s", Test.INSTANCE.message_polledMessageID(),
  28.                                                       Test.INSTANCE.message_polledMessageContents()));
  29.         }
  30.         //StringBuffer buffer = Test.INSTANCE.testThisThingy2("yes");
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement