Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: integrate handlebars and boost.url test suite #398

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

alandefreitas
Copy link
Collaborator

This change integrates the test library developed for handlebars with the test library from boost.url that is being used for other tests.

With this integration, Handlebars tests are listed among any other tests in mrdox.

The features used for handlebars, such as the expression decomposer and the diff algorithm for golden master tests, have been integrated into the test library from Boost.URL. The diff algorithm is in an optional header.

@alandefreitas alandefreitas linked an issue Jul 10, 2023 that may be closed by this pull request
@vinniefalco
Copy link
Member

vinniefalco commented Jul 11, 2023

This is starting to look a LOT more organized than what we have in develop! I would like to see these tweaks though, because we are mixing up the "not-a-framework" files and the mrdox-test program files.

TestArgs.cpp, TestArgs.hpp, TestMain.cpp, TestRunner.cpp, TestRunner.hpp are all considered sources for the mrdox-test.exe target not the "not-a-framework" so these should go here:

src/test/TestArgs.cpp
src/test/TestArgs.hpp
src/test/TestMain.cpp
src/test/TestRunner.cpp
src/test/TestRunner.hpp

detail/decomposer.cpp, detail/decomposer.hpp, test_suite.cpp, and test_suite.hpp are sources which belong to the "not-a-framework" unit testing helpers. I would imagine that we will make this into its own repository (which will remain lean in the spirit of lightweight test but with a little more more horsepower to get the job done). And then we would use git-subtree or git-submodule to inline the sources into the target repository. In that case we want it to go to its own directory which has a unique prefix. I don't know what that prefix but for now I guess "test_suite/"? Maybe like this for now and we can decide if we want to change it later:

src/test_suite/test.hpp // renamed from test_suite.hpp
src/test_suite/test.cpp // renamed from test_suite.cpp
src/test_suite/detail/decomposer.hpp
src/test_suite/detail/decomposer.cpp

diff.cpp, and diff.hpp would be an implementation detail of the hypothetical "handlebars-test.exe" which we have not created yet and is currently fused to mrdox-test.exe so we could leave them in the locations below for now, until handlebars gets its own repository and then those files would be moved to become part of that project:

src/test/diff.hpp
src/test/diff.cpp

The "fixtures" for handlebars need to go outside the src/ directory, otherwise they are going to show up in Folder or CMake view in Visual Studio (or is that what you wanted?)

test-files/handlebars/escaped.adoc.hbs
...

These are only here temporarily since they will be moved to the stand-alone repo.

@alandefreitas
Copy link
Collaborator Author

"not-a-framework" files and the mrdox-test program files

It would be good if we could give this test library a name because we often have to refer to it and it becomes ambiguous. NAF library or whatever...

which will remain lean in the spirit of lightweight test but with a little more more horsepower to get the job done

Yes. We can keep it lean and make any extra useful functionality optional. I think the initial requirements of Boost.Core.LWT were more about avoiding circular dependencies for Boost.Test than to make it lean, then making it lean just emerged out of that because I believe anothere assumption is users can just use Boost.Test if they want the nicer things.

In our case, we're not limited by the very same constraint so we can make it lean but there's no reason we can't offer extra optional nice things we need along the way.

And then we would use git-subtree or git-submodule to inline the sources into the target repository

We don't even have to. That's a case where packages work fine. It could be bundled, like Boost.URL, we could find_package to find what's installed from the standalone repo, fetch content as a second-best option, etc... The sky is the limit.

The "fixtures" for handlebars need to go outside the src/ directory, otherwise they are going to show up in Folder or CMake view in Visual Studio (or is that what you wanted?)
test-files/handlebars/escaped.adoc.hbs

Done.

Is there anything else actionable for now?

This change integrates the test suite library developed for handlebars with the test suite library from boost.url that is being used for other tests.

With this integration, Handlebars tests are listed among any other tests in the library.

The features used for handlebars, such as the expression decomposer and the diff algorithm for golden master tests, have been integrated into the test library from Boost.URL.

fix cppalliance#390, cppalliance#384
@alandefreitas alandefreitas merged commit 2f9fe70 into cppalliance:develop Jul 11, 2023
6 checks passed
@alandefreitas alandefreitas deleted the hbs-test-suite branch July 28, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handlebars: spelled noEscape Handlebars: copy-paste javadoc bug handlebars-test must link to the lib
2 participants