mirror of
https://github.com/luxfi/ledger.git
synced 2026-10-30 16:21:35 +00:00
36 lines
1011 B
Plaintext
36 lines
1011 B
Plaintext
#![feature(prelude_import)]
|
|
//! Test the version macro
|
|
#[prelude_import]
|
|
use std::prelude::rust_2018::*;
|
|
#[macro_use]
|
|
extern crate std;
|
|
use ledger_tezos_derive::version;
|
|
pub const APPVERSION_M: ::core::primitive::u8 = 3u8;
|
|
pub const APPVERSION_N: ::core::primitive::u8 = 0u8;
|
|
pub const APPVERSION_P: ::core::primitive::u8 = 3u8;
|
|
extern crate test;
|
|
#[cfg(test)]
|
|
#[rustc_test_marker]
|
|
pub const version: test::TestDescAndFn = test::TestDescAndFn {
|
|
desc: test::TestDesc {
|
|
name: test::StaticTestName("version"),
|
|
ignore: false,
|
|
allow_fail: false,
|
|
compile_fail: false,
|
|
no_run: false,
|
|
should_panic: test::ShouldPanic::No,
|
|
test_type: test::TestType::IntegrationTest,
|
|
},
|
|
testfn: test::StaticTestFn(|| test::assert_test_result(version())),
|
|
};
|
|
fn version() {
|
|
let _major = APPVERSION_M;
|
|
let _minor = APPVERSION_N;
|
|
let _patch = APPVERSION_P;
|
|
}
|
|
#[rustc_main]
|
|
pub fn main() -> () {
|
|
extern crate test;
|
|
test::test_main_static(&[&version])
|
|
}
|