Max has submitted this change and it was merged. (
https://gerrit.osmocom.org/12336 )
Change subject: VLR tests: add logging macro with explicit value description
......................................................................
VLR tests: add logging macro with explicit value description
To avoid leaking structure details into test we sometimes have to
separate value description from actual value. Introduce new macro which
makes that possible and convert old one into trivial wrapper around it.
Change-Id: Ic462297edac4c55689f93cc45771c8b5e2aed864
---
M tests/msc_vlr/msc_vlr_tests.h
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Max: Looks good to me, approved
Pau Espin Pedrol: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h
index f7ff940..7eb6d24 100644
--- a/tests/msc_vlr/msc_vlr_tests.h
+++ b/tests/msc_vlr/msc_vlr_tests.h
@@ -182,11 +182,13 @@
OSMO_ASSERT(accepted == expect_accepted); \
} while (false)
-#define VERBOSE_ASSERT(val, expect_op, fmt) \
+#define VAL_ASSERT(desc, val, expect_op, fmt) \
do { \
- log(#val " == " fmt, (val)); \
+ log(desc " == " fmt, (val)); \
OSMO_ASSERT((val) expect_op); \
- } while (0);
+ } while (0)
+
+#define VERBOSE_ASSERT(val, expect_op, fmt) VAL_ASSERT(#val, val, expect_op,
fmt)
#define EXPECT_CONN_COUNT(N) VERBOSE_ASSERT(llist_count(&net->ran_conns), ==
N, "%d")
--
To view, visit https://gerrit.osmocom.org/12336
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic462297edac4c55689f93cc45771c8b5e2aed864
Gerrit-Change-Number: 12336
Gerrit-PatchSet: 3
Gerrit-Owner: Max <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Stefan Sperling <[email protected]>