Skip to content
Snippets Groups Projects
Select Git revision
  • 567a08e89d356696b67e5a55476475a95d2f23d6
  • 2024ws default protected
  • 2023ws
3 results

hello-03

Blame
  • Forked from Peter Gerwinski / Datenbanken und Datensicherheit
    Source project has a limited visibility.
    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.
    ///