Closed Entomy closed 5 years ago
Oh, also, I had to add references through submodules because, despite the obvious advantages, the community has not yet developed a package manager for Ada. There's two active attempts at this, but neither is complete yet, so submodules seem to be the most reasonable approach in the meantime.
Fixed to use 3 space indentation.
License attribution should be correct everywhere now. I've put both names where your original code was but was reorganized or adjusted.
The way I would personally go about testing CLI stuff, would be to generate the output, and store inside a string, and then test against vague regexes. Due to the nature of this project, testing is going to feel a little weird.
Yeah, this was your approach before. I'll either need to do this or intercept IO. I'll figure it out after work.
The way I would personally go about testing CLI stuff, would be to generate the output, and store inside a string, and then test against vague regexes. Due to the nature of this project, testing is going to feel a little weird.
I got output interception working although I haven't pushed it yet. While I did some validation, I'm also exhausted and will verify this works properly in the morning. Once it does I'll add the agen tests.
Anyway, apart from that, some very minor issues, let me know what you think, and we can proceed to merge this!
I'd say merge after I get the tests complete.
Ping me when you're ready btw.
I'd say it's fine now. I'm scattered between projects but I did manually verify what I've done here. I'll add more tests when I've got the updates to the testing framework done.
Thanks!
When I did some restructuring I removed comment stubs as this should be optional behavior. This reintroduces those stubs through overloads with a Boolean parameter for the
Print_Function
andPrint_Procedure
routines. (I specifically did not implement these as default parameters because the value is inserted in the calling code, which causes some well documented maintainability problems). This isn't currently callable from the command line as I need to work out a good method of getting flags out of the command line when certain actions also eat the entire command line args.Additionally I've added a very basic unit test. I chose to go with my own framework as overwhelming Agen is doing a lot of stuff that isn't typically testable or easily testable with the common "compare value against function call result" approach. There's two major issues. Certain things like the
Parameter
type shouldn't expose their fields publicly. Because of the approach JUnit style tests take, it would have to be public to be callable. Adding addition code only to the public API only to support unit tests is not a good idea, imo. Because of the approach Testing takes an assertion can be created through a child package which can still see, and therefore compare, these private fields without exposing them. Also given the large amount of console I/O and file generation, testing for these is typically quite awkward. I can add the necessary extensions to support this to my framework far quicker than I could add them to AUnit.