summaryrefslogtreecommitdiffstats
path: root/vendor/os_info/src/emscripten/mod.rs
blob: 36be37706fb93927f476a3bdebe55b2dcecb0f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use log::trace;

use crate::{Bitness, Info, Type};

// TODO: Somehow get the real OS version?
pub fn current_platform() -> Info {
    trace!("emscripten::current_platform is called");

    let info = Info::with_type(Type::Emscripten);
    trace!("Returning {:?}", info);
    info
}

#[cfg(test)]
mod tests {
    use super::*;
    use pretty_assertions::assert_eq;

    #[test]
    fn os_type() {
        let version = current_platform();
        assert_eq!(Type::Emscripten, version.os_type());
    }
}