View Issue Details

IDProjectCategoryView StatusLast Update
0005306Talerotherpublic2019-12-20 19:12
ReporterMarcello Stanisci Assigned ToMarcello Stanisci  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.6Fixed in Version0.6 
Summary0005306: "Modular" tests for C components.
DescriptionEvery C component's test-suite contains a "run()" method that
defines a gigantic 'commands[]' array that then feeds to the
test interpreter.

This array accounts for various parts of the tested code,
so it would be more readable to include commands into this
array in a modular fashion, instead of just heaping test
commands in it.

Right now, we do:

commands[] = {

  /* Testing feature 1 */
  TALER_TESTING_cmd_x (..),
  TALER_TESTING_cmd_y (..),
  ...

  /* Testing feature 2 */
  TALER_TESTING_cmd_z (..),
  TALER_TESTING_cmd_y (..),
  ...
  
  /* Testing feature 3 */
  ...

};

Would be more readable to have:

commands[] = {
  
  /* Testing feature 1 */
  feature_1_tests (..),

  /* Testing feature 2 */
  feature_2_tests (..),

  /* Testing feature 3 */
  ...
};
TagsNo tags attached.

Activities

Christian Grothoff

2018-03-27 17:26

manager   ~0012905

You could achieve this using macros, or by having a meta-command that takes an array of commands ("subroutine").

Marcello Stanisci

2018-06-20 23:20

reporter   ~0013047

402a8b42 implements the meta-command technique. Note that the various test suites do NOT use this yet.

Marcello Stanisci

2018-06-26 13:22

reporter   ~0013081

010847f splits CMDs from merchant test cases;
193d95bd splits CMDs from exchange test cases.

Issue History

Date Modified Username Field Change
2018-03-27 13:01 Marcello Stanisci New Issue
2018-03-27 17:26 Christian Grothoff Assigned To => Marcello Stanisci
2018-03-27 17:26 Christian Grothoff Severity minor => tweak
2018-03-27 17:26 Christian Grothoff Status new => acknowledged
2018-03-27 17:26 Christian Grothoff Product Version => git (master)
2018-03-27 17:26 Christian Grothoff Target Version => 0.6
2018-03-27 17:26 Christian Grothoff Note Added: 0012905
2018-06-20 23:20 Marcello Stanisci Note Added: 0013047
2018-06-26 13:22 Marcello Stanisci Note Added: 0013081
2018-06-26 13:22 Marcello Stanisci Status acknowledged => resolved
2018-06-26 13:22 Marcello Stanisci Resolution open => fixed
2018-09-09 11:57 Christian Grothoff Fixed in Version => 0.6
2019-12-20 19:12 Christian Grothoff Status resolved => closed