Skip to content

Commit b813174

Browse files
committed
add some comments for testcases
Signed-off-by: lifubang <[email protected]>
1 parent 700fded commit b813174

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## ACMDiffer
22
```
3+
This is a core module used by ACMCoder OJ.
4+
It's used to compare the user's out and the test case.
5+
```
6+
7+
## How to make and test
8+
```
9+
go test github.com/acmcode/differ/tool
310
make
411
./acmdiffer testdata/step.judger/user.out testdata/step.judger/data.out false false
512
./acmdiffer testdata/step.judger/user.out testdata/step.judger/datav5.out false false
@@ -17,4 +24,18 @@ userOut: user's output file
1724
dataOut: the test case file
1825
diffIgnoreHead: ignore the first line when comparing the contents
1926
strictMode: whether ignore the space and enter key or not when comparing the contents
20-
```
27+
```
28+
29+
## Special test cases
30+
```
31+
TestDiffOutV2 is to ignore the space when comparing
32+
TestDiffOutV5 is to ignore the enter key when comparing
33+
Welcome some other special test cases.
34+
```
35+
36+
## TODO
37+
```
38+
implement the strict mode
39+
```
40+
41+
Welcome send issues or PRs.

tool/differ_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func TestDiffOutV1(t *testing.T) {
3737
}
3838
}
3939

40+
// TestDiffOutV2 is to ignore the space when comparing
4041
func TestDiffOutV2(t *testing.T) {
4142
path, err := filepath.Abs(".")
4243
if err != nil {
@@ -85,6 +86,7 @@ func TestDiffOutV4(t *testing.T) {
8586
}
8687
}
8788

89+
// TestDiffOutV5 is to ignore the enter key when comparing
8890
func TestDiffOutV5(t *testing.T) {
8991
path, err := filepath.Abs(".")
9092
if err != nil {

0 commit comments

Comments
 (0)