DirectDrawOverlayLibTest

DirectDrawOverlayLibTest - #define BOOST_AUTO_TEST_MAIN...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#define BOOST_AUTO_TEST_MAIN #include <boost\test\auto_unit_test.hpp> #include <OverlayRectangle.h> #include <Exception.h> # DDCAPS MakeCaps(DWORD flags = 0, DWORD alignBoundarySrc = 0, DWORD alignBoundaryDest = 0, DWORD alignSizeSrc = 0, DWORD alignSizeDest = 0, DWORD minStretch = 0, DWORD maxStretch = 0) { DDCAPS caps; memset(&caps, 0, sizeof(DDCAPS)); m caps.dwSize = sizeof(DDCAPS); caps.dwCaps = flags; caps.dwAlignBoundarySrc = alignBoundarySrc; caps.dwAlignBoundaryDest = alignBoundaryDest; caps.dwAlignSizeSrc = alignSizeSrc; caps.dwAlignSizeDest = alignSizeDest; caps.dwMinOverlayStretch = minStretch; caps.dwMaxOverlayStretch = maxStretch; c return caps; } BOOST_AUTO_TEST_CASE(TestRectangleNoRestrictions) { const DDCAPS noRestrictionCaps = MakeCaps(); const Overlay::Rectangle rs = Overlay::CreateSourceRectangle(noRestrictionCaps, 123, 456, 321, 654); BOOST_CHECK( rs.Top() == 456 && rs.Width() == 321 && rs.Height() == 654); r const Overlay::Rectangle rd = Overlay::CreateDestinationRectangle(noRestrictionCaps,
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

DirectDrawOverlayLibTest - #define BOOST_AUTO_TEST_MAIN...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online