Christopher Wright wrote:
However, if a patch exists, there is only one excuse for not including it: lack of testing.


And there is one huge reason that nobody submits additional test cases to your DMD test suite -- you've never released it, or even specified the required format.

That's because of its uncertain copyright status. It's a collection of everything that went wrong in the past, from a wide variety of sources.

As to its format, it is designed to be run by a shell script. Each source file is expected to compile and run without error, error means terminating with an exception or a non-zero return from main().

In other words, the test suite is designed to not require manual inspection of results, and it halts on the first failure.

A typical test case would look like:

/***************************************************/

template A()
{
  static T foo(T)(T t) { return 7 + t; }
}

struct Bar
{
  mixin A!() a;
}

void test2()
{
  auto i = A!().foo(1);
  assert(i == 8);
  i = Bar.a.foo!(int)(2);
  assert(i == 9);
  i = Bar.a.foo(3);
  assert(i == 10);
}

/*****************************************************/

along with a main() that calls the testNN() functions. The shell script I run is with a custom shell language http://www.digitalmars.com/ctg/shell.html

The custom nature of it is its ability to keep rerunning a group of commands with different combinations of arguments. This is pretty handy for testing with the combinatorial explosion of compiler switches.

Reply via email to