コード例 #1
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /**
  * Test a simple multiple value-taking method call, that returns whether it got the expected
  * values.
  */
 public void test_takeCoolHandLuke() {
   assertTrue(
       StaticNonce.takeCoolHandLuke(
           1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
           25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
           47, 48, 49, 50));
 }
コード例 #2
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnShortArray() {
   short[] array = StaticNonce.returnShortArray();
   assertSame(short[].class, array.getClass());
   assertEquals(3, array.length);
   assertEquals(10, array[0]);
   assertEquals(20, array[1]);
   assertEquals(30, array[2]);
 }
コード例 #3
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnStringArray() {
   String[] array = StaticNonce.returnStringArray();
   assertSame(String[].class, array.getClass());
   assertEquals(100, array.length);
   assertEquals("blort", array[0]);
   assertEquals(null, array[1]);
   assertEquals("zorch", array[50]);
   assertEquals("fizmo", array[99]);
 }
コード例 #4
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /**
  * Test a simple multiple value-taking method call, that returns whether it got the expected
  * values.
  */
 public void test_takeOneOfEach() {
   assertTrue(
       StaticNonce.takeOneOfEach(
           (boolean) false,
           (byte) 1,
           (short) 2,
           (char) 3,
           (int) 4,
           5L,
           "six",
           7.0f,
           8.0,
           new int[] {9, 10}));
 }
コード例 #5
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnByte() {
   assertEquals(123, StaticNonce.returnByte());
 }
コード例 #6
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeChar() {
   assertTrue(StaticNonce.takeChar((char) 999));
 }
コード例 #7
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnBoolean() {
   assertEquals(true, StaticNonce.returnBoolean());
 }
コード例 #8
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnNull() {
   assertNull(StaticNonce.returnNull());
 }
コード例 #9
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeBoolean() {
   assertTrue(StaticNonce.takeBoolean(true));
 }
コード例 #10
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnInt() {
   assertEquals(12345678, StaticNonce.returnInt());
 }
コード例 #11
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnFloat() {
   assertEquals(-98765.4321F, StaticNonce.returnFloat());
 }
コード例 #12
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeString() {
   assertTrue(StaticNonce.takeString("fuzzbot"));
 }
コード例 #13
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /**
  * Test a simple value-taking method call, that returns whether it got the expected value. In
  * particular, this test passes the class the method is defined on.
  */
 public void test_takeThisClass() {
   assertTrue(StaticNonce.takeThisClass(StaticNonce.class));
 }
コード例 #14
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeDouble() {
   assertTrue(StaticNonce.takeDouble(999888777.666555));
 }
コード例 #15
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeNull() {
   assertTrue(StaticNonce.takeNull(null));
 }
コード例 #16
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeFloat() {
   assertTrue(StaticNonce.takeFloat(-9988.7766F));
 }
コード例 #17
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeLong() {
   assertTrue(StaticNonce.takeLong(999888777666555444L));
 }
コード例 #18
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeInt() {
   assertTrue(StaticNonce.takeInt(-999888777));
 }
コード例 #19
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnShort() {
   assertEquals(-12345, StaticNonce.returnShort());
 }
コード例 #20
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /**
  * Test a simple multiple value-taking method call, that returns whether it got the expected
  * values.
  */
 public void test_takeIntLong() {
   assertTrue(StaticNonce.takeIntLong(914, 9140914091409140914L));
 }
コード例 #21
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnChar() {
   assertEquals(34567, StaticNonce.returnChar());
 }
コード例 #22
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /**
  * Test a simple multiple value-taking method call, that returns whether it got the expected
  * values.
  */
 public void test_takeLongInt() {
   assertTrue(StaticNonce.takeLongInt(-4321L, 12341234));
 }
コード例 #23
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnLong() {
   assertEquals(-1098765432109876543L, StaticNonce.returnLong());
 }
コード例 #24
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /**
  * Test a simple value-returning (but otherwise no-op) method call, that returns the class that
  * the method is defined on.
  */
 public void test_returnInstance() {
   StaticNonce nonce = StaticNonce.returnInstance();
   assertSame(StaticNonce.class, nonce.getClass());
 }
コード例 #25
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnDouble() {
   assertEquals(12345678.9, StaticNonce.returnDouble());
 }
コード例 #26
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeByte() {
   assertTrue(StaticNonce.takeByte((byte) -99));
 }
コード例 #27
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-returning (but otherwise no-op) method call. */
 public void test_returnString() {
   assertEquals("blort", StaticNonce.returnString());
 }
コード例 #28
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple no-op and void-returning method call. */
 public void test_nop() {
   StaticNonce.nop();
 }
コード例 #29
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /**
  * Test a simple value-returning (but otherwise no-op) method call, that returns the class that
  * the method is defined on.
  */
 public void test_returnThisClass() {
   assertSame(StaticNonce.class, StaticNonce.returnThisClass());
 }
コード例 #30
0
ファイル: JniStaticTest.java プロジェクト: rcoscali/cts
 /** Test a simple value-taking method call, that returns whether it got the expected value. */
 public void test_takeShort() {
   assertTrue(StaticNonce.takeShort((short) 19991));
 }