-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
700 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 5 additions & 13 deletions
18
...-android-ndk/src/androidTest/java/com/bugsnag/android/ndk/AppMetadataSerializationTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
package com.bugsnag.android.ndk | ||
|
||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.junit.runners.Parameterized | ||
|
||
@RunWith(Parameterized::class) | ||
internal class AppMetadataSerializationTest { | ||
|
||
companion object { | ||
init { | ||
System.loadLibrary("bugsnag-ndk") | ||
System.loadLibrary("bugsnag-ndk-test") | ||
} | ||
|
||
@JvmStatic | ||
@Parameterized.Parameters | ||
fun testCases() = 0..0 | ||
} | ||
|
||
external fun run(testCase: Int, expectedJson: String): Int | ||
|
||
@Parameterized.Parameter | ||
lateinit var testCase: Number | ||
external fun run(): String | ||
|
||
@Test | ||
fun testPassesNativeSuite() { | ||
val expectedJson = loadJson("app_meta_data_serialization_$testCase.json") | ||
verifyNativeRun(run(testCase.toInt(), expectedJson)) | ||
val expected = loadJson("app_meta_data_serialization.json") | ||
val json = run() | ||
assertEquals(expected, json) | ||
} | ||
} |
18 changes: 5 additions & 13 deletions
18
...g-plugin-android-ndk/src/androidTest/java/com/bugsnag/android/ndk/AppSerializationTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
package com.bugsnag.android.ndk | ||
|
||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.junit.runners.Parameterized | ||
|
||
@RunWith(Parameterized::class) | ||
internal class AppSerializationTest { | ||
|
||
companion object { | ||
init { | ||
System.loadLibrary("bugsnag-ndk") | ||
System.loadLibrary("bugsnag-ndk-test") | ||
} | ||
|
||
@JvmStatic | ||
@Parameterized.Parameters | ||
fun testCases() = 0..0 | ||
} | ||
|
||
external fun run(testCase: Int, expectedJson: String): Int | ||
|
||
@Parameterized.Parameter | ||
lateinit var testCase: Number | ||
external fun run(): String | ||
|
||
@Test | ||
fun testPassesNativeSuite() { | ||
val expectedJson = loadJson("app_serialization_$testCase.json") | ||
verifyNativeRun(run(testCase.toInt(), expectedJson)) | ||
val expected = loadJson("app_serialization.json") | ||
val json = run() | ||
assertEquals(expected, json) | ||
} | ||
} |
20 changes: 6 additions & 14 deletions
20
...roid-ndk/src/androidTest/java/com/bugsnag/android/ndk/BreadcrumbStateSerializationTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
package com.bugsnag.android.ndk | ||
|
||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.junit.runners.Parameterized | ||
|
||
@RunWith(Parameterized::class) | ||
internal class BreadcrumbStateSerializationTest { | ||
|
||
companion object { | ||
init { | ||
System.loadLibrary("bugsnag-ndk") | ||
System.loadLibrary("bugsnag-ndk-test") | ||
} | ||
|
||
@JvmStatic | ||
@Parameterized.Parameters | ||
fun testCases() = 0..0 | ||
} | ||
|
||
external fun run(testCase: Int, expectedJson: String): Int | ||
|
||
@Parameterized.Parameter | ||
lateinit var testCase: Number | ||
external fun run(): String | ||
|
||
@Test | ||
fun testPassesNativeSuite() { | ||
val expectedJson = loadJson("breadcrumbs_serialization_$testCase.json") | ||
verifyNativeRun(run(testCase.toInt(), expectedJson)) | ||
fun testBreadcrumbSerialization() { | ||
val expected = loadJson("breadcrumbs_serialization.json") | ||
val json = run() | ||
assertEquals(expected, json) | ||
} | ||
} |
18 changes: 5 additions & 13 deletions
18
...ugin-android-ndk/src/androidTest/java/com/bugsnag/android/ndk/ContextSerializationTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
package com.bugsnag.android.ndk | ||
|
||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.junit.runners.Parameterized | ||
|
||
@RunWith(Parameterized::class) | ||
internal class ContextSerializationTest { | ||
|
||
companion object { | ||
init { | ||
System.loadLibrary("bugsnag-ndk") | ||
System.loadLibrary("bugsnag-ndk-test") | ||
} | ||
|
||
@JvmStatic | ||
@Parameterized.Parameters | ||
fun testCases() = 0..0 | ||
} | ||
|
||
external fun run(testCase: Int, expectedJson: String): Int | ||
|
||
@Parameterized.Parameter | ||
lateinit var testCase: Number | ||
external fun run(): String | ||
|
||
@Test | ||
fun testPassesNativeSuite() { | ||
val expectedJson = loadJson("context_serialization_$testCase.json") | ||
verifyNativeRun(run(testCase.toInt(), expectedJson)) | ||
val expected = loadJson("context_serialization.json") | ||
val json = run() | ||
assertEquals(expected, json) | ||
} | ||
} |
18 changes: 5 additions & 13 deletions
18
...droid-ndk/src/androidTest/java/com/bugsnag/android/ndk/CustomMetadataSerializationTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
package com.bugsnag.android.ndk | ||
|
||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.junit.runners.Parameterized | ||
|
||
@RunWith(Parameterized::class) | ||
internal class CustomMetadataSerializationTest { | ||
|
||
companion object { | ||
init { | ||
System.loadLibrary("bugsnag-ndk") | ||
System.loadLibrary("bugsnag-ndk-test") | ||
} | ||
|
||
@JvmStatic | ||
@Parameterized.Parameters | ||
fun testCases() = 0..0 | ||
} | ||
|
||
external fun run(testCase: Int, expectedJson: String): Int | ||
|
||
@Parameterized.Parameter | ||
lateinit var testCase: Number | ||
external fun run(): String | ||
|
||
@Test | ||
fun testPassesNativeSuite() { | ||
val expectedJson = loadJson("custom_meta_data_serialization_$testCase.json") | ||
verifyNativeRun(run(testCase.toInt(), expectedJson)) | ||
val expected = loadJson("custom_meta_data_serialization.json") | ||
val json = run() | ||
assertEquals(expected, json) | ||
} | ||
} |
18 changes: 5 additions & 13 deletions
18
...lugin-android-ndk/src/androidTest/java/com/bugsnag/android/ndk/DeviceSerializationTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
package com.bugsnag.android.ndk | ||
|
||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.junit.runners.Parameterized | ||
|
||
@RunWith(Parameterized::class) | ||
internal class DeviceSerializationTest { | ||
|
||
companion object { | ||
init { | ||
System.loadLibrary("bugsnag-ndk") | ||
System.loadLibrary("bugsnag-ndk-test") | ||
} | ||
|
||
@JvmStatic | ||
@Parameterized.Parameters | ||
fun testCases() = 0..0 | ||
} | ||
|
||
external fun run(testCase: Int, expectedJson: String): Int | ||
|
||
@Parameterized.Parameter | ||
lateinit var testCase: Number | ||
external fun run(): String | ||
|
||
@Test | ||
fun testPassesNativeSuite() { | ||
val expectedJson = loadJson("device_serialization_$testCase.json") | ||
verifyNativeRun(run(testCase.toInt(), expectedJson)) | ||
val expected = loadJson("device_serialization.json") | ||
val json = run() | ||
assertEquals(expected, json) | ||
} | ||
} |
Oops, something went wrong.