Skip to content

Commit

Permalink
Added Index of Coincidence Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ge0rg3 committed Jun 8, 2019
1 parent 466d872 commit a6732ba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/operations/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import "./tests/Hash";
import "./tests/HaversineDistance";
import "./tests/Hexdump";
import "./tests/Image";
import "./tests/IndexOfCoincidence";
import "./tests/Jump";
import "./tests/JSONBeautify";
import "./tests/JSONMinify";
Expand Down
22 changes: 22 additions & 0 deletions tests/operations/tests/IndexOfCoincidence.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Index of Coincidence tests.
*
* @author George O [georgeomnet+cyberchef@gmail.com]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/
import TestRegister from "../TestRegister";

TestRegister.addTests([
{
name: "Index of Coincidence",
input: "Hello world, this is a test to determine the correct IC value.",
expectedMatch: /^Index of Coincidence: 0\.07142857142857142\nNormalized: 1\.857142857142857/,
recipeConfig: [
{
"op": "Index of Coincidence",
"args": []
},
],
},
]);

0 comments on commit a6732ba

Please sign in to comment.