I'm doing something wrong but I do not know what. Here are my files:
//main
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
//MyFoo.h
#pragma once
#include "stdafx.h"
class MyFoo
{
public:
MyFoo(void){};
int multiplyByTwo(int value);
~MyFoo(void){};
};
//MyFoo.cpp
#include "stdafx.h"
#include "Myfoo.h"
int MyFoo::multiplyByTwo(int value)
{
return value * 2;
}
//MyFoo_Test.cpp
#include "stdafx.h"
#include "Myfoo.h"
#define BOOST_TEST_MODULE MyTest
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE( my_test )
{
MyFoo a;
BOOST_REQUIRE( a.multiplyByTwo(2) == 5 );//<<---It shouldn't work
}
It seems that doesn't matter what I type will it be 5, 4 or eight this test passes each time. What am I doing wrong?