#include "dps/labels.hpp"

#include <cstdlib>
#include <iostream>

namespace {

bool expect_label(int level, const std::string &expected) {
    const std::string actual = dps::membership_label(level);
    if (actual == expected) {
        return true;
    }
    std::cerr << "unexpected label for level " << level << "\n";
    return false;
}

}  // namespace

int main() {
    if (!expect_label(1, "\xE9\xBB\x84\xE9\x87\x91\xE4\xBC\x9A\xE5\x91\x98")) return EXIT_FAILURE;
    if (!expect_label(2, "\xE9\x92\xBB\xE7\x9F\xB3\xE4\xBC\x9A\xE5\x91\x98")) return EXIT_FAILURE;
    if (!expect_label(3, "\xE8\x87\xB3\xE8\x87\xBB\xE4\xBC\x9A\xE5\x91\x98")) return EXIT_FAILURE;
    if (!expect_label(99, "\xE9\xBB\x84\xE9\x87\x91\xE4\xBC\x9A\xE5\x91\x98")) return EXIT_FAILURE;
    return EXIT_SUCCESS;
}
