Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Nov 14, 2024
1 parent 8600c11 commit e663573
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2021-2023 Picovoice Inc.
Copyright 2021-2024 Picovoice Inc.
You may not use this file except in compliance with the license. A copy of the license is
located in the "LICENSE" file accompanying this source.
Unless required by applicable law or agreed to in writing, software distributed under the
Expand All @@ -16,13 +16,9 @@
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;

import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.rules.TestRule;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
Expand All @@ -44,13 +40,12 @@


@RunWith(AndroidJUnit4.class)
public class CobraTest implements TestRule {
public class CobraTest {

@Rule
public Context testContext;
public Context appContext;
public AssetManager assetManager;
public String testResourcesPath;
Context testContext;
Context appContext;
AssetManager assetManager;
String testResourcesPath;

String accessKey = "";

Expand All @@ -70,7 +65,6 @@ public void testProcess() throws CobraException {
Cobra cobra = new Cobra(accessKey);

File testAudio = new File(testResourcesPath, "audio/sample.wav");
ArrayList<Float> detectionResults = new ArrayList<>();

List<Float> probs = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;

import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.rules.TestRule;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
Expand All @@ -30,13 +27,12 @@
import ai.picovoice.cobra.Cobra;

@RunWith(AndroidJUnit4.class)
public class PerformanceTest implements TestRule {
public class PerformanceTest {

@Rule
public Context testContext;
public Context appContext;
public AssetManager assetManager;
public String testResourcesPath;
Context testContext;
Context appContext;
AssetManager assetManager;
String testResourcesPath;

String accessKey;

Expand All @@ -51,8 +47,6 @@ public void Setup() throws IOException {
accessKey = appContext.getString(R.string.pvTestingAccessKey);
}



@Test
public void testPerformance() throws Exception {
String iterationString = appContext.getString(R.string.numTestIterations);
Expand Down

0 comments on commit e663573

Please sign in to comment.