-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dandean
committed
Nov 15, 2010
1 parent
57f4a60
commit 47e2357
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
var Uuid = require("./uuid-lib"), | |||
Assert = require("assert"); | |||
|
|||
var empty = Uuid.EMPTY, | |||
uuid = Uuid.create(); | |||
raw = Uuid.raw(); | |||
|
|||
Assert.equal('00000000000000000000000000000000', empty, 'Empty UUID is not the correct value.'); | |||
Assert.ok(Uuid.isUuid(empty), "EMPTY should be a valid UUID."); | |||
Assert.ok(Uuid.isUuid(uuid), "Uuid object should be a valid UUID"); | |||
Assert.ok(Uuid.isUuid(raw), "UUID string should be a valid UUID"); | |||
Assert.ok(uuid instanceof Uuid, "Uuid instance should be instanceof Uuid."); | |||
Assert.ok((raw instanceof Uuid) == false, "Result of raw() should not be instanceof Uuid."); | |||
Assert.ok(Object.prototype.toString.call(raw) == '[object String]', "Result of raw() should be a string"); |