Select Git revision
populator.rb
test_qpong.cpp 939 B
#include <iostream>
#include "gtest/gtest.h"
#include "ImageBuffer.hpp"
/// @brief Creating a test fixture frequently used objects for tests
///
class QPongLib : public testing::Test
{
protected:
ImageBuffer *momentumImage;
ImageBuffer *positionImage;
// members
// called before any test
void SetUp() override
{
}
virtual void TearDown()
{
}
};
/// @brief A simple function to test
///
int addInts(int a, int b)
{
return a + b;
}
TEST(ImageBuffer, getValue)
{
const ImageBuffer imbf;
const ImageBuffer imbff;
const ImageBuffer imbfff;
}
TEST(addInts, positiveValues)
{
int a {1};
int b {3};
ASSERT_EQ(addInts(a, b), 4);
}
TEST(addInts, shouldBreak)
{
EXPECT_NE(3+1, 0) << "Yes yes, because it is just a test!";
}
TEST(addInts, negativeValues)
{
ASSERT_EQ(-3 + -5, -8);
}
/// @todo Example for mocks and an explanation what they are.
///