Skip to content

Commit 7a9624c

Browse files
committed
Remove unecessary --has-brute param
1 parent 0289cd6 commit 7a9624c

File tree

2 files changed

+15
-23
lines changed

2 files changed

+15
-23
lines changed

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ You can access any of the model fields in the template, and make changes accordi
130130
- This one is usefull if you are stuck on a problem, your solution gets `WA` and
131131
you can't figure out a testcase that will make it break.
132132
- If you know how to write a brute force solution to the problem, egor can help
133-
with running the that solution that you know gives the correct answer against
133+
with running the solution that you know gives the correct answer against
134134
your (optimal) solution, and figure out when will they differ.
135135

136136
### Steps to make a batch test
137-
- Create a batch configuration
137+
- Create a batch directory structure:
138138

139139
```
140-
egor batch create --has-brute
140+
egor batch create
141141
```
142142

143143
Running this will create 3 additional files:
@@ -153,12 +153,14 @@ Running this will create 3 additional files:
153153
Once all the files are filled according to their purpose, you can start running
154154
your batch test using
155155

156+
- Run the batch test:
157+
156158
```
157-
egor batch run --tests=10
159+
egor batch run --tests=100
158160
```
159161

160162
the parameter `--tests` tells egor how many times it should run your code,
161-
a `100` is a good start.
163+
a `100` is a good start (and it's the default).
162164

163165
If you can't find a failing testcase after this, you can increase the
164166
`--tests` parameter, or change the generation strategy, (ex: try bigger

commands/batch.go

+8-18
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,15 @@ func CreateBatch(context *cli.Context) error {
6161
if err = compiledTemplate.Execute(genFile, configuration); err != nil {
6262
return err
6363
}
64-
if context.Bool("has-brute") {
65-
randH := path.Join(cwd, RandName)
66-
// Create the rand.h file
67-
if err = ioutil.WriteFile(randH, []byte(templates.RandH), 0755); err != nil {
68-
return err
69-
}
64+
randH := path.Join(cwd, RandName)
65+
// Create the rand.h file
66+
if err = ioutil.WriteFile(randH, []byte(templates.RandH), 0755); err != nil {
67+
return err
68+
}
7069

71-
bruteH := path.Join(cwd, BruteName)
72-
if err = ioutil.WriteFile(bruteH, []byte(templates.BruteH), 0755); err != nil {
73-
return err
74-
}
70+
bruteH := path.Join(cwd, BruteName)
71+
if err = ioutil.WriteFile(bruteH, []byte(templates.BruteH), 0755); err != nil {
72+
return err
7573
}
7674
// Update the metadata
7775
fileName := path.Join(cwd, configuration.ConfigFileName)
@@ -283,14 +281,6 @@ var BatchCommand = cli.Command{
283281
Aliases: []string{"c"},
284282
Usage: "Create the template for the batch test",
285283
Action: CreateBatch,
286-
Flags: []cli.Flag{
287-
&cli.BoolFlag{
288-
Name: "has-brute",
289-
Usage: "Does this solution have a brute force solution",
290-
Aliases: []string{"b"},
291-
Value: true,
292-
},
293-
},
294284
},
295285
{
296286
Name: "run",

0 commit comments

Comments
 (0)