Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spy on method with more than 1 params causes crash (MinGW) #212

Open
Ujifman opened this issue Jun 10, 2020 · 0 comments
Open

Spy on method with more than 1 params causes crash (MinGW) #212

Ujifman opened this issue Jun 10, 2020 · 0 comments

Comments

@Ujifman
Copy link

Ujifman commented Jun 10, 2020

The problem is when I try to use Spy on class's method which has two arguments, it causes application crash. If I delete argument int two, and change call of someMethod like proxy.someMethod(1); it runs successfully.
Full test code:

class SomeClass
{
public:
    virtual void someMethod(int one, int two)
    {
    }
};

TEST_CASE("Some")
{
    SECTION("")
    {
        SomeClass object;
        fakeit::Mock<SomeClass> spy(object);
        fakeit::Spy(Method(spy, someMethod));
        SomeClass &proxy = spy.get();
        proxy.someMethod(1, 2);
    }
}

My system: Windows 10 x64, MinGW 7.3 x86
Tried the same on Linux and gcc 7, and problem wasn't occured.

Unfortunately, debugger output isn't informative
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant