diff options
Diffstat (limited to 'src/repeat.rs')
-rw-r--r-- | src/repeat.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/repeat.rs b/src/repeat.rs index 5d9ece7..fe7523c 100644 --- a/src/repeat.rs +++ b/src/repeat.rs @@ -125,6 +125,7 @@ mod tests { use opengl_registry::command::{Command, Parameter, Prototype}; use pretty_assertions::assert_eq; + use proc_macro2::{Punct, Spacing}; use quote::quote; use super::*; @@ -147,12 +148,14 @@ mod tests ), ]); + let ht = Punct::new('#', Spacing::Alone); + assert_eq!( for_each_opengl_command_impl( "e! { unsafe { - functions::_gl_command_ = FunctionPtr::new_initialized( - get_proc_addr(stringify!(_gl_command_)) + functions::#ht gl_command = FunctionPtr::new_initialized( + get_proc_addr(stringify!(#ht gl_command)) ); } }, @@ -182,7 +185,7 @@ mod tests assert_eq!( for_each_opengl_command_impl( "e! { - fn _gl_command_(_gl_command_args_) -> _gl_command_ret_type_ {} + fn #ht gl_command(#ht gl_command_args) -> #ht gl_command_ret_type {} }, ®istry, ) |