[tests] Using g_object_...() API in test-dim