jeudi 4 avril 2019

Implementation of user defined callback functions in CAPL

We are using CAPL test module consisting of MainTest function and individual test case function e.g in below snippet need to call each test case in sequence one by one based on some Test ID .

However instead of calling in sequence how we can call these test case functions using some callback mechanism in CAPL since function signature is same for all test cases.

void MainTest () 
{ 
  Testcase_1 (); 
  Testcase_2 (); 
  Testcase_3 (); 
}

In C Language we can use array of function pointers . Is there any similar functionality which can be used in CAPL also ?

Aucun commentaire:

Enregistrer un commentaire