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

Implement Unit Tests for existing code #33

Open
Benzammour opened this issue Oct 21, 2022 · 0 comments
Open

Implement Unit Tests for existing code #33

Benzammour opened this issue Oct 21, 2022 · 0 comments
Labels
code-quality This should increase the code quality

Comments

@Benzammour
Copy link
Owner

Benzammour commented Oct 21, 2022

We should aim to get our current code base to a coverage above 80% (chosen arbitrarily, based on sonarcloud's default configuration).
To do so we should aim to get our files with 0% coverage to something significantly higher than this.
As of now, these would be:

file unit tests PR
cli.c #35
log.c #39
rom.c #40
mmu.c #41

Something we might have to look into more is

  • lcd.c

as this will contain most of our SDL code.
Something interesting may be mocking the user input in order to test various configurations while running headless.
However, I don't know if this is doable in a concise way in C.

Resources:

@marcluque marcluque added the code-quality This should increase the code quality label Oct 21, 2022
marcluque added a commit that referenced this issue Oct 23, 2022
Introduces unit tests for mmu.
This addresses a todo of #33.
marcluque added a commit that referenced this issue Oct 23, 2022
Introduce unit tests for rom.
Addresses a todo from #33.
marcluque added a commit that referenced this issue Oct 23, 2022
Introduce unit tests for rom.
Addresses a todo from #33.
marcluque added a commit that referenced this issue Oct 23, 2022
Introduce unit tests for already existing code.
This advances progress on #33.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality This should increase the code quality
Projects
None yet
Development

No branches or pull requests

2 participants