Git Product home page Git Product logo

Comments (6)

andlang avatar andlang commented on May 13, 2024 1

Thank you! It works perfectly 😊

from swiftymocky.

Przemyslaw-Wosko avatar Przemyslaw-Wosko commented on May 13, 2024

@andlang
Thanks for rising issue, i belive this was resolved, and we had this case covered in ingegration tests.

We will try to fix this issue ASAP and release new minor version.

Just FYI, along with rised issues, you can also submit PR with failing tests for some unnusual cases :)

from swiftymocky.

amichnia avatar amichnia commented on May 13, 2024

@andlang - looking into it, will try to have it covered until beginning of next week

from swiftymocky.

amichnia avatar amichnia commented on May 13, 2024

OK, so this will require further concept work. First of all - even if we can avoid ambiguity by specifying return type, like:

let strVal: String = mock.foo(bar: "str") // method called that returns string
let intVal: Int = mock.foo(bar: "int")  // method called that returns int

That leaves us with question - what to do for perform and verify?

The typical usage will be:

Verify(mock, .foo(bar: .any))

Does it applies to both methods? Should it apply to both methods?

We can try some more advanced syntax for that particular case, like:

Verify(mock, .foo(bar: .any, returning: String.self))
Verify(mock, .foo(bar: .any, returning: Int.self))

What do you guys think?

from swiftymocky.

Przemyslaw-Wosko avatar Przemyslaw-Wosko commented on May 13, 2024

@andrzejmichnia the solution you proposed seems to be nice and clear, how about other return types, like tuple?

from swiftymocky.

andlang avatar andlang commented on May 13, 2024

Thank you for replying so fast!
This solution with the returning parameter seems good for me!

from swiftymocky.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.