-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: added more testcases #32
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @Pumuckl0x520,
first of all, thanks for providing so many test cases.
Can you generally please enhance your testcases to the following:
-
Try to focus onto a topic for a set of testcases. E.g. operators, variable conversions or calculations.
-
Many of your examples calculate something, but then just compare the result. It would be nice to first calculate, check results, and afterwards do several tests with these values.
Here's an example:
#SET:hund:"Hund" + "Leine" hund #EXPECT:"HundLeine" #SET:katze:"Katze" + "Fisch" katze #EXPECT:"KatzeFisch" hund == katze #EXPECT:False hund == hund #EXPECT:True hund > katze #EXPECT:False hund < katze #EXPECT:True
Be creative with these tests!
-
Please try to avoid using german identifiers and values, so
dog
andcat
would be better. -
You can name files to optimally describe the topic they are investigating. Here's an example test suite you might use for inspiration: https://github.com/tokay-lang/tokay/tree/main/tests, e.g. there could be a
str.lgx
,str_len.lgx
,str_upper.lgx
etc.
x >= 10 and x < 20 | ||
#EXPECT:False | ||
|
||
a and not b | ||
#EXPECT:None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide further tests, also when variable x
, a
or b
is set?
|
||
a and not b | ||
#EXPECT:None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Calculate leap years |
str(int("42")) == "42" | ||
#EXPECT:True | ||
|
||
"code" + str(42) == "code42" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"code" + str(42) == "code42" | |
"code" + 42 == "code42" |
No description provided.