1 #include <catch2/catch_test_macros.hpp>
2 #include <nlohmann/json.hpp>
3 #include <wmtk/components/procedural/procedural.hpp>
4 #include <wmtk/components/utils/Paths.hpp>
11 const std::filesystem::path
data_dir = WMTK_DATA_DIR;
13 TEST_CASE(
"component_procedural_nocoord",
"[components][procedural][.]")
19 json component_json = {
23 {{
"tiling",
"diagonal"},
24 {
"dimensions", {5, 5}},
25 {
"cycles", {
false,
false}},
26 {
"coordinates",
nullptr}}}};
33 json component_json = {
37 {{
"tiling",
"freudenthal"},
38 {
"dimensions", {5, 5, 5}},
39 {
"cycles", {
false,
false,
false}},
40 {
"coordinates",
nullptr}}}};
47 json component_json = {
48 {
"name",
"triangle_fan"},
50 {
"fan", {{
"size", 10}, {
"coordinates",
nullptr}}}};
57 json component_json = {
58 {
"type",
"procedural"},
61 {
"disk", {{
"size", 10}, {
"coordinates",
nullptr}}}};
67 TEST_CASE(
"component_procedural_coords",
"[components][procedural][.]")
73 json component_json = {
77 {{
"tiling",
"diagonal"},
78 {
"dimensions", {5, 5}},
79 {
"cycles", {
false,
false}},
80 {
"coordinates", {{
"name",
"vertices"}, {
"spacing", {0.2, 0.2}}}}}}};
87 json component_json = {
91 {{
"tiling",
"freudenthal"},
92 {
"dimensions", {5, 5, 5}},
93 {
"cycles", {
false,
false,
false}},
94 {
"coordinates", {{
"name",
"vertices"}, {
"spacing", {0.2, 0.2, 0.2}}}}}}};
101 json component_json = {
102 {
"name",
"triangle_fan"},
107 {{
"name",
"vertices"},
109 {
"center", {.5, .5}},
110 {
"degrees", {0, 180}}}}}}};
117 json component_json = {
123 {{
"name",
"vertices"},
125 {
"center", {.5, .5}},
126 {
"degree_offset", 0.0}}}}}};
132 TEST_CASE(
"component_procedural_cyclic_grids",
"[components][procedural]")
138 json component_json = {
142 {{
"tiling",
"diagonal"},
143 {
"dimensions", {5, 5}},
144 {
"cycles", {
true,
true}},
145 {
"coordinates", {{
"name",
"vertices"}, {
"spacing", {0.2, 0.2}}}}}}};
152 json component_json = {
156 {{
"tiling",
"freudenthal"},
157 {
"dimensions", {5, 5, 5}},
158 {
"cycles", {
true,
true,
true}},
159 {
"coordinates", {{
"name",
"vertices"}, {
"spacing", {0.2, 0.2, 0.2}}}}}}};
const std::filesystem::path data_dir
TEST_CASE("component_procedural_nocoord", "[components][procedural][.]")