Closed cakemaster9001 closed 1 year ago
OK, thanks for reporting this. I can confirm that your example is reproducible here in VDMJ, so it should be easy to track down...
Yes, the inheritance was inconsistent. Good spot! We want named traces to be "public" so that they can easily be called from outside their class, but that implies they are inherited as well, which we don't want. Simple fix. So now it says:
> runtrace TestInheritedTracesDerived`TestDoOtherStuff
Generated 1 tests in 0.017 secs.
Test 1 = dut.doOtherStuff()
Result = [(), PASSED]
Executed in 0.355 secs.
All tests passed
>
It works on VSCode too, of course :-) It's pushed to the "development" branch, if you want to try a patch?
Closing, as this is now resolved and there are no UI changes.
I was doing some trace testing on both a derived and a base class in my project, but when I tried to run the tests in the derived class, the CT framework failed to run the tests. Interestingly enough, I can run the tests for the base class just fine, but when I try to run the tests of the derived class, they fail. I made a small example to reproduce my issue:
File 1
File 2
When I try to run the tests using the CT VSCode tab I get the following message: "Exception during trace expansion: Error 6: Constructor for TestInheritedTracesDerived can't find TestDoStuff in 'TestInheritedTracesDerived' (/home/mikkel/Documents/vdm/test/test2.vdmpp) at line 3:7
You can debug this using the 'generate' console command"
The test also fails when the two classes are in the same file.