#include "catch2/catch.hpp"
#include "Helpers/TimeHelper.hpp"

TEST_CASE("Time format implementation", "[CUC]") {
	// a very simple test for the TimeHelper. Check the pField and the tField
	Message receive = Message(9, 2, Message::TC, 1); // random values
	TimeHelper::implementCUCTimeFormat(60, receive);

	// the pField as defined in the implementCUCTimeFormat()
	CHECK(receive.readBits(1) == 0);
	CHECK(receive.readBits(3) == 1);
	CHECK(receive.readBits(2) == 3);
	CHECK(receive.readBits(2) == 0);

	// the tField as defined in the implementCUCTimeFormat()
	CHECK(receive.readWord() == 60);

}