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

cpu_test.rs - Possibly compress repeating tests. #2

Open
Spalynx opened this issue Jan 4, 2019 · 0 comments
Open

cpu_test.rs - Possibly compress repeating tests. #2

Spalynx opened this issue Jan 4, 2019 · 0 comments

Comments

@Spalynx
Copy link
Owner

Spalynx commented Jan 4, 2019

The codebase has many tests that provide the same functionality as another test, but it works on a different opcode/register. This is because many of the low-level opcodes have similar functionalities to another, but operate on different values.
Example:

  • STA / STX / STY - All three store their respective values in exactly the same way, and are therefore copy paste jobs. Same goes for testOP_ST-.

The opcodes have use in separate functions, but the tests dont /necissarily/.
Therefore, a possible solution would be to compress the similar tests into one test_OP, but this might affect readability.

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

No branches or pull requests

1 participant