Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try fix test #229

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,10 +16,7 @@
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;

Expand All @@ -45,7 +42,6 @@
@RunWith(AndroidJUnit4.class)
public class CobraTest {

@Rule
Context testContext;
Context appContext;
AssetManager assetManager;
Expand All @@ -69,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,10 +8,8 @@
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;

Expand All @@ -31,11 +29,11 @@
@RunWith(AndroidJUnit4.class)
public class PerformanceTest {

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

String accessKey;

@Before
Expand All @@ -49,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