Support for Parametrized Tests on google test?

Sysprogs forums Forums VisualGDB Support for Parametrized Tests on google test?

This topic contains 5 replies, has 3 voices, and was last updated by  Jose Cazarin 5 days, 11 hours ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26458

    Jose Cazarin
    Participant

    Does VisualGDB support parametrized tests running on target with Google Test?

    Cause I was reading a tutorial and when I changed the macro of a test case from TEST() to TEST_P()  I started getting “No source available” errors on the Test Explorer

     

    Thanks!

    #26460

    Jensa
    Participant

    It does and it works fine for us.

    Did you remember to add the INSTANTIATE_TEST_CASE_P() macro to actually generate the code for them? The compiler errors you get are a bit horrible to figure out when it comes to the test code since it’s based on so much macro’s.

    Another issue could be that I think the source code for the tests might be handled a bit differently when it’s from the package manager so it might be some issues with it realizing that the code needs some stuff that was previously optimized away depending on your compiler/link parameters.

    #26465

    support
    Keymaster

    Thanks @jensa for confirming that it works for you.

    @jose-cazarin, if it still doesn’t work with your setup, could you please share your project type (MSBuild/Make), the build configuration (build on target, or using a cross-toolchain) and share the code that triggers the problem so that we could recheck it on our side?

    #27043

    Jose Cazarin
    Participant

    Getting back to this, what we are trying to do is: we have a .txt file with the inputs of an algorithm. We want to run this algorithm in our device and check if the results are the same. The problem is: this .txt file is too big, if we try to compile it within the embedded code we run out of memory. So we are trying to find a way to, during runtime, transfer the inputs from the PC to the embedded device and still use the GoogleTest framework

    We will start looking into it again and try to make the parameterized tests work. But I don’t know if that’s the solution for what we need.

    #27075

    support
    Keymaster

    Hi,

    The parametrized tests unfortunately won’t solve the problem, however we are planning to extend our advanced semihosting framework to support reading test data same way  it currently outputs test results. We should be able to give a time estimate on this in the next 1-2 weeks.

    #27180

    Jose Cazarin
    Participant

    Thanks, that would help a lot. I’ll keep in touch.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.