DevOps Automation

DevOps Automation

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#DevOps
#Businessautomation
#DevOpsAutomation
 View Only
  • 1.  How to develop a test case for the following C code

    Posted 03/19/21 01:58 PM

    -> Turn_Dir[2][ 2] = &TURN_DIRC;

    Turn_Dir[2][ 2] is declared as ' Bool (*Turn_Dir[2][ 2]) (void); '

    TURN_DIRC is a function declared as ' int TURN_DIRC (void); '

    function pointer of type 2d array is assigning with address of a function.

    Please answer if you know how to wite a test.ptu for this part of C source code.

    Thanks in advance,

    Lokesh.


    #SupportMigration
    #Support
    #RationalTestRealTime


  • 2.  RE: How to develop a test case for the following C code
    Best Answer

    Posted 03/20/21 05:20 PM

    You have to write a test case to verify that Turn_Dir[2][2] is assigned with NONIL value.


    #RationalTestRealTime
    #SupportMigration
    #Support


  • 3.  RE: How to develop a test case for the following C code
    Best Answer

    Posted 03/22/21 06:07 AM

    Thank you Rangareddy, Yes it worked when initialized with NULL and checking expected value as &TURN_DIRC.


    #Support
    #RationalTestRealTime
    #SupportMigration