Gianfrancoalongi / APLUnit

APLUnit - a library to facilitate Unit Testing and Test Driven Development of code written in Dyalog APL, developed together with Morten Kromberg (CTO Dyalog Ltd)
7 stars 5 forks source link

Replace Class Objects by simpler collections of data structures instead #10

Closed Gianfrancoalongi closed 11 years ago

Gianfrancoalongi commented 11 years ago

Using classes is not really very "functional" as was envisioned. Having succumbed to them for the use of the structure, it would be nice picking up the idea of using something simple instead and not making any modifications through references.

Gianfrancoalongi commented 11 years ago

Only remaining object is the one for coverage configuration. Not sure whether I want to replace this yet, I have to think about it. But, I do know that this seems to be the preferred way for passing configuration value (using Arrays).

Gianfrancoalongi commented 11 years ago

Will now replace the CoverConf by a more generic Test Conf array which contains tuples with names and values. Instead of

CoveConf.Conf ← ⎕NEW UTcover Conf.pages ← '/home/APL/coverage' Conf.cover ← ⊂ '#.Example.timetable_selector' Conf UT.run 'out_of_bound_TEST'

this would now be passed as

C ← ⍬ C ,←('cover_out' '/home/APL/coverage') C,← ('cover_targets' ⊂ '#.Example.timetable_selector') C UT.run 'out_of_bound_TEST'

adding more configuration arguments would now be done by namespacing using key names.

C,← ('skip' ⊂'#.Demo.count_zero_comments_from_no_input_TEST')

It will now be important naming what available configuration parameters exists.

Gianfrancoalongi commented 11 years ago

Registering this like a generic test configuration in the Requirement Specification. This will impact all existing Unit Tests in my system, which uses Coverage!