forked from objectionary/eo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(objectionary#2175): Add one more test
1 parent
1585899
commit 09cd2d8
Showing
2 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
...rg/eolang/parser/packs/optimize/redundant-levels-with-arguments-and-abstract-parents.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
xsls: | ||
- /org/eolang/parser/optimize/abstracts-float-up.xsl | ||
- /org/eolang/parser/optimize/remove-levels.xsl | ||
tests: | ||
- /program/errors[count(*)=0] | ||
# 'main' object | ||
- //o[@name='main'] | ||
- //o[@name='main']/o[@base='sibling' and @name='@'] | ||
- //o[@name='main']/o[not(@base) and @name='arg'] | ||
- //o[@name='main']/o[@base='main$sibling' and @name='sibling'] | ||
- //o[@name='main']/o[@base='main$sibling' and @name='sibling']/o[@base='arg' and not(@name)] | ||
# 'main$sibling' object | ||
- //o[@name='main$sibling' and count(o)=3] | ||
- //o[@name='main$sibling']/o[not(@base) and @name='arg'] | ||
- //o[@name='main$sibling']/o[@base='main$sibling$first' and @name='first'] | ||
- //o[@name='main$sibling']/o[@base='main$sibling$first' and @name='first']/o[@base='arg' and not(@name)] | ||
- //o[@name='main$sibling']/o[@base='main$sibling$second' and @name='second'] | ||
- //o[@name='main$sibling']/o[@base='main$sibling$second' and @name='second']/o[@base='arg' and not(@name)] | ||
# 'main$sibling$first' object | ||
- //o[@name='main$sibling$first' and count(o)=3] | ||
- //o[@name='main$sibling$first']/o[@base='arg' and not(@name)] | ||
- //o[@name='main$sibling$first']/o[@base='.one' and @name='@'] | ||
- //o[@name='main$sibling$first']/o[not(@base) and @name='arg'] | ||
# 'main$sibling$second' object | ||
- //o[@name='main$sibling$second' and count(o)=3] | ||
- //o[@name='main$sibling$second']/o[@base='arg' and not(@name)] | ||
- //o[@name='main$sibling$second']/o[@base='.two' and @name='@'] | ||
- //o[@name='main$sibling$second']/o[not(@base) and @name='arg'] | ||
# Currently the test converts the code from the snippet to: | ||
# ____ | ||
# [arg] > main | ||
# sibling > @ | ||
# main$sibling > sibling | ||
# arg | ||
# | ||
# [arg] > main$sibling | ||
# main$sibling$first > first | ||
# arg | ||
# main$sibling$second > second | ||
# arg | ||
# | ||
# [arg] > main$sibling$first | ||
# arg.one > @ | ||
# | ||
# [] > main$sibling$second | ||
# arg.two > @ | ||
# ____ | ||
eo: | | ||
[arg] > main | ||
sibling > @ | ||
[] > sibling | ||
[] > first | ||
arg.one > @ | ||
[] > second | ||
arg.two > @ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters