Commit Graph

4 Commits

Author SHA1 Message Date
Rob Mohr
d6577b923d pw_compilation_testing: Fix link in docs
Change-Id: I943d600443417a61b247b1a5bc51c280866d5ce9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/116573
Reviewed-by: Anthony DiGirolamo <tonymd@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
2022-11-01 15:47:18 +00:00
Wyatt Hepler
bdcf2402b8 pw_compilation_testing: Relax PW_NC_EXPECT syntax; add tests
Allow PW_NC_EXPECT() statements to span multiple lines. The statements
must contain only string literals or //-style comments. This prevents
clang-format from breaking PW_NC_EXPECT() statements when it reflows
string literals.

With this change, statements like the following are permitted:

  PW_NC_EXPECT(  // This is a comment
               "This is a \"very\" long string that didn't "  // Comment
               "fit on one line,\nokay?");

Also added tests for negative compilation test parsing.

Change-Id: Ie7ad157c817eaf7f0f576bcd841f00426623b635
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/107678
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
2022-09-01 19:08:24 +00:00
Wyatt Hepler
1b7adca6f4 pw_compilation_testing: Add negative compilation tests
- Convert existing negative compilation tests to the new framework.
- Add a negative compilation test for pw_rpc service creation.

Change-Id: I204f4602dd8f49cb7c59fda04fbb1321828640ae
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/103364
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
2022-08-05 18:17:14 +00:00
Wyatt Hepler
13018162ab pw_compilation_testing: Negative compilation testing
Support for defining tests that verify that compilation fails when it
should fail.

Fixes: b/234882063
Change-Id: If2dbf14a7bae63cc286bcc72a3dcc16c089eb891
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/42240
Reviewed-by: Keir Mierle <keir@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2022-08-04 22:49:04 +00:00