From 7b3267d6e915b7c6b4034e0efec26fca59c03f27 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 26 Jun 2022 10:47:11 +0800 Subject: [PATCH] Add tests for Imguizmo (#1306) * improve imguiemo * add test for imguizmo --- packages/i/imguizmo/xmake.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/i/imguizmo/xmake.lua b/packages/i/imguizmo/xmake.lua index a4c110545..23e45a809 100644 --- a/packages/i/imguizmo/xmake.lua +++ b/packages/i/imguizmo/xmake.lua @@ -29,3 +29,13 @@ package("imguizmo") io.writefile("xmake.lua", xmake_lua) import("package.tools.xmake").install(package) end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + void test() { + ImGuiIO& io = ImGui::GetIO(); + ImGuizmo::SetRect(0, 0, io.DisplaySize.x, io.DisplaySize.y); + } + ]]}, {configs = {languages = "c++11"}, includes = {"imgui.h", "ImGuizmo.h"}})) + end) +