unit test for cube.c