Add a test for #2919

This commit is contained in:
Seiichi Uchida 2018-08-16 07:09:52 +09:00
parent 7c1ad96e9f
commit 71dc033fca
2 changed files with 44 additions and 0 deletions

View File

@ -263,3 +263,19 @@ macro_rules! impl_as_byte_slice_arrays {
}
};
}
// #2919
fn foo() {
{
macro_rules! touch_value {
($func:ident, $value:expr) => {{
let result = API::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppendMode::paTouch);
let result = API::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppend);
let result = API::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppendM);
let result = APIIIIIIIII::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppendM);
let result = API::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppendMMMMMMMMMM);
debug_assert!(result == 0);
}};
}
}
}

View File

@ -305,3 +305,31 @@ macro_rules! impl_as_byte_slice_arrays {
}
};
}
// #2919
fn foo() {
{
macro_rules! touch_value {
($func:ident, $value:expr) => {{
let result = API::get_cached().$func(
self,
key.as_ptr(),
$value,
ffi::VSPropAppendMode::paTouch,
);
let result = API::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppend);
let result =
API::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppendM);
let result =
APIIIIIIIII::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppendM);
let result = API::get_cached().$func(
self,
key.as_ptr(),
$value,
ffi::VSPropAppendMMMMMMMMMM,
);
debug_assert!(result == 0);
}};
}
}
}