Monday, January 11, 2010

Another thing to add to the list of "Life is too short".

Attempted to add an SVN project from into Eclipse using the SVN plugin. Project is an android project.

Total failure. Eventually I got down to errors like:
java.lang.IllegalArgumentException: Path must include project and resource name: /android-l2tp-tether
        at org.eclipse.core.runtime.Assert.isLegal(
        at org.eclipse.core.internal.resources.Workspace.newResource(
        at org.eclipse.core.internal.resources.Container.getFolder(
        at Source)
        at Source)

Noting that there were a project called 'android-l2tp-tether'...
Eclipse is just too big, too clumsy, and too opaque to usefully debug. I wasted an hour wandering around with straces et al, but realized I was just wasting time. Copying the svn directory else, and then doing 'create new project from existing source' was instantly successful. ugh.

Saturday, January 9, 2010

Unit tests

Gradually coming up to speed on gtest (google c++ unit test framework). Yes, I'm know I'm painfully behind...

And retro-fitting unit tests to existing code isn't much fun. However, it is entertaining for the number of latent bugs it finds! There's always something special about output like:
[----------] 2 tests from Image
[ RUN      ] Image.Empty
Segmentation fault (core dumped)

Noting that the unit test in question creates an unparametrised object and inquires as to it's size. :)

Off to fire up a debugger and find out wtf is going on.