Comments (4)
I think I understand your point now. My focus is more on a heavy testing of the generated exi c code. In other words, a kind of fuzzing testing. That I can be sure that the exi parser can en- or decode something strange.
If it's about testing this cbexigen generator and its output, then that should definitely be here in this repo.
So I'm generally in favor of having those tests you mentioned above here.
From my side, you are welcome to write such tests and open pull request(s) for them.
from cbexigen.
There were also no objections from the EVerest Car<->Charger Communication WG. I'm looking forward to your PR(s) 😃
from cbexigen.
Since I also had the idea, I think it's generally a good idea.
But I don't know if the cbexigen repo is the right repo for it. Because the c code has to be generated every time.
My plan was to open another repo in EVerest with the generated cbexigen code. And to create a library "libexi" from it, which can then use e.g. the libiso15118 lib or the EvseV2G module. That's where I would see the unit tests.
In Everest we have not decided on a single unit testing framework. Some use Gtest, I use catch2 for the unit tests in libiso15118. So use the test framework that makes the most sense for you.
from cbexigen.
I don't really see the issue with re-generating the code every time. We can consider it another build step.
Keeping the code "as is" to me is like keeping a binary in the repo, the C code is supposed to be the product of the build step, in my opinion, like a binary executable is.
The code in the other repo would go out of date with every commit, adding a step of updating that repo every time this repo is updated. I think that's not ideal.
What these tests should be testing is:
- Is the code still generating without errors?
- Can this code build?
- Did the API change? (may be fine, but we should know and a build error will tell us that)
- Does the generated code do what we expect?
- This test script can be used as reference to how to use this repo (config, generate, use)
If we put the generated code in another repo we can't test the first test automatically, it all involves manual effort.
So I do see a lot of advantages to at least link the tests directly to this repo. This can be as a submodule of the test repo and still have those tests generate the schemas, but again, that's extra effort to update the submodule every time.
Or am I missing something? Or outright wrong 😐
from cbexigen.
Related Issues (20)
- Question: How to code <ANY> element in the xsd HOT 12
- error at the end of ISO20 AC_ChargeLoop message stream HOT 6
- Encode/Decode "SalesTariff" messages HOT 8
- Datatype of X509SerialNumber HOT 13
- Missing _isUsed check for some optional fields HOT 2
- Incorrect code generated for choice sequence? HOT 2
- need different approach for exi fragment on iso20 message HOT 8
- Update xmlschema to the latest version to support Python 3.12 HOT 7
- fragment encoding of EMAIDType(15118-2) HOT 2
- suggest to use bracket for defining of added constants(lengh, size, ...) HOT 1
- iso2 missing header? HOT 2
- xmldsig support HOT 2
- ISO20_DC_ChargeLoop Grammar Error HOT 2
- ParameterSet count too low HOT 1
- Remove unused signature features HOT 1
- Implement struct with typedef struct to make syntax cleaner HOT 1
- Why C and not C++ ? HOT 2
- Encoded SupportedAppProtocolReq seems corrupt and cannot be decoded HOT 8
- choice generation bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbexigen.