1 #include "AssetTest.hpp"
3 #include "app/Assets.hpp"
4 #include "app/init.hpp"
6 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(blobs::app::test::AssetTest, "headed");
13 void AssetTest::setUp() {
16 void AssetTest::tearDown() {
20 void AssetTest::testLoadAll() {
24 CPPUNIT_ASSERT_MESSAGE(
25 "no resources loaded",
26 assets.data.resources.Size() > 0
28 CPPUNIT_ASSERT_MESSAGE(
29 "no tile types loaded",
30 assets.data.resources.Size() > 0
33 CPPUNIT_ASSERT_MESSAGE(
34 "tile texture has no width",
35 assets.textures.tiles.Width() > 0
37 CPPUNIT_ASSERT_MESSAGE(
38 "tile texture has no height",
39 assets.textures.tiles.Height() > 0
41 CPPUNIT_ASSERT_MESSAGE(
42 "tile texture has no depth",
43 assets.textures.tiles.Depth() > 0
46 CPPUNIT_ASSERT_MESSAGE(
47 "skin texture has no width",
48 assets.textures.skins.Width() > 0
50 CPPUNIT_ASSERT_MESSAGE(
51 "skin texture has no height",
52 assets.textures.skins.Height() > 0
54 CPPUNIT_ASSERT_MESSAGE(
55 "skin texture has no depth",
56 assets.textures.skins.Depth() > 0
59 CPPUNIT_ASSERT_EQUAL_MESSAGE(
60 "large font has wrong family",
61 std::string("DejaVu Sans"), std::string(assets.fonts.large.FamilyName())
63 CPPUNIT_ASSERT_EQUAL_MESSAGE(
64 "medium font has wrong family",
65 std::string("DejaVu Sans"), std::string(assets.fonts.medium.FamilyName())
67 CPPUNIT_ASSERT_EQUAL_MESSAGE(
68 "small font has wrong family",
69 std::string("DejaVu Sans"), std::string(assets.fonts.small.FamilyName())