unic_ucd_version/
unicode_version.rs

1// Copyright 2017 The UNIC Project Developers.
2//
3// See the COPYRIGHT file at the top-level directory of this distribution.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11use unic_common::version::UnicodeVersion;
12
13/// The [Version of The Unicode Standard](https://www.unicode.org/versions/) of the Unicode
14/// Character Database in use.
15pub const UNICODE_VERSION: UnicodeVersion = include!("../tables/unicode_version.rsv");
16
17#[cfg(test)]
18mod tests {
19    use super::UNICODE_VERSION;
20
21    #[test]
22    fn validate_version_values() {
23        assert!(UNICODE_VERSION.major > 0);
24
25        // Current release schedule of Unicode is to have one Major version update each year, with
26        // no Minor updates. We hard-code this internal policy while it stands.
27        assert!(UNICODE_VERSION.minor == 0);
28    }
29}