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

Enhance test_lexer.py with Tests for New Bitwise Operators and Data Types #67

Closed
wants to merge 4 commits into from

Conversation

Raghav-2903
Copy link
Contributor

Description:

This PR enhances the test_lexer.py file by adding new test cases to cover the recently added support for bitwise operators and additional data types in the lexer. The changes ensure that the lexer correctly identifies and tokenizes the following elements:

Added Test Cases:

  • Bitwise Operators:

    • & (Bitwise AND)
    • | (Bitwise OR)
    • ^ (Bitwise XOR)
    • ~ (Bitwise NOT)
    • << (Bitwise Shift Left)
    • >> (Bitwise Shift Right)
  • Assignment Operations for Bitwise Operators:

    • &= (Assignment AND)
    • |= (Assignment OR)
    • ^= (Assignment XOR)
    • %= (Assignment Modulus)
    • <<= (Assignment Shift Left)
    • >>= (Assignment Shift Right)
  • New Data Types:

    • double (Double Data Type)
    • unsigned int (Unsigned Integer Data Type)
    • const (Type Qualifier)

Purpose of the Changes:
These updates ensure that the lexer correctly processes and identifies tokens related to bitwise operations and additional data types. This is critical for expanding the language's capabilities and ensuring robust parsing of shader code.

Testing:
The new test cases have been added to validate the lexer’s functionality with these operators and data types. The tests were executed, and all passed, confirming that the lexer is functioning as expected after the changes.

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.

1 participant