Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

We need to add few unit tests to ensure the functionality not broken with PR #27

Open
birojnayak opened this issue May 17, 2023 · 6 comments
Assignees

Comments

@birojnayak
Copy link

**Is your feature request related to a problem? **
As a first step towards CI/CD for every check in, we need to establish some unit tests for each components here.

**Is your feature request related to another COBOL dialect? **
A clear and concise description of what the feature is, and which COBOL dialect currently implements it.

**If the feature request is related to another COBOL dialect: Is the requested feature compatible with our current implementation and does it conform to the latest COBOL standard? **

Describe the solution you'd like
I would like us to create a folder Tests and have unit test projects to address any bug injection to improve the code quality.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@KTSnowy
Copy link
Member

KTSnowy commented May 17, 2023

I would like us to create a folder Tests and have unit test projects to address any bug injection to improve the code quality.

We could create a new testing package in the Libraries directory (Libraries/Otterkit.Testing), what do you think?

I say testing package so that we can keep it separate from the compiler itself, and use it to test other parts of Otterkit.

The libraries directory has both the runtime library and decimal arithmetic library, those could also benefit from automated testing for PRs: https://github.com/otterkit/otterkit/tree/main/Libraries

@birojnayak
Copy link
Author

birojnayak commented May 18, 2023

Generally the test package folder are kept under each project and eventually when we set up each CI/CD we will run those project. E:g:- here and here . See if you can keep like that, we might restructure in future.

@KTSnowy
Copy link
Member

KTSnowy commented May 18, 2023

I'll add test folders for each. Should we have one Tests folder for the whole compiler, or one folder for each part of it (Tokenizer, Analyzer, etc.)?

Oh also, I'll open a new issue on manual memory allocation. COBOL has the ALLOCATE and FREE statements, as well as ADDRESS OF identifiers. We need to figure out the memory allocation method for these, and how to get the address of a data item (C# doesn't allow this, I think).

@KTSnowy KTSnowy self-assigned this May 18, 2023
@birojnayak
Copy link
Author

I'll add test folders for each. Should we have one Tests folder for the whole compiler, or one folder for each part of it (Tokenizer, Analyzer, etc.)?

One folder for each part of it.. so that we will know which part tests failed...

@KTSnowy
Copy link
Member

KTSnowy commented May 19, 2023

Hey @birojnayak, GitHub doesn't let me commit empty folders, so I should probably add something in them to add the folders to the repo.

Which testing framework would you recommend for us to use?

@GitMensch
Copy link

You may opt to autofonce.

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

No branches or pull requests

3 participants