Fix bug in grav1d.c
Fix bug in test output