Closed xissy closed 5 years ago
I saw that -- there is definitely a difference between the pHash version that runs on 32-bit and the version that runs on 64-bit, and we don't account for that.
I would like to take a look at figuring out what is causing the difference between these. I added an automated testing service (https://travis-ci.org/aaronm67/node-phash) that will run our tests automatically on checkins, and since it's on 32-bit ubuntu, they currently pass on the automated testing and fail on OSX (as most macs are 64-bit).
I will probably end up re-writing some of the tests shortly, possibly either comparing them with the Ruby pHash bindings (pHashion) or writing a small C++ program that will just output the hashes (rather than hardcoding them into the test). Unfortunately, that makes our Build/testing program significantly more complicated.
-Aaron
I went ahead and removed the test on b.png for now, as it is different between systems.
I will look into rewriting the tests at a later point -- I don't really think there is any value in testing what the exact hashes are, as they seem to vary depending on the system you're on -- our tests should really just ensure the various functions are working (i.e. not returning "0" and not throwing an exception), and that we test for issues like #4 and #8 .
Hello, @aaronm67!
I'm going to update NPM now, but errors are occurred when I try
npm test
. I tested with MacOS and Ubuntu. They splited same the error message as below.Do you have any idea?