Skip to content

Commit a6732ba

Browse files
committed
Added Index of Coincidence Tests
1 parent 466d872 commit a6732ba

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

tests/operations/index.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import "./tests/Hash";
4949
import "./tests/HaversineDistance";
5050
import "./tests/Hexdump";
5151
import "./tests/Image";
52+
import "./tests/IndexOfCoincidence";
5253
import "./tests/Jump";
5354
import "./tests/JSONBeautify";
5455
import "./tests/JSONMinify";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Index of Coincidence tests.
3+
*
4+
* @author George O [[email protected]]
5+
* @copyright Crown Copyright 2019
6+
* @license Apache-2.0
7+
*/
8+
import TestRegister from "../TestRegister";
9+
10+
TestRegister.addTests([
11+
{
12+
name: "Index of Coincidence",
13+
input: "Hello world, this is a test to determine the correct IC value.",
14+
expectedMatch: /^Index of Coincidence: 0\.07142857142857142\nNormalized: 1\.857142857142857/,
15+
recipeConfig: [
16+
{
17+
"op": "Index of Coincidence",
18+
"args": []
19+
},
20+
],
21+
},
22+
]);

0 commit comments

Comments
 (0)