Newer
Older
snipet / libscpp / trunk / unittest / src / ut_errno.cpp
Nomura Kei on 26 Aug 2022 495 bytes old svn data to git
#include <string>

#include <scpp_os.hpp>
#include <scpp_unittest.hpp>
#include <scpp_errno.hpp>

using namespace scpp;


/***
 * Exception 単体テスト.
 */
class ErrnoTest : public TestCase
{
	public:
		ErrnoTest() {}
		~ErrnoTest() {}

		void testErrno()
		{
			Errno::setError(0);
			int errorNum = Errno::getError();
			Assertion::assertEquals(0, errorNum);
			// Errno::getErrorMeesage は他でテストしてるので省略
		}


		void suite()
		{
			RUN_TEST(testErrno);

		}


};