Skip to content
Snippets Groups Projects
Select Git revision
  • a095fa9e7977af44b1ea6da43e48ffa759eca088
  • 2025ss default
  • 2024ss
  • 2023ss
  • 2022ss
  • 2021ss
  • 2020ss
  • 2019ss
  • 2018ss
9 results

sfmath.sty

Blame
  • 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.
    ///