Skip to content

Add generate.py to generate enum declarations into tests/py/dcl.enum/ #95

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

Closed
wants to merge 4 commits into from

Conversation

Ukilele
Copy link
Collaborator

@Ukilele Ukilele commented Apr 24, 2023

As we discussed it in cpplang.slack, here is the script to generate C++ declarations. So far it only generates enum declarations. The files will be written to file-dir/tests/py/dcl.enum/*.cpp, where file-dir is the directory of the script generate.py. The script uses the python module exrex, so please make sure to install it.

Feel free to add a code review or require other changes. In the meantime, I will look into further declarations and how to generate them.

@vinniefalco
Copy link
Member

clang does not like those lambda expressions one single bit :)

We need to fix these https://gist.github.com/vinniefalco/af93abfbc947dfb0ecacc2b530befaf4

@Ukilele
Copy link
Collaborator Author

Ukilele commented Apr 24, 2023

Whaaaat? But they are so common in C++...
Joke aside, I will remove them. But just to be clear, clang >= 5.0.0 supports them, if you add "-std=c++2a" (or "-std=c++20" if using a more recent version of clang). If you let me know which compilers/C++ standards we are aiming at, I can take that into account and try to avoid producing invalid or too recent declarations.

@vinniefalco
Copy link
Member

oh hmm.... well maybe my tests are broken! I am not setting the C++ standard version... I guess that would happen here? https://github.com/cppalliance/mrdox/blob/433c78d52000cdeb4c0dd730985e8de6a57096f0/source/tests/SingleFile.hpp#L35 You have to add those args somehow.

I am targeting the very latest C++ by the way (C++20 I guess, or even C++23 if that's possible).

@vinniefalco
Copy link
Member

The develop branch uses C++20 for tests now

vinniefalco pushed a commit to vinniefalco/mrdox that referenced this pull request Apr 24, 2023
@Ukilele Ukilele deleted the python-test-generation branch April 28, 2023 09:27
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.

2 participants