You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to work with spirit in a test driven development way, but i am finding it difficult to get any kind of process together. It is difficult to test rules in isolation, or in any structured way.
Can you extend this example to start building a grammar where you start building a an initial base test, and then build the rule to parse it. Then extend the test to another part of the grammar etc.
The text was updated successfully, but these errors were encountered:
That's what I do, all the time actually, although it might not be evident in the examples I share because ultimately, what you see is the final code. I'm not sure if I can find some time to do an incremental "test driven" grammar development example, though I think it is a very good idea.
I tried to see if you did that in the git commits, but it was not evident.
Can i suggest, simply splitting them into separate folder which build separate binaries?
TDD would mean that they all compile, but half fail when you run make tests.
e.g.
\1-basic-grammar-test
\2-basic-grammar-rule+test
\3-extended-grammar-with-subrule-test
\3-extended-grammar-with-subrule+test
.....
Question:
I tried a TDD approach with gmock, but i had some difficulties. I was trying to break my grammar down into a set of separate sub-parsers that I could test individually, and give separate development cycles to. I had some real problems getting anything to work.
I've been trying to work with spirit in a test driven development way, but i am finding it difficult to get any kind of process together. It is difficult to test rules in isolation, or in any structured way.
Can you extend this example to start building a grammar where you start building a an initial base test, and then build the rule to parse it. Then extend the test to another part of the grammar etc.
The text was updated successfully, but these errors were encountered: