VBCorLib for VB6

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.

-Kelly

Monday, July 07, 2008

Classic ASP Helper Project

So a few people have been attempting to use VBCorLib from within a classic ASP web page, and can have difficulties achieving success. There is a mismatch when dealing with ASP and VBCorLib, especially when dealing with arrays. In ASP all variables are held in a Variant. Arrays are expected to be a Variant with a subtype of the specific datatype. VBCorLib deals with strictly typed arrays. This presents a problem and can cause much frustration. So I've created a helper dll that allows for easy conversion of one array type to another. This makes it easy to convert the Byte() VBCorLib returns into a Variant(), or vis-versa when needing to pass a Byte() by reference into a method. Also, there are a few wrapper classes that make things a big smoother when dealing with classes that make heavy use of arrays, such as the cryptography classes.

So anyways, I hope the helper dll will provides benifit to those still developing in class ASP and would like to include some of the functionality provided by VBCorLib.

You can download the helper dll from Source Forge.

Kelly

Wednesday, June 11, 2008

Version 2.3 Released

Long time no posty! I finally got around to dealing with the DEP problem that VBCorLib would raise on certain systems. I can only hope it is fixed for all systems! I also did some minor updating.

Someday I'll get time to just dig into the thing again. I'm aching to write and rewrite some better tutorials. I'm not satisfied with the few that exist and some of those are out of date. So we'll see how things go.

Anyhow, you can grab the newest version from Source Forge.

-Kelly

Tuesday, October 23, 2007

Updating VBCorLib to Version 2.2

So I don't get a lot of time to spend with VBCorLib, but sometimes I have to make an update available because I feel an issue needs to be resolved. So I've done some work and uploaded the latest to SourceForge.

I've integrated the BigInteger class with VBCorLib to bring all the functionality into a single package. Along the way a few issues were resolved. The Queue class had a sneaky glitch that could cause an application to crash. The DSAParameters class was updated to derive the J parameter from the P and Q parameters. This was accomplished using BigInteger.

Along with the new uploads on SourceForge I have included the current set of unit tests. It is a separate download because if its size. But for those interested, it is available. It will require the use of SimplyVBUnit to run those tests.

-Kelly

Friday, June 01, 2007

BigInteger Completed!

In my quest to write my own version of RSA encryption, I needed to be able to perform mathematical functions with very large integer numbers. I set out to learn these methods, so I popped open my set of The Art of Computer Programming by Donald Knuth. I learned the basics pretty easily, however, the division was another matter. I did eventually figure it out and now find it a straight forward method to implement. Great learning experience for sure. Among other things, I learned that Microsoft's BigInteger in the VS Orcas edition calculated incorrectly.

Anyways, I enjoyed the process and thought that the BigInteger class itself might be useful outside of VBCorLib, so I built a nice package for it and uploaded it Planet Source Code (soon Sourceforge.) I think I might even expand it to include something like a BigDecimal and/or BigFloat.

:rant: I've become increasingly disappointed with the quality of submissions on Planet Source Code. I've looked at many projects and just shake my head. I could complain about every aspect of the majority of projects. I think I must have high expectations and it prevents me from voting or commenting because nothing good will come out of my mouth. :/rant:

Kelly

Friday, May 04, 2007

Back In The Saddle

It's been a while and I haven't touched VBCorLib since the v2.1 release, but have been itching to get a couple of things added!

I've been playing with VB9 (Orcas) and really want the BigInteger added to the library. I've seen attempts of big number handling in VB6, but they use strings and base 10 values. With BigInteger a byte array will be used and allow for hex support for parsing and string output. I'll probably add some Java inspired methods of bit manipulation.

When BigInteger is completed I can try my hand at creating a VB6 version of the RSA encryption. I'll probably call it RSAManaged. I never liked the restrictiveness of hash algorithm choices that RSACryptoServiceProvider supported. Mono supports basically any hash algorithm derived from HashAlgorithm.

As I keep playing with VB9 I will keep my eye out for other classes that make sense to add to the library. There are a gazillion classes, but I'm keeping the search narrowed to the mscorlib.dll library for now.

Kelly