Skip to content

Commit 3be12a7

Browse files
authored
Fix spells (#18)
1 parent c6dd2ab commit 3be12a7

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This tool enables [unit testing](https://en.wikipedia.org/wiki/Unit_testing) for
2626
- [Build CA65 project with debug option](#Build-CA65-project-with-debug-option)
2727
- [Create unit test](#Create-unit-test)
2828
- [Run test](#Run-test)
29-
- [Test scinario examples](#Test-scinario-examples)
29+
- [Test scenario examples](#Test-scenario-examples)
3030
- [Dependencies](#Dependencies)
3131

3232
## Basic design
@@ -175,7 +175,7 @@ flowchart LR;
175175
B(Binary);
176176
D(Debug information);
177177
V[[Visual Studio Code]];
178-
S(Test scinario);
178+
S(Test scenario);
179179
U[[6502 Unit Test executor]];
180180
R[(Test result)];
181181
L[(Test coverage)];
@@ -199,7 +199,7 @@ Build your 6502 project using [CA65 assembler](https://cc65.github.io/doc/ca65.h
199199

200200
### Create unit test
201201

202-
Create test scinario files containing the three key items in JSON format:
202+
Create test scenario files containing the three key items in JSON format:
203203

204204
- _Test target_
205205
the starting address of the test procedure
@@ -210,7 +210,7 @@ Create test scinario files containing the three key items in JSON format:
210210

211211
#### JSON Schema file
212212

213-
The tool also provides a [JSON Schema](https://json-schema.org/) document that makes it easy to create test scinario files.
213+
The tool also provides a [JSON Schema](https://json-schema.org/) document that makes it easy to create test scenario files.
214214

215215
If you use [Visual Studio Code](https://code.visualstudio.com/), it will tell you about formatting error and element completion candidates based on JSON Schema without any extensions.
216216

@@ -219,14 +219,14 @@ If you use [Visual Studio Code](https://code.visualstudio.com/), it will tell yo
219219
Run the tool with the prepared debug information file and test scenario file:
220220

221221
```
222-
6502_tester -d <debug information> -t <test scinario>
222+
6502_tester -d <debug information> -t <test scenario>
223223
```
224224

225225
Test coverage can also be measured.
226226
Both the coverage file and the segment names used in the debug information file must be specified to enable.
227227

228228
```
229-
6502_tester -d <debug information> -t <test scinario> -c <coverage> -s <segment names>
229+
6502_tester -d <debug information> -t <test scenario> -c <coverage> -s <segment names>
230230
```
231231

232232
You can find all command line arguments in help:
@@ -243,7 +243,7 @@ You can find all command line arguments in help:
243243
-d[DEBUG], --debug=[DEBUG] Specify the path of the debug
244244
information file used for testing.
245245
-t[TEST], --test=[TEST] (REQUIRED)
246-
Specify the path of the test scinario
246+
Specify the path of the test scenario
247247
file.
248248
-c[COVERAGE],
249249
--coverage=[COVERAGE] Specify the path of the coverage file.
@@ -263,7 +263,7 @@ You can find all command line arguments in help:
263263
Some options can be specified either as command line arguments or test scenario file ([See example](https://github.com/AsaiYusuke/6502_test_executor/blob/master/example/test/ok/customize.configurations.test.json)).
264264
If both are specified, the values in the test scenario file are adopted.
265265

266-
## Test scinario examples
266+
## Test scenario examples
267267

268268
### Register conditions
269269

include/test/test.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class test
1818
args_parser *args;
1919
debug_info *debug;
2020
emulation_devices *device;
21-
vector<json> test_scinarios;
21+
vector<json> test_scenarios;
2222

2323
json read_json(string path);
2424
void traverse(emulation_devices *device, test_total_result *total_result, json test_target, json test_template, json testcase, string path);

src/args_parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ args_parser::args_parser(int argc, char *argv[])
88
args::ArgumentParser parser("6502 test executor");
99
args::HelpFlag help(parser, "HELP", "Show this help menu.", {'h', "help"});
1010
debug_file_path = new args::ValueFlag<string>(parser, "DEBUG", "Specify the path of the debug information file used for testing.", {'d', "debug"});
11-
test_file_path = new args::ValueFlag<string>(parser, "TEST", "(REQUIRED)\nSpecify the path of the test scinario file.", {'t', "test"}, args::Options::Required);
11+
test_file_path = new args::ValueFlag<string>(parser, "TEST", "(REQUIRED)\nSpecify the path of the test scenario file.", {'t', "test"}, args::Options::Required);
1212

1313
coverage_file_path = new args::ValueFlag<string>(parser, "COVERAGE", "Specify the path of the coverage file.", {'c', "coverage"});
1414
coverage_segment_names = new args::ValueFlag<string>(parser, "SEGMENT", "Specify the segment names for coverage.", {'s', "segment"});

src/test/test.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,42 +34,42 @@ test::test(args_parser *_args)
3434
{
3535
args = _args;
3636

37-
json test_scinario = read_json(args->get_test_path());
37+
json test_scenario = read_json(args->get_test_path());
3838

39-
debug = new debug_info(args, test_scinario["config"]);
39+
debug = new debug_info(args, test_scenario["config"]);
4040

41-
if (test_detect::is_project(test_scinario))
42-
for (auto test_entry : test_scinario["tests"])
41+
if (test_detect::is_project(test_scenario))
42+
for (auto test_entry : test_scenario["tests"])
4343
{
4444
if (test_detect::is_file_reference(test_entry))
4545
{
4646
filesystem::path test_path = args->get_test_path();
4747
test_entry.merge_patch(read_json(test_path.parent_path() / test_entry["file"]));
4848
}
4949

50-
test_scinarios.push_back(value_convert::parse_all_variable(
50+
test_scenarios.push_back(value_convert::parse_all_variable(
5151
test_entry["definitions"]["primitives"]["value"], test_entry));
5252
}
5353
else
54-
test_scinarios.push_back(value_convert::parse_all_variable(
55-
test_scinario["definitions"]["primitives"]["value"], test_scinario));
54+
test_scenarios.push_back(value_convert::parse_all_variable(
55+
test_scenario["definitions"]["primitives"]["value"], test_scenario));
5656
}
5757

5858
bool test::execute()
5959
{
6060
test_total_result total_result{args};
6161
int num_cases = 0;
6262

63-
for (auto test_scinario : test_scinarios)
63+
for (auto test_scenario : test_scenarios)
6464
{
65-
num_cases += test_scinario["cases"].size();
66-
device = new emulation_devices(args, test_scinario["config"], debug);
65+
num_cases += test_scenario["cases"].size();
66+
device = new emulation_devices(args, test_scenario["config"], debug);
6767
traverse(
6868
device,
6969
&total_result,
70-
test_scinario["target"],
71-
test_scinario["definitions"]["templates"],
72-
test_scinario["cases"],
70+
test_scenario["target"],
71+
test_scenario["definitions"]["templates"],
72+
test_scenario["cases"],
7373
"");
7474
}
7575

0 commit comments

Comments
 (0)