// WARNING: This file is automatically generated by: scripts/update-unicode.py
#ifndef KEYSYM_CASE_EXCEPTIONS_TEST_H
#define KEYSYM_CASE_EXCEPTIONS_TEST_H

#include <stdint.h>
#include <unicode/uchar.h>

/* Unicode code points used in case mapping exceptions */
#define LATIN_SMALL_LETTER_SHARP_S   0x00df // ß
#define LATIN_CAPITAL_LETTER_SHARP_S 0x1e9e // ẞ

static inline uint32_t
to_simple_lower(uint32_t cp)
{
    return (uint32_t)u_tolower((UChar32) cp);
}

static inline uint32_t
to_simple_upper(uint32_t cp)
{
    switch (cp) {
    /* Some exceptions */
    case LATIN_SMALL_LETTER_SHARP_S:
        return LATIN_CAPITAL_LETTER_SHARP_S;
    /* Default to the Unicode simple mapping */
    default:
        return (uint32_t)u_toupper((UChar32) cp);
    }
}

#endif
