Commit Graph

4 Commits

Author SHA1 Message Date
Keir Mierle
243e32a85f pw_unit_test: Make simple runner look like GTest
This makes these changes to the unit test framework:

(1) Makes the simple test runner output match GTest
(2) Adds a new RunAllTestsStart() and RunAllTestsEnd() event
(3) Adds an intentionally-failing expectation to the sample test

Example output:

[==========] Running all tests.
[ RUN      ] PigweedTest.ExpectBool
[       OK ] PigweedTest.ExpectBool
[ RUN      ] PigweedTest.ExpectBasicComparisons
[       OK ] PigweedTest.ExpectBasicComparisons
[ RUN      ] PigweedTest.ExpectStringEquality
[       OK ] PigweedTest.ExpectStringEquality
[ RUN      ] PigweedTest.NonCopyableType
[       OK ] PigweedTest.NonCopyableType
[ RUN      ] PigweedTest.MacroArgumentsOnlyAreEvaluatedOnce
[       OK ] PigweedTest.MacroArgumentsOnlyAreEvaluatedOnce
[ RUN      ] FixtureTest.CustomFixture
[       OK ] FixtureTest.CustomFixture
[ RUN      ] PigweedTestFixture.TheNumberIs35
[       OK ] PigweedTestFixture.TheNumberIs35
[ RUN      ] PigweedTestFixture.YupTheNumberIs35
[       OK ] PigweedTestFixture.YupTheNumberIs35
[ RUN      ] PigweedTestFixture.MissingExpectations
../pw_unit_test/framework_test.cc:156: Failure
      Expected: missed_expectations == 200
[  FAILED  ] PigweedTestFixture.MissingExpectations
[==========] Done running all tests.
[  PASSED  ] 8 test(s).
[  FAILED  ] 1 test(s).

Change-Id: I813096a9d62423e256993ae03724337d52702297
2019-11-05 14:48:19 -08:00
Alexei Frolov
c10c81201d Add preprocessor and unit_test modules
This change adds two Pigweed modules: pw_preprocessor and pw_unit_test.
The preprocessor module contains header files providing helpful macros
for the C preprocessor. The unit test module contains a starter
implementation of a unit testing framework for Pigweed.

Change-Id: I46e1a4cae1fd8ce36d7840a2e92f8013fb489cde
2019-11-04 16:07:34 -08:00
Alexei Frolov
1a82c146ff
Initial Pigweed modules
This change adds Pigweed's first few (incomplete) modules: pw_build,
pw_status, and pw_toolchain. The main scaffolding for Pigweed's GN-based
build system is also included, with a root BUILDCONFIG and BUILD.gn file
defining a top-level modules build target.

Change-Id: I09599443d50696343d6c5b85853cb5cee3ce0026
2019-10-31 17:43:53 -07:00
Keir Mierle
5d1226f428 Initial commit for Pigweed
This sets up a basic license, readme, and contributors file.

Change-Id: I384e59e5d5ac0a2369606a360d5d2ed2cbface35
2019-10-31 13:26:45 -07:00