1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
extern crate glsl; use glsl::parser::Parse; use glsl::syntax::TranslationUnit; #[test] fn missing_zero_float_is_valid() { let r = TranslationUnit::parse( " void main() { float x = 1. * .5; }", ); assert!(r.is_ok()); } #[test] fn float_exp_is_valid() { let r = TranslationUnit::parse( " void main() { float x = 1e-5; }", ); assert!(r.is_ok()); }