Skip to content

CHECK_TYPE macro #131

Open
Open
@grahamreeds

Description

@grahamreeds

I was thinking this morning about unit testing a factory class. With a certain set of parameters I need to check that the emitted object is of the correct type. I think this will be similar to the CHECK_EXCEPTION macro.

struct TypeA { };
struct TypeB { };

TEST(MakeSureTypeAIsReturnedWithACertainSetOfParameters)
{
  // ... set parameters
  CHECK_TYPE(TypeA, DoSomethingThatShouldReturnAnObjectOfTypeA(...));
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions