Re: [Cppunit-devel] VC++ Add-Ins for IDE integration of Unit test result
Brought to you by:
blep
From: Baptiste L. <bl...@cl...> - 2001-04-22 14:24:34
|
> Great, integration with VC++ will make a lot of people happy I think. > One note: under what license are the above pieces of code released? I ask, because > Win32 code seems to be released under a free license far less often than *nix > code. There isn't even a license provided with Open/VC. It is a "used at your one risk". Open/VC is a code generator that build the squeleton of the Add-Ins. Quoting the license for WWhizInterface: "The license from the Workspace Whiz! source distribution (which includes WWhizInterface) reads: Workspace Whiz! - A Visual Studio Add-in Source Code (http://workspacewhiz.com/) is Copyright 1999-2001 by Joshua C. Jensen mailto:jj...@wo...). The code presented in this source distribution may be freely used and modified for all non-commercial and commercial purposes so long as due credit is given and the source file header is left intact. If the source module is from another author, that module may be used subject to the restrictions of the author. Workspace Whiz! and its accompanying files are provided "as is." The author can not be held liable for any damages caused through the use of this software, except for refund of the purchase price." If I read thing correctly, there should not be any problem. It as already been used in others add-ins. (And Workspace Whiz is a shareware well worth acquiring if your using VC++ on a ady to day basis). > > - The Add-ins detects the file update (how?), processes the result > > (translate absolute path name to project relative file...). > > > > If I remember correctly the Win32 API has a feature with which a process can > request a notification when a certain directory or file changes. Yes, I've been considering this, thought it is only supported on Windows NT and 2000. There a nice wrapper class for this (http://www.codeproject.com/useritems/directorychangewatcher.asp). But it might do for a first version since most of the developper work on NT. For the other, a simple "refresh" button would do the job. > The emacs method is very simple: if you choose 'compile' under the tools menu, > emacs will run an external program (by default 'make -k'). It then puts the > output of this program in a separate buffer. This program (usually gcc or g++) > outputs it messages in the format '<filename>:<linenumber>: <message>'. Emacs > 'knows' this simple format, so if you display the output buffer and click on one > of these lines, emacs will display the corrresponding file at the correct line. > That's all. > > This would work with the Java test runner too. This can also work on VC++. If you print message to the debug output (a specific WIN32 API), you can see them in the "debug" window of VC++. If the line happen to look like: h:\devstudio\include\xtree(120) : warning C4786: 'std::_Tree<std You can go in the source by double clicking it (and switch from one to the other using CTRL+F4, CTRL+SHIFT+F4). So a basic text mode with IDE integration could be done. It would be differ from the emacs one: - different format for reporting the location of the message - different API used to "print" the message. On the other hand, this debug output tends to be a real clutter, DLL loading appears there, memory leaks too (when using VC++ the libc features), and thread termination (a real bother in MT application), and the usual TRACE developper put in the code when debugging. I'll try to add this in the VC++ TestRunner. Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Author of The Text Reformatter, a tool for fanfiction readers and writers. Language: English, French (Well, I'm French). |