[Gambas-Notification] [Git][gambas/gambas][gb.test.tap] 7 commits: gb.test.tap: Fix output stream handling

Tobias Boege gitlab at mg.gitlab.com
Mon Feb 24 18:21:29 CET 2020

Tobias Boege pushed to branch gb.test.tap at Gambas / gambas

c0e12bb4 by Tobias Boege at 2020-02-24T14:11:10+01:00
gb.test.tap: Fix output stream handling

* NEW: Allow to set the output stream of Assert.
* BUG: Subtests inherit their parent's output stream.

- - - - -
5e8d2cc7 by Tobias Boege at 2020-02-24T14:18:39+01:00
gb.test.tap: Don't set ExitCode when reading from a Stream

* BUG: TestHarness cannot set ExitCode when there is no Process involved.

- - - - -
dc693bd9 by Tobias Boege at 2020-02-24T14:55:00+01:00
gb.test.tap: Allow Assert to be reset

* NEW: Add Reset() method to Assert. Useful if you use the same (automatic) instance for multiple TAP streams.
* BUG: Fix state handling in TapPrinter.Finished.

- - - - -
b18c4a27 by Tobias Boege at 2020-02-24T17:20:49+01:00
gb.test.tap: Fix subtest summary

* BUG: Correctly summarize subtest. In particular empty tests fail.

- - - - -
e10a75f5 by Tobias Boege at 2020-02-24T17:54:58+01:00
gb.test.tap: Add SkipAll and don't lose stderr

* NEW: Support skipping all tests.
* BUG: DO intercept a test process' stderr but forward it verbatim to the TAP stream.

- - - - -
b80257fe by Tobias Boege at 2020-02-24T18:18:39+01:00
gb.test.tap: Add more diagnostics

* NEW: Add more diagnostics when Assert methods fail.

- - - - -
f1868cdf by Tobias Boege at 2020-02-24T18:18:39+01:00
gb.test: Use gb.test.tap

* NEW: Use gb.test.

This removes the Assert and Track classes and uses gb.test.tap instead.
Test methods are now executed inside subtests, plan lines are auto-
matically emitted by the harness.

Differences between gb.tests's and gb.test.tap's Assert module:

  - Instead of Assert.True and Assert.False, use Assert.Ok.
  - Instead of Assert.Equals* for every type, there is a generic
    Assert.Equals for Variants and a specific Assert.StringEquals
    for strings which prints diagnostics when the test fails.
  - Assert.BailOut does not terminate the entire program, just
    the TAP stream.
  - Assert.ErrorWithCode is called Assert.ErrorCode.

All TAP printing is done through Assert now. Errors happening in the
test code are not caught and spoofed in the TAP stream anymore, they
cause a test failure. The system would be more robust if the testee
would be in a different process from the tester.

- - - - -

18 changed files:

- comp/src/gb.test.tap/.src/Assert.class
- comp/src/gb.test.tap/.src/Main.module
- comp/src/gb.test.tap/.src/Tap/TapPrinter.class
- comp/src/gb.test.tap/.src/TestHarness.class
- comp/src/gb.test/.project
- comp/src/gb.test/.src/TestMe.module
- comp/src/gb.test/.src/TestMyself/TestAllAsserts.test
- comp/src/gb.test/.src/TestMyself/TestBailout.test
- comp/src/gb.test/.src/TestMyself/TestElse.test
- comp/src/gb.test/.src/TestMyself/TestError.test
- comp/src/gb.test/.src/TestMyself/TestFailures.test
- comp/src/gb.test/.src/TestMyself/TestSetup.test
- comp/src/gb.test/.src/TestMyself/TestSetupTeardown.test
- − comp/src/gb.test/.src/TestSuite/Assert.module
- comp/src/gb.test/.src/TestSuite/TestCase.class
- comp/src/gb.test/.src/TestSuite/TestSuite.class
- − comp/src/gb.test/.src/TestSuite/Track.module
- comp/src/gb.test/.src/TestSuite/UnitTest.class

View it on GitLab: https://gitlab.com/gambas/gambas/-/compare/d8c765e9b0203600613c0ddfc891dcdf5c5a4db2...f1868cdf2dce3a23cb9ace2e548be0f0667b4372

View it on GitLab: https://gitlab.com/gambas/gambas/-/compare/d8c765e9b0203600613c0ddfc891dcdf5c5a4db2...f1868cdf2dce3a23cb9ace2e548be0f0667b4372
You're receiving this email because of your account on gitlab.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/notification/attachments/20200224/8209bb1d/attachment.html>

More information about the Notification mailing list