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

Adds basic tests for planar image detector wrapper #118

Merged
merged 2 commits into from Jun 5, 2019

Conversation

Projects
None yet
2 participants
@paullewis
Copy link
Collaborator

commented Jun 4, 2019

No description provided.

@paullewis paullewis requested a review from mmocny Jun 4, 2019

@mmocny

mmocny approved these changes Jun 4, 2019

Copy link
Collaborator

left a comment

I have a few questions for my own understanding, but not patch correctness related.


it('accepts objects without IDs', () => {
assert.doesNotThrow(() => {
detector.addDetection(new Uint8Array(1));

This comment has been minimized.

Copy link
@mmocny

mmocny Jun 4, 2019

Collaborator

Is this expected to return anything?

This comment has been minimized.

Copy link
@paullewis

paullewis Jun 4, 2019

Author Collaborator

No, the wasm doesn't currently, but I would like it to if only for correctness.


it('cancels object detection', () => {
detector.addDetectionWithId(100, new Uint8Array(1));
detector.cancelDetection(100);

This comment has been minimized.

Copy link
@mmocny

mmocny Jun 4, 2019

Collaborator

Presumably detector.process will act differently after add/cancel, but I guess we cannot test this with Mock detector?

This comment has been minimized.

Copy link
@paullewis

paullewis Jun 4, 2019

Author Collaborator

Right.

assert.deepEqual(value.get(0), { id: 0 });
});

it('processes data', () => {

This comment has been minimized.

Copy link
@mmocny

mmocny Jun 4, 2019

Collaborator

I don't understand how this test differs from above. Is there something in processPreRuns which delays until detector finishes initializing?

This comment has been minimized.

Copy link
@paullewis

paullewis Jun 4, 2019

Author Collaborator

There's a "before the wasm has booted" and "after the wasm has booted", and I want to make sure that we get a sensible response from the wrapper if the wasm is still firing up.

@paullewis paullewis referenced this pull request Jun 5, 2019

Merged

Planar detector tests #120

@paullewis paullewis merged commit 8cce673 into master Jun 5, 2019

5 checks passed

Travis CI - Branch Build Passed
Details
Travis CI - Pull Request Build Passed
Details
cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@paullewis paullewis deleted the planar-tests branch Jun 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.