Code Comments
Programming Forum and web based access to our favorite programming groups.Steve Jorgensen wrote: > The unit testing framework I created for use on VB6 and VBA projects is now > available for download from its new home on Sourceforge at > http://sourceforge.net/projects/vb-lite-unit. D'oh! Can I trouble you for a vanilla example, or for a copy of the source inside the MDB file? I seem to have mis-laid my MS Access... -- Phlip http://industrialxp.org/community/b...tUserInterfaces
Post Follow-up to this messageOn Wed, 11 Aug 2004 14:21:02 GMT, "Phlip" <phlip_cpp@yahoo.com> wrote: >Steve Jorgensen wrote: > >now > >D'oh! > >Can I trouble you for a vanilla example, or for a copy of the source inside >the MDB file? I seem to have mis-laid my MS Access... The example code is also inside the VB Project code, so you can either open it in VB6, or you can open the files in the Modules subdirectory of the source, and paste the code into VBA in MS Word, Excel, or whatever office 2K or abov e app. you happen to have. Look at the class (*.cls) modules named beginning with tcls...
Post Follow-up to this messageSteve Jorgensen wrote: > The example code is also inside the VB Project code, so you can either open it > in VB6, or you can open the files in the Modules subdirectory of the source, > and paste the code into VBA in MS Word, Excel, or whatever office 2K or above > app. you happen to have. > > Look at the class (*.cls) modules named beginning with tcls... I have almost a decade of experience with Visual Basic, including VBA, and it still kicks my ass. I referenced your DLL, and cloned your test into my (VBA) project. In this method... Private Function ITestCase_TestCaseInstance() As ITestCase Dim objResult As New tclsTestCaseTester ' Test for cut/paste error - programmer forgot to change type of objResult. Debug.Assert TypeName(objResult) = TypeName(Me) Set ITestCase_TestCaseInstance = objResult End Function ...the line 'Dim objResult' sez "User-defined type not defined". Don'tcha love it? -- Phlip http://industrialxp.org/community/b...tUserInterfaces
Post Follow-up to this messageOn Wed, 11 Aug 2004 21:13:55 GMT, "Phlip" <phlip_cpp@yahoo.com> wrote: >Steve Jorgensen wrote: > >open it >source, >above > >I have almost a decade of experience with Visual Basic, including VBA, and >it still kicks my ass. > >I referenced your DLL, and cloned your test into my (VBA) project. In this >method... > >Private Function ITestCase_TestCaseInstance() As ITestCase > Dim objResult As New tclsTestCaseTester > ' Test for cut/paste error - programmer forgot to change type of >objResult. > Debug.Assert TypeName(objResult) = TypeName(Me) > Set ITestCase_TestCaseInstance = objResult >End Function > >...the line 'Dim objResult' sez "User-defined type not defined". > >Don'tcha love it? Note that tclsTestCaseTester is supposed to be the name of the class itself since the function is used to generate instances of the class itself so that each test can be run in its own instance. Until you change the name of the class to tclsTestCaseTester or replace tclsTestCaseTester with the name of your class, it won't compile. I'm guessing that's the problem you are having. By the way, thanks for helping me see what people will run into when trying to use this code. It's most helpful.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.