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

No tests for variables #433

Open
b1ek opened this issue Aug 31, 2024 · 4 comments
Open

No tests for variables #433

b1ek opened this issue Aug 31, 2024 · 4 comments

Comments

@b1ek
Copy link
Member

b1ek commented Aug 31, 2024

I just noticed that none of the validity tests check if variables are behaving correctly.

some ideas for tests:

  1. redefinition of variables
    let var = "abc"
    let var = 123
    
  2. global ids, especially that when variable is accessed it uses the same id as it was when it was assigned
  3. a ton of other stuff, like accessing a variable from another scope and whatnot
@KrosFire
Copy link
Member

I think that we need a list of every kind of statement and expression and check od we have tests for it

@Mte90
Copy link
Member

Mte90 commented Sep 2, 2024

In validity there are a lot of tests but I don't think that there is one like this.

@Ph0enixKM
Copy link
Member

@KrosFire Do you mean some kind of features.txt so that we can keep it as a checklist for all of the features that Amber currently has?

@KrosFire
Copy link
Member

KrosFire commented Sep 5, 2024

@Ph0enixKM I'm thinking of code coverage. Some anayltics tool to show us what we're missing in tests

@Mte90 Mte90 added hacktoberfest good first issue Good for newcomers labels Oct 2, 2024
@Ph0enixKM Ph0enixKM added this to the Amber 0.3.6-alpha milestone Oct 4, 2024
Mte90 added a commit to Mte90/Amber that referenced this issue Oct 28, 2024
b1ek pushed a commit that referenced this issue Nov 6, 2024
* feat(test): for variables, #433

* feat(test): variables

* Update src/tests/validity/variable_ref_operators.ab

Co-authored-by: Phoenix Himself <pkaras.it@gmail.com>

* feat(tests): review

* feat(tests): review

* feat(tests): review

* feat(tests): review

* feat(test): removing as we already have

---------

Co-authored-by: Phoenix Himself <pkaras.it@gmail.com>
@Ph0enixKM Ph0enixKM removed this from the Amber 0.3.6-alpha milestone Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants