-
-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add mds * add test for mds * fixed the issue of multiple compilers for templates
- Loading branch information
1 parent
b640d74
commit f64e835
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package("mds") | ||
set_kind("library", {headeronly = true}) | ||
set_homepage("https://github.com/chen-qingyu/MyDataStructure") | ||
set_description("A C++ containers library that is as easy to use as Python's containers library.") | ||
set_license("GPL-3.0") | ||
|
||
add_urls("https://github.com/chen-qingyu/MyDataStructure/archive/refs/tags/v$(version).zip", | ||
"https://github.com/chen-qingyu/MyDataStructure.git") | ||
add_versions("1.1.0", "537a1260ebdeeb1db9f94a3c44e628c04a70e4d26d5eb72f4206765717d6d680") | ||
|
||
on_install(function (package) | ||
os.cp("sources/*.hpp", package:installdir("include/mds")) | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:check_cxxsnippets({test = [[ | ||
#include <cassert> | ||
using namespace mds; | ||
void test() { | ||
Map<String, List<Integer>> map = {{"first", {123, 456}}, {"second", {789}}, {"second", {0}}, {"third", {"12345678987654321", 5}}}; | ||
assert(map.size() == 3); | ||
assert(map.keys() == Set<String>({"first", "second", "third"})); | ||
assert(map["third"][-1].factorial() == 120); | ||
} | ||
]]}, {configs = {languages = "c++17"}, includes = "mds/mds.hpp"})) | ||
end) |