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

Function test_Vector3

test_python/test_iterators.py:38–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37
38def test_Vector3():
39 double_vec = mrmesh.Vector3d(1, 2, 3)
40 int_vec = mrmesh.Vector3i(1, 2, 3)
41 float_vec = mrmesh.Vector3f(1, 2, 3)
42
43 doubles_list = list(double_vec)
44 ints_list = list(int_vec)
45 floats_list = list(float_vec)
46
47 assert len(doubles_list) == 3
48 assert len(ints_list) == 3
49 assert len(floats_list) == 3
50
51 assert type(doubles_list[0]) == float # Double is converted to float in python
52 assert type(ints_list[0]) == int
53 assert type(floats_list[0]) == float
54
55 elementwise_comparison_3(doubles_list, double_vec)
56 elementwise_comparison_3(ints_list, int_vec)
57 elementwise_comparison_3(floats_list, float_vec)
58
59 iteration_check(double_vec)
60 iteration_check(int_vec)
61 iteration_check(float_vec)
62
63
64def test_Vector2():

Callers

nothing calls this directly

Calls 3

typeFunction · 0.85
elementwise_comparison_3Function · 0.85
iteration_checkFunction · 0.85

Tested by

no test coverage detected