-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MurmurHash3 Tests and normalize filename
- Loading branch information
Showing
2 changed files
with
56 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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* MurmurHash3 tests | ||
* @author AliceGrey [alice@grey.systems] | ||
* @copyright Crown Copyright 2024 | ||
* @license Apache-2.0 | ||
*/ | ||
|
||
import TestRegister from "../../lib/TestRegister.mjs"; | ||
|
||
TestRegister.addTests([ | ||
{ | ||
name: "To MurmurHash3: nothing", | ||
input: "", | ||
expectedOutput: "0", | ||
recipeConfig: [ | ||
{ | ||
op: "MurmurHash3", | ||
args: [0], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "To MurmurHash3: 1", | ||
input: "1", | ||
expectedOutput: "2484513939", | ||
recipeConfig: [ | ||
{ | ||
op: "MurmurHash3", | ||
args: [0], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "To MurmurHash3: Hello World!", | ||
input: "Hello World!", | ||
expectedOutput: "3691591037", | ||
recipeConfig: [ | ||
{ | ||
op: "MurmurHash3", | ||
args: [0], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "To MurmurHash3: Hello World! with seed", | ||
input: "Hello World!", | ||
expectedOutput: "1148600031", | ||
recipeConfig: [ | ||
{ | ||
op: "MurmurHash3", | ||
args: [1337], | ||
}, | ||
], | ||
} | ||
]); |