| 116 | } |
| 117 | |
| 118 | TEST_F(dmGuiScriptTest, URLOutsideFunctions) |
| 119 | { |
| 120 | dmGui::HScript script = NewScript(m_Context); |
| 121 | |
| 122 | const char* src = "local url = msg.url(\"test\")\n" |
| 123 | "function init(self)\n" |
| 124 | " assert(hash(\"test\") == url.path)\n" |
| 125 | "end\n"; |
| 126 | dmGui::NewSceneParams params; |
| 127 | params.m_MaxNodes = 64; |
| 128 | params.m_MaxAnimations = 32; |
| 129 | params.m_UserData = this; |
| 130 | dmGui::HScene scene = dmGui::NewScene(m_Context, ¶ms); |
| 131 | dmGui::SetSceneScript(scene, script); |
| 132 | dmGui::Result result = SetScript(script, LuaSourceFromStr(src)); |
| 133 | ASSERT_EQ(dmGui::RESULT_OK, result); |
| 134 | |
| 135 | ASSERT_EQ(dmGui::RESULT_OK, dmGui::InitScene(scene)); |
| 136 | |
| 137 | dmGui::DeleteScene(scene); |
| 138 | dmGui::DeleteScript(script); |
| 139 | } |
| 140 | |
| 141 | TEST_F(dmGuiScriptTest, GetScreenPos) |
| 142 | { |
nothing calls this directly
no test coverage detected