Преглед изворни кода

add utest (#1717)

* add utest

* Update xmake.lua
ruki пре 2 година
родитељ
комит
35f93c0eee
1 измењених фајлова са 20 додато и 0 уклоњено
  1. 20 0
      packages/u/utest.h/xmake.lua

+ 20 - 0
packages/u/utest.h/xmake.lua

@@ -0,0 +1,20 @@
+package("utest.h")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://www.duskborn.com/utest_h/")
+    set_description("single header unit testing framework for C and C++")
+
+    add_urls("https://github.com/sheredom/utest.h.git")
+    add_versions("2022.09.01", "d5d71b6623e23b3f860c996b31ec7bbfb0943119")
+
+    on_install("windows", "linux", "bsd", "macosx", "mingw", "android", "iphoneos", "cross", function (package)
+        os.cp("*.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_csnippets({test = [[
+            #include "utest.h"
+            UTEST(foo, bar) {
+              ASSERT_TRUE(1);
+            }
+        ]]}))
+    end)