Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.
This repository was archived by the owner on May 18, 2026. It is now read-only.

Add a simpler frontend for specifying a reporting format & making testcases #3

Description

@akesterson

shunit leaves a lot to be desired in terms of its interface. Here's how I'd like to call it:

  • Specify what reporting format I want
  • For all of the testcases I have, call a gateway function that takes:
    • The kind of testcase I'm running (the test type)
    • The type of failure this will count as if it fails
    • A canned failure message to use if it fails
    • A function that represents the testcase, which the gateway function should use as a callback

Essentially:

shunit_start junit
shunit_testcase 'my_testcase_function' 'test_type' 'type_failure'
shunit_finish

... The assumption would be that the testcase function would return nonzero on failure, and would print out error information to stderr. This is a much easier way to handle reporting tests than the current methods (either call the header/testcase/footer functions yourself, or try to make a bunch of 'shunittest_' functions and magic them through the shunit tester).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions