Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pumuckl4630
Copy link

No description provided.

Copy link
Member

@phorward phorward left a 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:

  1. Try to focus onto a topic for a set of testcases. E.g. operators, variable conversions or calculations.

  2. 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!

  3. Please try to avoid using german identifiers and values, so dog and cat would be better.

  4. 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.

Comment on lines +10 to +14
x >= 10 and x < 20
#EXPECT:False

a and not b
#EXPECT:None
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Calculate leap years

str(int("42")) == "42"
#EXPECT:True

"code" + str(42) == "code42"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"code" + str(42) == "code42"
"code" + 42 == "code42"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants