Skip to content

Commit a2443f5

Browse files
fixed directive for Net.cc + initialize double values in floodfill to prevent randomly failing test
1 parent 090b600 commit a2443f5

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

cc/core/MatImgprocBindings.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,12 +1677,12 @@ namespace MatImgprocBindings {
16771677
}
16781678

16791679
cv::Point2d seedPoint;
1680-
double newVal1;
1680+
double newVal1 = 0;
16811681
cv::Vec3d newVal3 = cv::Vec3d();
16821682
cv::Mat mask = cv::noArray().getMat();
1683-
double loDiff1;
1683+
double loDiff1 = 0;
16841684
cv::Vec3d loDiff3 = cv::Vec3d();
1685-
double upDiff1;
1685+
double upDiff1 = 0;
16861686
cv::Vec3d upDiff3 = cv::Vec3d();
16871687
int flags = 4;
16881688

cc/modules/dnn/Net.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ NAN_MODULE_INIT(Net::Init) {
2424
target->Set(Nan::New("Net").ToLocalChecked(), ctor->GetFunction());
2525
};
2626

27-
//#endif
28-
29-
#endif
3027
NAN_METHOD(Net::New) {
3128
Net* self = new Net();
3229
self->Wrap(info.Holder());
@@ -64,3 +61,5 @@ NAN_METHOD(Net::ForwardAsync) {
6461
info
6562
);
6663
}
64+
65+
#endif

test/tests/core/Mat/imgprocTests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ module.exports = (getTestImg) => {
12411241
});
12421242
});
12431243

1244-
describe('floodFill', () => {
1244+
describe.only('floodFill', () => {
12451245
const expectOutput = (out) => {
12461246
expect(!!out).to.be.true;
12471247
expect(out).to.have.property('returnValue').to.be.a('number');

0 commit comments

Comments
 (0)