From 42b2c8ee062318bffd059a810033b615164cfb48 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sat, 26 Aug 2023 18:23:02 +0200 Subject: Fix unit test building and running --- build.gradle.kts | 2 +- main/build.gradle.kts | 2 +- main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3b41e700..b6c58bb8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:8.1.0") + classpath("com.android.tools.build:gradle:8.1.1") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") } } diff --git a/main/build.gradle.kts b/main/build.gradle.kts index 1b0989bf..aa084585 100644 --- a/main/build.gradle.kts +++ b/main/build.gradle.kts @@ -37,7 +37,7 @@ android { } - testOptions.unitTests.isIncludeAndroidResources = true + //testOptions.unitTests.isIncludeAndroidResources = true externalNativeBuild { cmake { diff --git a/main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt b/main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt index 53bfd00a..fcc27878 100644 --- a/main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt +++ b/main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt @@ -252,7 +252,7 @@ class TestConfigParser { val c:Context = ApplicationProvider.getApplicationContext() val err = vp.checkProfile(c, false) - Assert.assertTrue("Failed with " + c.getString(err), err == R.string.no_error_found) + Assert.assertTrue("Failed with wrong error code: $err", err == R.string.no_error_found) } @Test -- cgit v1.2.3