Update tests

This commit is contained in:
topecongiro 2017-06-14 00:09:17 +09:00
parent e2d51aeb41
commit 6047179ab0
2 changed files with 32 additions and 0 deletions

View File

@ -52,3 +52,19 @@ struct Foo {
# [ derive ( Clone , PartialEq , Debug , Deserialize , Serialize ) ]
foo: usize,
}
// #1668
/// Default path (*nix)
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
fn foo() {
#[cfg(target_os = "freertos")]
match port_id {
'a' | 'A' => GpioPort { port_address: GPIO_A },
'b' | 'B' => GpioPort { port_address: GPIO_B },
_ => panic!(),
}
#[cfg_attr(not(target_os = "freertos"), allow(unused_variables))]
let x = 3;
}

View File

@ -48,3 +48,19 @@ struct Foo {
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
foo: usize,
}
// #1668
/// Default path (*nix)
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
fn foo() {
#[cfg(target_os = "freertos")]
match port_id {
'a' | 'A' => GpioPort { port_address: GPIO_A },
'b' | 'B' => GpioPort { port_address: GPIO_B },
_ => panic!(),
}
#[cfg_attr(not(target_os = "freertos"), allow(unused_variables))]
let x = 3;
}