<p>Max has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/12336">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">VLR tests: add logging macro with explicit value description<br><br>To avoid leaking structure details into test we sometimes have to<br>separate value description from actual value. Introduce new macro which<br>makes that possible and convert old one into trivial wrapper around it.<br><br>Change-Id: Ic462297edac4c55689f93cc45771c8b5e2aed864<br>---<br>M tests/msc_vlr/msc_vlr_tests.h<br>1 file changed, 5 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/36/12336/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h</span><br><span>index f7ff940..3629967 100644</span><br><span>--- a/tests/msc_vlr/msc_vlr_tests.h</span><br><span>+++ b/tests/msc_vlr/msc_vlr_tests.h</span><br><span>@@ -182,11 +182,13 @@</span><br><span>                OSMO_ASSERT(accepted == expect_accepted); \</span><br><span>  } while (false)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define VERBOSE_ASSERT(val, expect_op, fmt) \</span><br><span style="color: hsl(120, 100%, 40%);">+#define V_ASSERT(desc, val, expect_op, fmt)   \</span><br><span>    do { \</span><br><span style="color: hsl(0, 100%, 40%);">-          log(#val " == " fmt, (val)); \</span><br><span style="color: hsl(120, 100%, 40%);">+              log(desc " == " fmt, (val)); \</span><br><span>             OSMO_ASSERT((val) expect_op); \</span><br><span style="color: hsl(0, 100%, 40%);">- } while (0);</span><br><span style="color: hsl(120, 100%, 40%);">+  } while (0)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define VERBOSE_ASSERT(val, expect_op, fmt) V_ASSERT(#val, val, expect_op, fmt)</span><br><span> </span><br><span> #define EXPECT_CONN_COUNT(N) VERBOSE_ASSERT(llist_count(&net->ran_conns), == N, "%d")</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12336">change 12336</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12336"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic462297edac4c55689f93cc45771c8b5e2aed864 </div>
<div style="display:none"> Gerrit-Change-Number: 12336 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Max <msuraev@sysmocom.de> </div>