From edbd540c681188248d708880d9a9868b226cc394 Mon Sep 17 00:00:00 2001 From: GCHQ 77703 Date: Mon, 27 Aug 2018 15:42:07 +0100 Subject: [PATCH] Add Dysfunctional Test --- test/index.mjs | 1 + test/tests/operations/LengthValueDecoder.mjs | 23 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/tests/operations/LengthValueDecoder.mjs diff --git a/test/index.mjs b/test/index.mjs index 8cf69732..ee0aa3b2 100644 --- a/test/index.mjs +++ b/test/index.mjs @@ -64,6 +64,7 @@ import "./tests/operations/SetUnion"; import "./tests/operations/SymmetricDifference"; import "./tests/operations/TranslateDateTimeFormat"; import "./tests/operations/Magic"; +import "./tests/operations/LengthValueDecoder"; let allTestsPassing = true; const testStatusCounts = { diff --git a/test/tests/operations/LengthValueDecoder.mjs b/test/tests/operations/LengthValueDecoder.mjs new file mode 100644 index 00000000..250002c4 --- /dev/null +++ b/test/tests/operations/LengthValueDecoder.mjs @@ -0,0 +1,23 @@ +/** + * Length Value Decoder tests. + * + * @author gchq77703 [] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +import TestRegister from "../../TestRegister"; + +TestRegister.addTests([ + { + name: "KeyValue", + input: [5,72,111,117,115,101,4,114,111,111,109,4,100,111,111,114], + expectedOutput: [{"key":[25],"length":5,"value":[72,111,117,115,101]},{"key":[73],"length":4,"value":[114,111,111,109]},{"key":[41],"length":4,"value":[100,111,111,114]}], + recipeConfig: [ + { + "op": "Length Value Decoder", + "args": ["0 Bytes (No Key)", "1 Byte", false] + } + ] + }, +]) \ No newline at end of file