xml - Format for cross language common test data -
I am currently working on the C + + side of the font library in both C ++ and Java.
We want to automatically generate test data from many fonts, and we are using Google Test and Zenit for testing.
I will write a script to create data in this normal format that will be parsed in the test. The thing is that for C ++ I would also like to use Google Test's value-parametric test and this should mean data in C ++ too.
So, I'm thinking of output data in some general way, being generated from the format and the C ++ file.
Normally, we will consider XML or JSON, but protocol buffers fit the bill of code that arises very easily, which makes them interesting I've never used them and documents Are browsing through, they really like to define the message, do not store so much real values (so I can define a person's message , But I really want to do, he has a bunch of individual constants)
Thanks
It seems that protocol buffers are a good match for the case of your use. It is fast and easy to use in both C ++ and Java environments. It is also very stable, well-documented and widely used outside of Google.
To store many objects in a binary stream, there are traditional methods that are prevalent for it, for example, this is the answer:
Keep in mind that protobuf is a binary format, Even if it is possible to convert your test cases into human-readable formats, such as JSON or XML, here are some relevant links:
- < / Ul>
Comments
Post a Comment