Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Enable all necessary tests #219

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions src/test/eo/org/eolang/hamcrest/arrays-matchers-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -27,63 +27,49 @@
+tests
+version 0.0.0

# @todo #212:30min Enable the tests when eo-collections 0.10.0 is in objectionary. Need to enable
# next tests that were disabled because of conflict with eo-collections 0.10.0:
# has-items-int-test, contains-all-of-string-failed, contains-any-of-string-failed,
# starts-with-any-of-string-failed, all-of-close-to-failed-output,
# any-of-number-test-failed-output, all-of-several-failed-output, starts-with-all-of-string-failed,
# ends-with-all-of-string-failed, all-of-number-test-failed-output, ends-with-any-of-string-failed,
# arrays-failed-output, any-of-several-failed-output, nested-has-items, arrays-each-items,
# arrays-each-items-complex-case, has-item-string-test, has-item-float-test
[] > has-item-int-test
assert-that > @
* 1 2 3
$.has-item
$.equal-to 2

[] > has-item-string-test
assert-that > res
assert-that > @
* "1" "2" "3"
$.has-item
$.equal-to "3"
nop > @

[] > has-item-float-test
assert-that > res
assert-that > @
* 1.0 44.0
$.has-item
$.is
$.greater-than 10.0
nop > @

[] > has-items-int-test
assert-that > res
assert-that > @
* 99 101
$.has-items
$.greater-than 100
nop > @

[] > nested-has-items
assert-that > res
assert-that > @
* "a" "b" "c" "d"
$.has-items
$.equal-to "c"
nop > @

[] > arrays-each-items
assert-that > res
assert-that > @
* 1 2
$.array-each
$.equal-to 1
$.equal-to 2
nop > @

[] > arrays-each-items-complex-case
assert-that > res
assert-that > @
* "vice" "c" -5 ((number 13).as-float)
$.array-each
$.equal-to "vice"
$.equal-to "c"
$.less-than 0
$.greater-than 10.0
nop > @
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@
$.all-of
$.equal-to 1
"all of numbers conditions"
assert-that > res
assert-that > @
suggestion
$.equal-to "all of numbers conditions\nExpected: <1> equal to value\n but: a value was <100>"
nop > @

[] > all-of-several-failed-output
[] > suggestion
Expand All @@ -52,10 +51,9 @@
$.greater-than 100
$.less-than 2
"all of conditions"
assert-that > res
assert-that > @
suggestion
$.equal-to "all of conditions\nExpected: <1> equal to value and <100> less than value and <2> greater than value\n but: a value was <3>"
nop > @

[] > all-of-close-to-failed-output
[] > suggestion
Expand All @@ -68,7 +66,6 @@
$.greater-than 100.0
$.close-to 20.0 2.2
"all of conditions"
assert-that > res
assert-that > @
suggestion
$.equal-to "all of conditions\nExpected: <1.0> equal to value and <100.0> less than value and a float value within <20.0> of <2.2>\n but: a value was <42.0>"
nop > @
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@
150.minus 50
$.any-of
$.equal-to 1
assert-that > res
assert-that > @
suggestion
$.equal-to "\nExpected: <1> equal to value\n but: a value was <100>"
nop > @

[] > any-of-several-failed-output
[] > suggestion
Expand All @@ -46,10 +45,9 @@
$.equal-to 1
$.greater-than 100
$.less-than -6
assert-that > res
assert-that > @
suggestion
$.equal-to "\nExpected: <1> equal to value or <100> less than value or <-6> greater than value\n but: a value was <3>"
nop > @

# @todo #149:30min To remove this nop object
# when this test will be stable. To do that we
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
$.array-each
$.equal-to 1
$.equal-to 3
assert-that > res
assert-that > @
suggestion
$.contains-string "\nExpected: <1> equal to value and <3> equal to value\n but: mismatches:"
nop > @
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@
$.any-of
$.is-substring "2"
"is-substring"
assert-that > res
assert-that > @
suggestion
$.equal-to "is-substring\nExpected: string contains: <2>\n but: a value was <Hello>"
nop > @

[] > contains-all-of-string-failed
[] > suggestion
Expand All @@ -56,11 +55,6 @@
$.is-substring "2"
$.is-substring "happy"
"is-substring"
assert-that > res
assert-that > @
suggestion
$.equal-to "is-substring\nExpected: string contains: <2> and string contains: <happy>\n but: a value was <so sad>"
nop > @




Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@
$.contains-string "世"
$.string-ends-with "ет"
"ends-with"
assert-that > res
assert-that > @
suggestion
$.equal-to "ends-with\nExpected: string contains: <Привет> and string contains: <世> and string ends with: <ет>\n but: a value was <Привет, 世界>"
nop > @

[] > ends-with-all-of-string-failed
[] > suggestion
Expand All @@ -59,7 +58,6 @@
$.string-ends-with "dddd"
$.contains-string "界"
"ends-with"
assert-that > res
assert-that > @
suggestion
$.equal-to "ends-with\nExpected: string contains: <Привет> or string ends with: <dddd> or string contains: <界>\n but: a value was <ffffffffffff>"
nop > @
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@
$.contains-string "世"
$.string-starts-with "ет"
"starts-with"
assert-that > res
assert-that > @
suggestion
$.equal-to "starts-with\nExpected: string contains: <Привет> and string contains: <世> and string starts with: <ет>\n but: a value was <Привет, 世界>"
nop > @

[] > starts-with-all-of-string-failed
[] > suggestion
Expand All @@ -59,7 +58,6 @@
$.string-starts-with "dddd"
$.contains-string "界"
"starts-with"
assert-that > res
assert-that > @
suggestion
$.equal-to "starts-with\nExpected: string contains: <Привет> or string starts with: <dddd> or string contains: <界>\n but: a value was <ffffffffffff>"
nop > @
Loading