hurufu / nexoid-ed

Nexo 4 Executable Diagrams
GNU Affero General Public License v3.0
0 stars 0 forks source link

Use libctl for code testing #2

Closed hurufu closed 3 years ago

hurufu commented 3 years ago

Right now, analyze applicability of libctl as a proper solution for testing, eg. by writing 1 or 2 tests.

hurufu commented 3 years ago

After some experimenting I'm not sure if it's a good solution as a configuration framework for functional testing.

hurufu commented 3 years ago

Points that make libctl not readily usable as a configuration system for functional tests:

  1. No support for optional class properties
  2. No support for bitfields (can be simulated as booleans)
  3. A lot of typing even compared to C :)
  4. Need to create adapters from C structures generated by libctl to structures defined in types.h
  5. No BCD type
  6. Need to learn guile scheme (I actually want to learn it, but I don't think re-implementing libctl is a good task given how little time I have)

No builtin types means more work to convert data structures (see 4)

Ideally, it would be nice to create ASN.1 module for all internal data structures, and generate use it, but ASN.1 isn't implemented in guile yet. There are some CL implementations, but porting them is too much work given how little I know about LISP ecosystem.

So as a summary, I think it's better no to use it. Even plain C configuration is way simpler at least for me.

I should also seriously reconsider re-implementing nexoid-ed in C++ (#36)

hurufu commented 3 years ago

I've done some simple data binding and nexo can be called. The next logical step would be implementing all APIs in Guile, but I have to stop, because it won't go anywhere :)