Skip to content

Commit

Permalink
[chore] update test suite format
Browse files Browse the repository at this point in the history
  • Loading branch information
biojppm committed Dec 26, 2021
1 parent 7481b5c commit d37f035
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 181 deletions.
4 changes: 2 additions & 2 deletions changelog/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
### Fixes
- Take block literal indentation as relative to current indentation level, rather than as an absolute indentation level ([PR #176](https://github.com/biojppm/rapidyaml/pull/176)):
- Take block literal indentation as relative to current indentation level, rather than as an absolute indentation level ([PR #178](https://github.com/biojppm/rapidyaml/pull/178)):
```yaml
foo:
- |
child0
- |2
child2 # indentation is 4, not 2
```
- Fix parsing when seq member maps start without a key ([PR #176](https://github.com/biojppm/rapidyaml/pull/176)):
- Fix parsing when seq member maps start without a key ([PR #178](https://github.com/biojppm/rapidyaml/pull/178)):
```yaml
# previously this resulted in a parse error
- - : empty key
Expand Down
6 changes: 3 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ if(RYML_TEST_SUITE)
set(tsdir ${ed}/yaml-test-suite)
c4_download_remote_proj(yaml-test-suite tsdir
GIT_REPOSITORY https://github.com/yaml/yaml-test-suite
GIT_TAG ed99dd31187f00d729fe160a7658f6f29c08f80b) #master)
set(suite_dir ${tsdir}/test)
GIT_TAG bcd49a2d4919c1b1ac3b9d6e5ebe6b140b5089e3) #master)
set(suite_dir ${tsdir}/src)
if(NOT EXISTS ${suite_dir})
c4_err("cannot find yaml-test-suite at ${suite_dir} -- was there an error downloading the project?")
endif()
Expand Down Expand Up @@ -170,7 +170,7 @@ if(RYML_TEST_SUITE)
add_test(NAME ryml-test-suite-${name}-in_json COMMAND ${tgt} --gtest_filter=*/in_json* ${suite_dir}/${tml_file})
endfunction()

file(GLOB suite_cases RELATIVE "${suite_dir}" "${suite_dir}/*.tml")
file(GLOB suite_cases RELATIVE "${suite_dir}" "${suite_dir}/*.yaml")
foreach(case ${suite_cases})
ryml_add_test_from_suite(${case})
endforeach()
Expand Down
4 changes: 2 additions & 2 deletions test/test_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,13 @@ void YmlTestCase::_test_recreate_from_ref(CaseDataLineEndings *cd)
}

//-----------------------------------------------------------------------------
TEST_P(YmlTestCase, parse_unix_using_ryml)
TEST_P(YmlTestCase, parse_unix)
{
SCOPED_TRACE("unix style");
_test_parse_using_ryml(&d->unix_style);
}

TEST_P(YmlTestCase, parse_windows_using_ryml)
TEST_P(YmlTestCase, parse_windows)
{
SCOPED_TRACE("windows style");
_test_parse_using_ryml(&d->windows_style);
Expand Down
Loading

0 comments on commit d37f035

Please sign in to comment.