This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26386 )
Change subject: library/Misc_Helpers: add f_is_osmocom_* functions
......................................................................
Patch Set 1: Code-Review-1
I don't like such kind of functions doing simple things like:
return foo == "bar";
Probably you win shorter line length:
if (Misc_Helpers.mp_osmocom_stack_version == "nightly") { ... }
vs
if (f_is_osmocom_nightly()) { ... }
but still I would go for something more generic, like having an enumerated type:
type enumerated OsmoSUTVer {
OSMO_SUT_VER_NIGHTLY,
OSMO_SUT_VER_LATEST,
OSMO_SUT_VER_2021Q4
};
and then a single function:
function f_osmo_sut_ver_is(template OsmoSUTVer ver)
return boolean {
return match(mp_osmocom_stack_version, ver);
}
This approach is cleaner IMO, and allows to match several variants at a time:
if (f_osmo_sut_ver_is((OSMO_SUT_VER_LATEST, OSMO_SUT_VER_2021Q4))) { ... }
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26386
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic33d08992ea84af006d133db6aec508a7b7c7f28
Gerrit-Change-Number: 26386
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 26 Nov 2021 15:13:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211126/df8eef45/attachment.htm>