0.2.0 • Published 4 years ago

testcase-x v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Testcase X

Testcase Cross Checker

NPM

Actually it is a program output cross checker.

But also generate testcases using simeple but highly flexible rules. (By testcase-gen)

Features

  • Generate testcases by simple rules.

  • Check output with customizable preprocessor.

How to Use

1. Install

npm i testcase-x

2. Run Cross Checker

const { writeFileSync, readFileSync } = require("fs");
const { join } = require("path");
const { Checker } = require("../lib");

const c = new Checker()
    .source(readFileSync(join(__dirname, "jacob.c"), "utf8"))
    .source(readFileSync(join(__dirname, "how.c"), "utf8"))
    .genTestcase(require("./testcase.js"))
    .setPreprocessor(require("./preprocessor.js"));

c.go().then((diff) => {
    writeFileSync(join(__dirname, "result.json"), JSON.stringify(diff, null, 2));
});

For More Details, See EXAMPLE.

CLI Tool

cli.png

Install CLI

npm i -g testcase-x

Use CLI

testcase-x --recipe [recipe path] --testcase [testcase path] --output [report path] --preprocessor [preprocessor path] --source [source path] [source path 2] ...
        --recipe (-r): Recipe JS File Path.
        --testcase (-t): Testcase File Path.
        --output (-o): Output File Path.
        --preprocessor (-p): Preprocessor JS File Path.
        --source (-s): Source File Path.
        --version (-V) or (-v): Show version.
0.2.0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago