-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Autogenerate separate Tester::connectPorts
source file
#934
Comments
If we are going to fix this, we need to make sure the |
What do you mean by |
When you have an array port, it makes a for loop:
However, instead of using the constant depicting the array size, it uses a hardcoded integer. If one changes AcConstants.ini or that port size, this hardcoded int needs to be updated to. |
If the ut code is regenerated, does the port size get updated? |
@timcanham would we be able to override this autocode? Occasionally we need to override it. e.g. for the hub unit tests, we create 2 hubs and cross-wire them together to proved that the outside interfaces of the hubs work in tandem. |
Since the connection functions are always re-callable, you can re-connect any way you like. You could also just comment out the call to |
Feature Description
Currently,
Tester::connectPorts()
is generated by thegenerate impl --ut
and placed in theTester.cpp
file. This becomes a maintenance annoyance and causes asserts if it's not corrected if a new port is added.The proposal would be to generate this function into a separate .cpp file that would be treated like the other unit test files and generated each time the test is compiled.
Rationale
It makes maintaining unit tests a lot easier, and it isn't intuitive to know you have to go update this function when you add a port.
The text was updated successfully, but these errors were encountered: