MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / test_Vector2

Function test_Vector2

test_python/test_iterators.py:64–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63
64def test_Vector2():
65 double_vec = mrmesh.Vector2d(1, 2)
66 int_vec = mrmesh.Vector2i(1, 2)
67 float_vec = mrmesh.Vector2f(1, 2)
68
69 doubles_list = list(double_vec)
70 ints_list = list(int_vec)
71 floats_list = list(float_vec)
72
73 assert len(doubles_list) == 2
74 assert len(ints_list) == 2
75 assert len(floats_list) == 2
76
77 assert type(doubles_list[0]) == float # Double is converted to float in python
78 assert type(ints_list[0]) == int
79 assert type(floats_list[0]) == float
80
81 elementwise_comparison_2(doubles_list, double_vec)
82 elementwise_comparison_2(ints_list, int_vec)
83 elementwise_comparison_2(floats_list, float_vec)
84
85 iteration_check(double_vec)
86 iteration_check(int_vec)
87 iteration_check(float_vec)
88
89def test_ValidFacesIteration():
90 mesh = mrmesh.makeCube()

Callers

nothing calls this directly

Calls 3

typeFunction · 0.85
elementwise_comparison_2Function · 0.85
iteration_checkFunction · 0.85

Tested by

no test coverage detected