Esempio n. 1
0
 def test_to_c_string(self):
     tilemap = GBTilemap(width=4, height=4)
     result = "const UINT8 TILEMAP[] = {\n"
     result += "    0x00, 0x00, 0x00, 0x00,\n"
     result += "    0x00, 0x00, 0x00, 0x00,\n"
     result += "    0x00, 0x00, 0x00, 0x00,\n"
     result += "    0x00, 0x00, 0x00, 0x00,\n"
     result += "};"
     assert tilemap.to_c_string() == result
Esempio n. 2
0
 def test_to_c_string_with_custom_name(self):
     tilemap = GBTilemap(width=4, height=4)
     result = "const UINT8 FOO[] = {\n"
     result += "    0x00, 0x00, 0x00, 0x00,\n"
     result += "    0x00, 0x00, 0x00, 0x00,\n"
     result += "    0x00, 0x00, 0x00, 0x00,\n"
     result += "    0x00, 0x00, 0x00, 0x00,\n"
     result += "};"
     assert tilemap.to_c_string(name="Foo") == result