1
0
forked from Alepha/Alepha

66 Commits

Author SHA1 Message Date
adam 970cfa3b62 Unify everything to template_for form. 2024-07-05 12:23:26 -04:00
adam 32e6c36570 Rename the template_for header.
C++26 (I hope) is supposed to have this syntax:

```
template for( const auto &element: aggregate )
{
	...;
}
```

Thus, I've adjusted this gadget to have a similar name, to enable
simple mechanical code changes.  From Alepha, you'd use it
thus:

```
template_for( aggregate ) <=[&]( const auto &element )
{
	...;
};
```
2024-07-05 11:59:26 -04:00
adam b44539cab1 Table tests now print argument information about failed cases.
At least they'll print as much information as they can.
Unstreamable input types will just print typeid information.
2024-06-13 18:04:33 -04:00
adam fc02d1a0c3 Relax the test print debugging rules.
A type which cannot be printed when streamed in "Relaxed"
mode will simply print the typeid and that's it.  This is
opposed to its original behaviour which would be a compile
time error.
2024-06-13 18:03:33 -04:00
adam 33fa7cc711 Expose the stream value adaptor for tests.
This will permit calling this stream adaptor from
various contexts which are test related.
2024-06-13 18:03:12 -04:00
adam 500ad866eb Add an identity which works with TableTest 2024-06-12 16:59:11 -04:00
adam 26eb1b080e Basic support for exception verification in tests
This probably needs to be expanded upon.  The basic functionality
added is to permit a test expectation clause to be a function which
takes some kind of exception type.  That function can then
perform any arbitrary checks and analyses it needs to confirm that
the exception which was caught passes muster for that test case.
2024-06-12 00:08:14 -04:00
adam e16be47994 Fix a formatting nit. 2024-06-11 12:01:21 -04:00
adam 373b07e1c4 Apply the newer namespace rules and layout/formatting. 2024-04-02 23:32:02 -04:00
adam 3afe19965d Describe tests which are skipped.
This helps prevent silent test skipping on normal runs.
2024-01-27 04:49:05 -05:00
adam af6c39b153 Correct an incorrect forward declaration. 2023-11-19 01:36:43 -05:00
adam 4dac28a2c3 Better error messages in certain exception test situations. 2023-11-16 07:29:30 -05:00
adam 7b33b727bf Fix infinite recursion in debug printing in tests. 2023-11-16 03:10:07 -05:00
adam c6b66aa7b5 Individual TableTest cases can be disabled. 2023-11-13 11:45:56 -05:00
adam 4682fe3ffb Consolidate the StaticValue implementations. 2023-11-12 05:23:20 -05:00
adam 057aa27cb7 Testing improvements. 2023-11-12 00:12:40 -05:00
adam 57511b2588 Type erased much of TableTest.
This will let us adjust the output with fewer rebuilds.
2023-11-11 18:54:26 -05:00
adam c9f7e9cbc3 This can be the type erased base for Table Test. 2023-11-11 18:54:26 -05:00
adam df72d745e6 Unified testing output.
This should eliminate the duplicate "PASSED" or "FAILED" lines.

I think I can type-erase some of this sufficiently to make the
output rendering be in its own TU... then tweaks to test output
format will mostly require a relink, not a rebuild.
2023-11-11 18:54:26 -05:00
adam 8576253382 Cleanup some of the table test code. 2023-11-10 04:11:01 -05:00
adam d1157cabf7 Start the C++23 adoption. 2023-11-07 05:30:50 -05:00
adam ab13e7b58d Started work towards stream based output for debug printing.
This will let me fix the double-case printing in the universal
test case handler.
2023-11-06 22:58:31 -05:00
adam 3942d98684 Unify the Universal Handler forms for the Table test. 2023-11-06 22:42:30 -05:00
adam ceb87f118f Split out the debug printing helpers for tests. 2023-11-06 00:11:31 -05:00
adam 226e072322 Retire the non-universal legacy cases. 2023-11-05 23:58:44 -05:00
adam 17456f9af4 Drop some old, disabled code. 2023-11-05 03:04:04 -05:00
adam e0e99ead46 Split out the tuple adapter from the test framework.
Part of the larger testing framework simplification.
2023-11-05 00:30:15 -04:00
adam c74737d01d Tests weren't running. They didn't get registered. 2023-11-05 00:18:35 -04:00
adam b9dcec564d I think I have everything working with universal testing cases. 2023-10-29 03:13:40 -04:00
adam a61d6222c7 Minor reformat 2023-10-29 00:22:56 -04:00
adam 19f060b2a6 Move breakpoint stub to the top of the file. 2023-10-28 18:00:13 -04:00
adam bca067add4 Permit std::nothrow_t for no throwing cases, in addition to std::type_identity< void >. 2023-10-28 11:59:23 -04:00
adam 48549ff465 I have the universal handler working for value-test cases... 2023-10-28 10:57:41 -04:00
adam 2bd71cdfcf Merge branch 'master' of github.com:adamlsd/Alepha 2023-10-26 02:34:35 -04:00
adam bd3309e7ce The beginnings of UniversalCases.
The rest has to be fleshed out.  Then I can pivot the existing cases
to this, I think.
2023-10-26 01:32:46 -04:00
adam bba2544780 Split out some of the test core into its own TU.
This might cut down on test build times?  It will let
me polish up some of this stuff without needing to recompile
some things.
2023-10-26 00:54:33 -04:00
adam 6b3492636a Make test exception not part of the hierarchy.
(It shouldn't be caught, but for the framework.  Although `Condition`
may be the right type?)
2023-10-26 00:38:05 -04:00
adam 5021dfa8f9 Merge branch 'master' of github.com:adamlsd/Alepha 2023-10-26 00:00:06 -04:00
adam 685d33527e Table test output alignment. 2023-10-25 23:59:45 -04:00
adam 987aa454db Make test framework start using concepts... 2023-10-25 23:58:16 -04:00
adam a62335960e Rename string gen to IOStreams::String. 2023-10-25 20:54:39 -04:00
adam c2bc8dae2e Stream builder notation for strings.
This should be less boilerplate than repeated `lexical_cast`
or `stringify` calls when building strings.
2023-10-25 04:03:39 -04:00
adam cafc66e09f Make unit tests use the testing lib main function. 2023-10-24 00:58:38 -04:00
adam 794e4404a1 Put in some structure to test output.
This helps to visually distinguish between different cases
which executed and when new tests start.
2023-10-24 00:36:04 -04:00
adam 6aa302f791 Table testing for exception cases.
I still have to implement a bit more here, but this is a good start.
2023-10-23 04:10:51 -04:00
adam 795661873e Some output style changes for table test. 2023-10-23 04:08:46 -04:00
adam 1bb0c56224 Update and consolidate the console and colors code.
This introduces a subset of SGR-Name syntax.
2023-10-20 23:48:00 -04:00
adam 0b63658815 Unify the evaluation helpers implementations. 2023-10-20 04:49:07 -04:00
adam f5840e15ab IWYU for integer types in table test. 2023-10-20 03:32:42 -04:00
adam d2d1181c77 Fix the test literals namespace. 2023-10-15 19:57:11 -04:00