Commit Graph

5 Commits

Author SHA1 Message Date
Wyatt Hepler
48db4d6f50 Start the pw_string module
Introduce functions for outputting numbers as strings. Unlike some
snprintf implementations, these functions support 64-bit integers. Also,
very limited floating point support is provided.

These functions are faster than snprintf and never truncate numbers.

Change-Id: Id5ae06a5d175f15403c34cddb2a077a88be47cf8
2019-11-14 16:32:39 +00:00
Wyatt Hepler
771056581c pw_span module
pw::span is a stand-in for C++20's std::span.

Change-Id: I1f36d5da43493c20b4806f6cb1198faf62d47743
2019-11-08 17:15:01 -08:00
Alexei Frolov
925fb8f510 Build and run unit tests through GN
This change adds a GN template for defining unit test executables.
The template, called pw_test, defines the executable and outputs a JSON
metadata file for the test.

A new build argument is added. This argument determines whether unit
test run targets are supported by the current build target. If this is
set, the pw_test template additionally creates a run target for its test
executable which invokes the executable through a script.

A basic test runner script is added to the pw_unit_test module. This
script currently only runs a single test executable directly.

The unit tests in the pw_preprocessor module are updated to use the
pw_test template.

Change-Id: I3cbde9c19440276dbab80dd2bab5fec87abe6d7e
2019-11-08 01:16:04 +00: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