Reorder DocTests.java
Summary: Make the source ordering more closely match the rendered ordering.
@@ -144,6 +144,21 @@ public class DocTests extends BaseFBJniTests {
assertThat(str).startsWith("data=com.facebook.jni.DataHolder@");
}
+ static native void catchAndThrow();
+
+ @Test
+ public void testCatchAndThrow() {
+ try {
+ catchAndThrow();
+ failBecauseExceptionWasNotThrown(RuntimeException.class);
+ } catch (RuntimeException e) {
+ assertThat(e)
+ .hasMessageStartingWith("Caught 'java.lang.NoSuchMethodError:")
+ .hasMessageContaining("doesNotExist")
+ ;
+ }
+ }
+
// SECTION boxed
static native Double scaleUp(Integer number);
// END
@@ -167,21 +182,6 @@ public class DocTests extends BaseFBJniTests {
assertThat(concatMatches(Arrays.asList(1, 2), names)).isEqualTo("bc");
}
- static native void catchAndThrow();
-
- @Test
- public void testCatchAndThrow() {
- try {
- catchAndThrow();
- failBecauseExceptionWasNotThrown(RuntimeException.class);
- } catch (RuntimeException e) {
- assertThat(e)
- .hasMessageStartingWith("Caught 'java.lang.NoSuchMethodError:")
- .hasMessageContaining("doesNotExist")
- ;
- }
- }
-
// SECTION byte_buffer
static native ByteBuffer transformBuffer(ByteBuffer data);
static void receiveBuffer(ByteBuffer buffer) {
