mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Failing examples tests
This commit is contained in:
parent
b9fbf5f526
commit
18394814ab
@ -1,9 +1,9 @@
|
||||
var cv = require('../lib/opencv');
|
||||
|
||||
cv.readImage("./files/mona.png", function(err, orig) {
|
||||
cv.readImage("./examples/files/mona.png", function(err, orig) {
|
||||
if (err) throw err;
|
||||
|
||||
cv.readImage("./files/over_text.png", function(err, over_text) {
|
||||
cv.readImage("./examples/over_text.png", function(err, over_text) {
|
||||
if (err) throw err;
|
||||
|
||||
var result = new cv.Matrix(orig.width(), orig.height());
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"tape": "^3.0.0"
|
||||
"tape": "^3.0.0",
|
||||
"glob": "^4.0.6"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
16
test/examples.js
Normal file
16
test/examples.js
Normal file
@ -0,0 +1,16 @@
|
||||
var test = require('tape')
|
||||
, glob = require('glob')
|
||||
, exec = require('child_process').exec
|
||||
|
||||
module.exports = function(){
|
||||
|
||||
glob.sync('./examples/*.js').forEach(function(example){
|
||||
test("Example: " + example, function(assert){
|
||||
exec('node ' + example, function(error, stdout, stderr){
|
||||
assert.error(error)
|
||||
assert.end()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
@ -275,3 +275,7 @@ test("fonts", function(t) {
|
||||
});
|
||||
})
|
||||
|
||||
// Test the examples folder.
|
||||
require('./examples')()
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user