1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- /**
- * Core tests.
- *
- * @copyright Crown Copyright 2017
- * @license Apache-2.0
- *
- */
- TestRegister.addTests([
- //{
- // name: "Example error",
- // input: "1\n2\na\n4",
- // expectedOutput: "1\n2\n3\n4",
- // recipeConfig: [
- // {
- // op: "Fork",
- // args: ["\n", "\n", false],
- // },
- // {
- // op: "To Base",
- // args: [16],
- // },
- // ],
- //},
- //{
- // name: "Example non-error when error was expected",
- // input: "1",
- // expectedError: true,
- // recipeConfig: [
- // {
- // op: "To Base",
- // args: [16],
- // },
- // ],
- //},
- //{
- // name: "Example fail",
- // input: "1\n2\na\n4",
- // expectedOutput: "1\n2\n3\n4",
- // recipeConfig: [
- // {
- // op: "Fork",
- // args: ["\n", "\n", true],
- // },
- // {
- // op: "To Base",
- // args: [16],
- // },
- // ],
- //},
- {
- name: "Fork: nothing",
- input: "",
- expectedOutput: "",
- recipeConfig: [
- {
- op: "Fork",
- args: ["\n", "\n", false],
- },
- ],
- },
- {
- name: "Fork, Merge: nothing",
- input: "",
- expectedOutput: "",
- recipeConfig: [
- {
- op: "Fork",
- args: ["\n", "\n", false],
- },
- {
- op: "Merge",
- args: [],
- },
- ],
- },
- {
- name: "Fork, (expect) Error, Merge",
- input: "1\n2\na\n4",
- expectedError: true,
- recipeConfig: [
- {
- op: "Fork",
- args: ["\n", "\n", false],
- },
- {
- op: "To Base",
- args: [16],
- },
- {
- op: "Merge",
- args: [],
- },
- ],
- },
- ]);
|