diff options
author | Fraser Adams <fraser.adams@blueyonder.co.uk> | 2014-01-02 16:40:09 +0000 |
---|---|---|
committer | Fraser Adams <fraser.adams@blueyonder.co.uk> | 2014-01-02 16:40:09 +0000 |
commit | 385a660a1868dc1777b251dfcf83371ccd388b02 (patch) | |
tree | c254e924656076501441b607364e2a67232e419d /tests/uuid | |
parent | 32e1d73d605a7c4c3dc162b7c0d626b3dcce27ce (diff) |
Added crypto quality random number generators for Node.js and browser environment if available
Diffstat (limited to 'tests/uuid')
-rw-r--r-- | tests/uuid/test.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/uuid/test.c b/tests/uuid/test.c index ea3b116c..dc2c6589 100644 --- a/tests/uuid/test.c +++ b/tests/uuid/test.c @@ -1,8 +1,9 @@ - #include <uuid/uuid.h> #include <assert.h> +#include <ctype.h> #include <stdio.h> #include <stdlib.h> +#include <emscripten.h> int isUUID(char* p, int upper) { char* p1 = p; @@ -56,6 +57,13 @@ int main() { assert(uuid_is_null(uuid) == 1); - return 0; + // The following lets the browser test exit cleanly. + int result = 1; + #if EMSCRIPTEN + #ifdef REPORT_RESULT + REPORT_RESULT(); + #endif + #endif + exit(0); } |