def test_get_structs_with_all_vals(self): define_struct('TestStruct', [('a', 'b')], False, True) self.assertEqual( get_structs(), '#define STRUCTS_INIT \\\n' '{"TestStruct", {false, true, {{"b", "a"}}}}\n')
def test_get_structs_with_only_default_vals(self): define_struct('TestStruct', [('a', 'b')]) self.assertEqual( get_structs(), '#define STRUCTS_INIT \\\n' '{"TestStruct", {true, false, {{"b", "a"}}}}\n')