Added tests for g_legend