Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <random>
- #include <chrono>
- #include <gtest/gtest.h>
- #include <CPoint3D.hpp>
- namespace Geometry3D {
- class CPoint3DUnitTests : public ::testing::Test {
- private:
- static constexpr double MAX_DOUBLE = 10000.0;
- static constexpr double MIN_DOUBLE = -10000.0;
- std::mt19937* random_engine = nullprt;
- std::uniform_real_distribution<double>* double_distribution = nullptr;
- public:
- double getRandomDouble() {
- return double_distribution(*random_engine);
- }
- protected:
- void SetUp() {
- random_engine = new std::mt19937(std::chrono::system_clock::now().time_since_epoch().count());
- double_distribution = new std::uniform_real_distribution<double>(MIN_DOUBLE, MAX_DOUBLE);
- // TODO
- }
- void TearDown() {
- delete random_engine;
- delete double_distribution;
- }
- };
- TEST(CPoint3DUnitTests, getX) {
- // TODO
- // double x =
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement