justbuchanan / bazel_rules_qt

Bazel rules for Qt5
Apache License 2.0
46 stars 23 forks source link

Add a test for the qt_ui_library #15

Closed limdor closed 3 years ago

limdor commented 3 years ago

I would like to start converting the uic call from genrule to a proper rule. However I've seen that there is no test/example in the repository. I created this small test but let me know if you prefer it in examples or how you would like to structure the tests.

justbuchanan commented 3 years ago

Looks good, thanks! The stuff in the "example" directory serves a similar purpose of showing an invocation of one of the qt_* BUILD rules and having it built on CI to make sure it works. I'll go ahead and merge this as-is, but at some point we can merge the "tests" and "example" directories. I'm fine with moving the example stuff into "tests".

One other thing that could be added to this specific test is a cc_library with a .cc file that #includes the .h file generated from the .ui. That will let us know that the .ui is being built by uic correctly and provide an example of what the include paths to the generated files look like.