VBCorLib for VB6

Sunday, December 03, 2017

SimplyVBUnit 5.0 Released

SimplyVBUnit 5.0 has been released on GitHub. It only adds a couple minor things that I found convenient. It does break some compatibility and there are no bug fixes so itโ€™s not a recommended upgrade unless you find the new features useful.
In short the TestSuite.Add method has been extended a bit. It not returns the TestSuite instance to support method chaining. It also accepts an optional name to use instead of the default class name passed in.

AddTest Sim.NewTestSuite("Suite Name") _
.Add(New TestMyClass) _
.Add(New TestOtherClass, "Cooler Name")

Wednesday, November 15, 2017

To GitHub with VBCorLib and SimplyVBUnit!

Well, I've finally joined the masses and moved VBCorLib and SimplyVBUnit to GitHub๐Ÿ‘

I had thought about it in the past, but didn't want to deal with whatever hurdles might exist when migrating from my Source Forge SVN repository to GitHub. Well, then I found the GitHub Importer and had no excuses. So with a click of a couple buttons I watched magic happen ๐Ÿ˜

After importing the projects I then created a release for each to provide the same latest downloads as is available at Source Forge. Hopefully it won't be terribly confusing.

Well, now it's time to get my Git on, since I'm a complete novice.

Tuesday, November 14, 2017

Aligning BigInteger with .NET and other stuff

OK, so it's been like 100 years since I last posted. I am truly terrible at it and can't promise to become any better. ๐Ÿ˜

So, a lot has been updated without me even attempting to post about it. When I do find a little bit of time to work on VBCorLib I just make some updates and commit them.

Well, right now I'm reworking the BigInteger class to align it with the .NET version. The original BigInteger was based on the Java version as far as the API was concerned because the .NET version was an internal implementation. Now that it public the API is significantly different in some aspects. The .NET version supports the IFormattable interface which means it supports the various formatting options. The VBCorLib version only supports a tiny set of formats based on the original Java version. So that will be a major change behind the scenes. The other thing to deal with is the construction of a BigInteger. .NET supports a slightly different set of input data that can affect if the number is positive or negative. In the end, it shouldn't be too disruptive, but there will be some breaking changes.

In the time since my last post I have updated or re-implemented many of the Encoding classes to make them more ISO compliant and better aligned with the updated .NET versions. The Calendar classes are also getting some much needed attention. Including adding some actual documentation to the classes, as many of them have none.

The majority of the work has revolved around updating the unit-tests to take advantage of the updates made in SimplyVBUnit for easier maintenance. But, along the way many bugs have been squashed and performance improved.

Since the next version (3.0) will have many breaking changes, I plan on changing the filename to "VBCorLib3" so it can co-exist with previous versions. The internal project name has also been shortened to just "CorLib" to allow class names to be a bit longer if needed. So if you are referencing anything with the "VBCorLib" project name, it will need to be updated to just "CorLib."

If you got to here, thanks for sticking to it!

Thursday, April 07, 2016

Renaming for Clarity

When I started VBCorLib all those years ago I was trying to match class names with .NET as much as I could.  As it turned out, VB6 already had already taken a few names for itself, leaving me with some naming decisions. Well back then, I was associating VB6 names a bit more with the dark world of C/C++ and ended up prefixing my class names with the letter 'c'. This led to the atrocious cString, cArray and cDateTime classes. Seeing their usage such as cString.Format or New cDateTime simply ground on my spine. Something feels dirty when using prefixes like this. It was even hard to type those names when using them in my projects.

Heading into this version 3.0 revamping of VBCorLib, I decided that there would be some major breaking changes. This is allowing me to refactor the code, but also the interfaces and names. And I haven't been going easy with the breaking changes. Everything has been a target. I could remove those terrible Hungarian notations with class names. I wanted to align the classes with VBCorLib so I used the name prefix I had used to provide easy access to constructors, the Cor prefix. So now those original class are CorString, CorArray, and CorDateTime and even though they are a couple letters longer, their spelling and appearance feel more natural for this library.

Sunday, February 28, 2016

SimplyVBUnit and VBCorLib Activity Abound


It's been a very long time since my last post and with all the activity in the last year or two, I thought I'd take this opportunity to summarize what's been going on.

Firstly, SimplyVBUnit has been going strong and has become a popular unit-testing framework in the VB6 world. I've been updating it since the version 4 release and it continues to improve. There are still some things I'd like to do with it, such as learn to integrate it with Team City. I've never attempted anything with Team City, so that might be an enlightening experience (succeed or fail). There are some minor code related updates I want to get to as well. Overall SimplyVBUnit is fully fleshed out and very stable.

There's been an unusual amount of activity within the VBCorLib code-base over the past year or two. Many of the classes had not kept up with where .NET has gone and I wanted to bring some of them up to speed where they no longer align with their .NET counter-part. There have been many bug fixes, code refactorings, and interface changes. Version 3 is turning out to be a cleaning party as I apply all I've learned in the many years since the version 2.3 release back in 2008. Overall, I've been enjoying squeezing as much out of VB6 as possible in this endeavor.

VB6 still enjoys a passionate following and that's great! I don't use VB6 outside of these projects, but I still enjoy going back to some old-school days and making code do things that weren't being done in those days. So if you're still using VB6, either maintaining legacy applications or even starting new projects, I hope these apps can be helpful!

Thursday, October 25, 2012

SimplyVBUnit 4.0 Release in the Wild!

Long time since the last post. And interesting enough it, too, was about the release of SimplyVBUnit. Well after much time thinking about updating the framework I had worked on it on and off over the past couple years. But now it's finally being release with more capabilities to make VB6 unit-testing even better.

The primary update to the framework is support for categories. Now tests and test fixtures can be categorized to help deal with tests that may not be applicable or take too long by simply categorizing them and running them only when you see fit.

So head over to SourceForge and download your copy.

Wednesday, April 01, 2009

SimplyVBUnit 3.0 Released

I've released a new version of SimplyVBUnit for VB6. Though this is not a VBCorLib specific post, I felt it should be shared anyways.

After using NUnit for awhile now, I've come to love the constraint based assertion model. It provides a great deal of constraints right out of the box. The constraint based method allows me to create my own constraints if necessary. Then I started using the TestCase attribute (originally RowData) and have enjoyed that ability. So with that I decided to update SimplyVBUnit to provide as much capabilities with regards to constraints and test case data functions as I could.

SimplyVBUnit provides numerous constraints like NUnit and you can write your own if necessary. The constraints can be changed together providing even greater capabilities than the old method. In the old method there was no built in way to assert that a value was equal to more than one value.

The old way for asserting against multiple values:
Assert.IsTrue MyValue = 1 Or MyValue = 2

The old method does work for the most part, but it doesn't help you when it fails. All you get is that the assertion was false.

The new constraint based method:
Assert.That MyValue, Iz.EqualTo(1).OrElse.EqualTo(2)

The new method reads exactly what you want and if there is a failure you're told exactly what was expected. Anyways, this is a very very tiny portion of the power of constraints when using SimplyVBUnit.

The test case capabilities can be involved so I won't go into any details here. Since VB6 doesn't support attributes like .Net I made a pretty good alternative. It's still very powerful in providing the ability to pass parameters to test methods.

So if you unit test in VB6 give SimplyVBUnit 3.0 a try.