2015-07-23 21:10:03 +00:00
|
|
|
#include "sample_vectors.hpp"
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
TEST(vwr, conversion) {
|
|
|
|
using namespace vwr;
|
|
|
|
|
|
|
|
{
|
|
|
|
svec1 s(10.0f);
|
|
|
|
EXPECT_EQ(s.x(), 10.0f);
|
2015-07-24 22:55:57 +00:00
|
|
|
|
|
|
|
auto s2 = s.x1();
|
|
|
|
static_assert(std::is_same<decltype(s2), svec2>::value, "Expecting svec2");
|
|
|
|
EXPECT_EQ(s2.x(), s.x());
|
|
|
|
EXPECT_EQ(s2.y(), 1.0f);
|
2015-07-23 21:10:03 +00:00
|
|
|
}
|
|
|
|
}
|