Synchronize LabelTest of cpp to lua to fix some bug and add more tests