kellyethridge / VBCorLib

The VBCorLib framework brings many of the powerful .NET classes to VB6.
http://www.kellyethridge.com/vbcorlib/
MIT License
113 stars 28 forks source link

VBCorLibTests project won't compile #88

Closed BluejacketScott closed 3 years ago

BluejacketScott commented 3 years ago

I'm having a devil of a time with getting CorLib.Solution.vbg to compile completely. The CorLib project builds just fine and so does the Fakes project but the Tests project just doesn't seem to want to play nicely for me. No matter which way I try to tackle the problem, I can't get it to build but the tests all pass just fine. Just looking for a sanity check here: is this a problem on my end or is this a known issue? I'm inclined to believe it's on my end but can't seem to get it resolved. Any suggestions? I know I'm not giving you much to go on here but every time I try a different angle I'm met with a different sort of failure. Any hints or traps to look out for?

kellyethridge commented 3 years ago

The tests were never intended to be compiled, so I've never tried. In addition, the tests project contains classes with names that are too long and won't compile. In order to support a compiled version of the tests, each test class needs a legal name, and to also implement the ITestFixture interface and register each test method, including all those registered in ITestCaseSource implementations. Again, I don't compile the tests, I'm not sure what the point would be. I do run the tests against a compile VBCorLib library when needed. That's why there is the CorLib.Tests.Solution.vbg project group. It references a compiled VBCorLib.

BluejacketScott commented 3 years ago

That makes sense. There really is no point in compiling the tests except I'm using this addin that comes with it's own VB parser and it refuses to parse the project group because there are several test classes that it chokes on. The devs are apparently working on a way for me to tell their parser to ignore a given project. If they come through with that feature, this is a moot point. That addin has a ton of features including static code analysis that I want to use but can't if I have this test project loaded.

I've started a VERY big project that will make heavy use of VBCorLib and SVBU and wanted to combine your unit tests with those from my project but the Addin refuses to play ball. I have verified that if I drop the unit tests and just consider those that are necessary for my project (excluding those from VBCorLib) then my project group builds successfully. I'll probably just continue that route unless they can implement the IgnoreProject feature.

Quick question: is there a way to test public methods in bas modules? My best knowledge of SimplyVBUnit so far hasn't yielded any luck. Am I right in thinking it only tests class methods or am I missing something obvious? Having thought about it again while typing this comment, it seems that I should be able to use module methods in Assert statements though - right?

I did bump into the long class names issue as well.