imsd-messages/tests/Number/main.cpp

25 lines
719 B
C++
Raw Normal View History

// SPDX-License-Identifier: GPL-3.0-only
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
// Number normalisation: the raw address a user types or the network sends
// becomes the conversation key (E.164 for numbers; short codes and
// alphanumeric senders verbatim). At this point only the harness exists:
// the test checks that the core links and the version constant is set.
import std;
import ImsdMessages;
namespace {
std::int32_t failures = 0;
void Check(bool ok, std::string_view what) {
std::println("{} {}", ok ? "PASS" : "FAIL", what);
if (!ok) ++failures;
}
}
int main() {
Check(!ImsdMessages::version.empty(), "the version constant is set");
return failures == 0 ? 0 : 1;
}