mirror of
https://github.com/opencv/opencv.git
synced 2024-11-30 14:29:49 +08:00
Merge pull request #20097 from komakai:fix_qrcode_test
This commit is contained in:
commit
1ae16beb06
@ -5,7 +5,10 @@ import org.opencv.core.Mat;
|
||||
import org.opencv.objdetect.QRCodeDetector;
|
||||
import org.opencv.imgcodecs.Imgcodecs;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
public class QRCodeDetectorTest extends OpenCVTestCase {
|
||||
|
||||
@ -39,11 +42,7 @@ public class QRCodeDetectorTest extends OpenCVTestCase {
|
||||
boolean result = detector.detectAndDecodeMulti(img, output);
|
||||
assertTrue(result);
|
||||
assertEquals(output.size(), 6);
|
||||
assertEquals(output.get(0), "SKIP");
|
||||
assertEquals(output.get(1), "EXTRA");
|
||||
assertEquals(output.get(2), "TWO STEPS FORWARD");
|
||||
assertEquals(output.get(3), "STEP BACK");
|
||||
assertEquals(output.get(4), "QUESTION");
|
||||
assertEquals(output.get(5), "STEP FORWARD");
|
||||
List < String > expectedResults = Arrays.asList("SKIP", "EXTRA", "TWO STEPS FORWARD", "STEP BACK", "QUESTION", "STEP FORWARD");
|
||||
assertEquals(new HashSet<String>(output), new HashSet<String>(expectedResults));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user