Commit 7e6e46ae authored by Philip Trettner's avatar Philip Trettner
Browse files

span updates

parent cdc7b65f
Pipeline #15610 passed with stage
in 8 minutes and 18 seconds
glow @ b749957c
Subproject commit 6c99baa6ac43086a5bf94ea37898af9f19cba4fc
Subproject commit b749957cbf3738e6e21ce40a484d9005dbb5444f
glow-extras @ d836a59a
Subproject commit e8dc78bc104a0c0efbbcebd2031fc76053fc587a
Subproject commit d836a59ac09549fd5b3ddbd7ecfe12955a941f40
polymesh @ 65025e1a
Subproject commit 2ee20575b944d16d44528653aa4ae158099493c8
Subproject commit 65025e1af6e6abb89401e0337d49310b01ba8833
typed-geometry @ 9f74e822
Subproject commit fd57c320949e93a701e533ea436e1f4480e76350
Subproject commit 9f74e822f4b8e3d974de0fd615ca185dd0a34e75
#include <doctest.hh>
#include <vector>
#include <polymesh/span.hh>
TEST_CASE("pm::span")
{
std::vector<int> v = {1, 2, 3};
auto s = polymesh::span<int const>(v);
CHECK(s.size() == 3);
CHECK(s[0] == 1);
CHECK(s[1] == 2);
CHECK(s[2] == 3);
auto test = [](polymesh::span<int const> s) {
CHECK(s.size() == 2);
CHECK(s[0] == 5);
CHECK(s[1] == 5);
};
test(std::vector<int>(2, 5));
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment