Unit Testing: Moving Forward

46 views
Skip to first unread message

Dale Karp

unread,
Nov 15, 2012, 3:07:10 PM11/15/12
to osdw...@googlegroups.com
Hi all,

In today's class, we discussed a few options for unit tests:

Who is interested in what? Personally, I'm interested in Ctypes and Python so that's what I'll be trying to work on. Anyone else working on this: we should coordinate / parallelize tasks!

Dale Karp

unread,
Nov 15, 2012, 3:08:40 PM11/15/12
to osdw...@googlegroups.com
Alright, looks like Node-ffi is still on the table, with Caitlin, Edwin and I trying that!

David Perit

unread,
Nov 15, 2012, 3:59:51 PM11/15/12
to osdw...@googlegroups.com
I will also be doing this.

Richard Eyre

unread,
Nov 16, 2012, 11:29:35 PM11/16/12
to osdw...@googlegroups.com
I'm in for Ctypes.

Michael Afidchao

unread,
Nov 16, 2012, 11:53:16 PM11/16/12
to osdw...@googlegroups.com
I will attempt Google Test.

Michael Afidchao

unread,
Nov 18, 2012, 9:29:57 AM11/18/12
to osdw...@googlegroups.com
Anyone else working on Google Test? I managed to get a Google Test sample unit test running with our library of functions. I've only tested creating a webvtt string and parsing a sample .vtt file and simply checking if the functions return WEBVTT_SUCCESS: http://www.kypertrast.net/seneca/wp-content/uploads/2012/11/11-18-2012_googletest_webvtt_parser.png . I've also discovered this blog post about unit testing with C code using the Google Test framework that details a number of issues with C unit testing, hopefully they won't cause complications: http://meekrosoft.wordpress.com/2009/11/09/unit-testing-c-code-with-the-googletest-framework/ .

I used our MSVC build, I have no idea how Google Test would be implemented with our autotools process. A library file has to be created, so as far as I can understand, either all of the Google Test source code would have to be placed in our repo, or a precompiled library file has to be added to our repo. In any case, I've thrown the gtest header files into the ./include directory. 

I've pushed my work into tci-gtest, but I've made a few significant changes in the MSVC parsevtt project: I've added gtestd.lib to Linker -> Input -> Additional Dependencies. I've added a precompiled gtestd.lib file to ./test/unit, which must be copied to ./lib. I've surrounded parsevtt_main.c's main with #ifndef TESTING and excluded it from the current MSVC project. The unit_test.cpp uses main() to run unit tests, so it includes parsevtt_main.c to get its functions and defines TESTING to ensure there are no conflicts with multiple main() definitions. I guess a separate project could just be made for Google unit testing instead of including/excluding the parsevtt_main.c file from the project...

Thevakaran Virutthasalam

unread,
Nov 18, 2012, 12:47:12 PM11/18/12
to osdw...@googlegroups.com
I'm going to try ctypes. 


On Thursday, November 15, 2012 3:07:11 PM UTC-5, Dale Karp wrote:

Richard Eyre

unread,
Nov 19, 2012, 11:44:04 PM11/19/12
to Thevakaran Virutthasalam, osdw...@googlegroups.com

You might want to work on Google test as we decided in class today to ditch types and nodeffi. Or you can work on something else on the top so list.

--
 
 
Reply all
Reply to author
Forward
0 new messages