TEST( TestVTableHeaderOnlySBOCOWFooable, CopyFromValue_SmallObject )
{
    MockFooable mock_fooable;
    auto value = mock_fooable.foo();
    Fooable fooable( mock_fooable );

    test_interface( fooable, value, Mock::other_value );
}
TEST( TestVTableSBOFooable, CopyFromValue_LargeObject )
{
    MockLargeFooable mock_fooable;
    auto value = mock_fooable.foo();
    Fooable fooable( mock_fooable );

    test_interface( fooable, value, Mock::other_value );
}
TEST( TestVTableSBOFooable, MoveFromValue_SmallObject )
{
    MockFooable mock_fooable;
    auto value = mock_fooable.foo();
    Fooable fooable( std::move(mock_fooable) );

    test_interface( fooable, value, Mock::other_value );
}
TEST( TestVTableHeaderOnlySBOCOWFooable, MoveFromValue_LargeObject )
{
    MockLargeFooable mock_fooable;
    auto value = mock_fooable.foo();
    Fooable fooable( std::move(mock_fooable) );

    test_interface( fooable, value, Mock::other_value );
}
TEST( TestBasicFooable, CopyFromValue )
{
    MockFooable mock_fooable;
    auto value = mock_fooable.foo();
    Fooable fooable( mock_fooable );

    test_interface( fooable, value, Mock::other_value );
}
TEST( TestCOWFooable, MoveFromValue )
{
    MockFooable mock_fooable;
    auto value = mock_fooable.foo();
    Fooable fooable( std::move(mock_fooable) );

    test_interface( fooable, value, Mock::other_value );
}
TEST( TestVTableSBOFooable, MoveConstruction_LargeObject )
{
    Fooable fooable = MockLargeFooable();
    auto value = fooable.foo();
    Fooable other( std::move(fooable) );

    test_interface( other, value, Mock::other_value );
    death_tests(fooable);
}
TEST( TestVTableHeaderOnlySBOCOWFooable, CopyAssignFromValue_LargeObject )
{
    MockLargeFooable mock_fooable;
    Fooable fooable;

    auto value = mock_fooable.foo();
    fooable = mock_fooable;
    test_interface(fooable, value, Mock::other_value);
}
TEST( TestVTableHeaderOnlySBOCOWFooable, MoveConstruction_SmallObject )
{
    Fooable fooable = MockFooable();
    auto value = fooable.foo();
    Fooable other( std::move(fooable) );

    test_interface( other, value, Mock::other_value );
    death_tests(fooable);
}
TEST( TestVTableSBOFooable, MoveAssignFromValue_LargeObject )
{
    MockLargeFooable mock_fooable;
    Fooable fooable;

    auto value = mock_fooable.foo();
    fooable = std::move(mock_fooable);
    test_interface(fooable, value, Mock::other_value);
}
TEST( TestVTableSBOFooable, CopyAssignFromValue_SmallObject )
{
    MockFooable mock_fooable;
    Fooable fooable;

    auto value = mock_fooable.foo();
    fooable = mock_fooable;
    test_interface(fooable, value, Mock::other_value);
}
TEST( TestCOWFooable, MoveConstruction )
{
    Fooable fooable = MockFooable();
    auto value = fooable.foo();
    Fooable other( std::move(fooable) );

    test_interface( other, value, Mock::other_value );
    death_tests(fooable);
}
TEST( TestCOWFooable, CopyAssignFromValue )
{
    MockFooable mock_fooable;
    Fooable fooable;

    auto value = mock_fooable.foo();
    fooable = mock_fooable;
    test_interface(fooable, value, Mock::other_value);
}
TEST( TestBasicFooable, MoveAssignFromValue )
{
    MockFooable mock_fooable;
    Fooable fooable;

    auto value = mock_fooable.foo();
    fooable = std::move(mock_fooable);
    test_interface(fooable, value, Mock::other_value);
}
TEST( TestCOWFooable, MoveAssignment )
{
    Fooable fooable = MockFooable();
    auto value = fooable.foo();
    Fooable other;
    other = std::move(fooable);

    test_interface( other, value, Mock::other_value );
    death_tests(fooable);
}
TEST( TestVTableHeaderOnlySBOCOWFooable, MoveAssignment_SmallObject )
{
    Fooable fooable = MockFooable();
    auto value = fooable.foo();
    Fooable other;
    other = std::move(fooable);

    test_interface( other, value, Mock::other_value );
    death_tests(fooable);
}
TEST( TestVTableSBOFooable, MoveAssignment_LargeObject )
{
    Fooable fooable = MockLargeFooable();
    auto value = fooable.foo();
    Fooable other;
    other = std::move(fooable);

    test_interface( other, value, Mock::other_value );
    death_tests(fooable);
}
示例#18
0
TEST( serialise, guess_xml ) { std::istringstream iss( xml ); ASSERT_NO_THROW( test_interface( iss ) ); }
示例#19
0
TEST( serialise, guess_path_value_root ) { std::istringstream iss( path_value_root ); ASSERT_NO_THROW( test_interface( iss, "root/item" ) ); }
示例#20
0
TEST( serialise, guess_path_value ) { std::istringstream iss( path_value ); ASSERT_NO_THROW( test_interface( iss ) ); }