Skip to content

Commit

Permalink
Fix missing "and" warnings (#7036)
Browse files Browse the repository at this point in the history
* init commit innit

* updates

* removed comma for only lists of two

* Remove changes from feature branch.

---------

Co-authored-by: Moderocky <[email protected]>
Co-authored-by: sovdee <[email protected]>
  • Loading branch information
3 people authored Sep 21, 2024
1 parent 96dce83 commit c11551f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ test "EffHealth item mutation fix":

set {_item1} to diamond sword with damage 100
set {_item2} to diamond with damage 10
repair {_item1}, {_item2}
repair {_item1} and {_item2}
assert {_item1} is diamond sword with damage 0 with "{_item1} was incorrectly repaired"
assert {_item2} is diamond with "{_item2} was no longer a diamond"
14 changes: 7 additions & 7 deletions src/test/skript/tests/syntaxes/conditions/CondCompare.sk
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ test "compare":
assert 1 is greater than or equal to 0 and 1 with "Number is not greater than or equal to two smaller/equal numbers"
assert 1 is less than or equal to 1 and 2 with "Number is not smaller than or equal to two greater/equal numbers"

assert 1, 2 is 1, 2 with "direct list comparison of equal numbers failed"
assert 1, 2, 3 is not 1, 2 with "direct list comparison of non-equal numbers succeeded"
assert 1, 2 is 1, 2, or 3 with "comparison between AND list of numbers and OR list of superset of numbers failed"
assert 1, 2, 3 is 1 or 2 to fail with "comparison between AND list of numbers and OR list of subset of numbers succeeded"
assert 1 and 2 is 1 and 2 with "direct list comparison of equal numbers failed"
assert 1, 2, and 3 is not 1 and 2 with "direct list comparison of non-equal numbers succeeded"
assert 1 and 2 is 1, 2, or 3 with "comparison between AND list of numbers and OR list of superset of numbers failed"
assert 1, 2, and 3 is 1 or 2 to fail with "comparison between AND list of numbers and OR list of subset of numbers succeeded"

assert 1, 2, 3 is greater than -1, -2, -3 with "Numbers are not larger than smaller numbers"
assert 1, 2, 3 is less than 5, 6, 7 with "Numbers are not smaller than larger numbers"
assert 1, 2, 3 is between -1, 1 and 3, 3.5 with "Numbers are not between smaller/equal numbers and larger/equal numbers"
assert 1, 2, and 3 is greater than -1, -2, and -3 with "Numbers are not larger than smaller numbers"
assert 1, 2, and 3 is less than 5, 6, and 7 with "Numbers are not smaller than larger numbers"
assert 1, 2, and 3 is between (-1 and 1) and (3 and 3.5) with "Numbers are not between smaller/equal numbers and larger/equal numbers"

assert 10 is between 5 and 15 with "Number isn't between smaller and larger"
assert 10 is between 9 and 11 with "Number isn't between smaller and larger"
Expand Down
6 changes: 3 additions & 3 deletions src/test/skript/tests/syntaxes/expressions/ExprRepeat.sk
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ test "repeat expression":
then:
assert false is true with "ExprRepeat Multi - 1) 'aa' and 'b' repeated 3 times is not 'aaaaaa' and 'bbb'"

set {_strings::*} to "aa", "b"
set {_strings::*} to "aa" and "b"
set {_strings::*} to {_strings::*} repeated {_repeat} times
if any:
{_strings::1} is not "aaaaaa"
{_strings::2} is not "bbb"
then:
assert false is true with "ExprRepeat Multi - 2) 'aa' and 'b' repeated 3 times is not 'aaaaaa' and 'bbb'"

set {_strings::*} to "aa", "b"
set {_strings::*} to "aa" and "b"
set {_strings::*} to {_strings::*} repeated 3 times
if any:
{_strings::1} is not "aaaaaa"
{_strings::2} is not "bbb"
then:
assert false is true with "ExprRepeat Multi - 3) 'aa' and 'b' repeated 3 times is not 'aaaaaa' and 'bbb'"

set {_strings::*} to "aa", "b" repeated {_repeat} times
set {_strings::*} to "aa" and "b" repeated {_repeat} times
if any:
{_strings::1} is not "aaaaaa"
{_strings::2} is not "bbb"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
test "string cases":
assert caseEquals("Oops!" in lowercase, "oops!") is true with "lowercase failed"
assert caseEquals("Oops!" in uppercase, "OOPS!") is true with "uppercase failed"
assert caseEquals(capitalised "Oops!", "OOPS!") is true with "capitalised failed"
assert caseEquals((capitalised "Oops!"), "OOPS!") is true with "capitalised failed"
assert caseEquals("hellO i'm steve!" in proper case, "HellO I'm Steve!") is true with "lenient proper case failed"
assert caseEquals("hellO i'm steve!" in strict proper case, "Hello I'm Steve!") is true with "strict proper case failed"
assert caseEquals("spAwn neW boSs ()" in camel case, "spAwnNeWBoSs()") is true with "lenient camel case failed"
Expand Down

0 comments on commit c11551f

Please sign in to comment.