summaryrefslogtreecommitdiffstats
path: root/third_party/rust/glsl/tests/incorrect_statement.rs
blob: 2e39a7f53617e42bb87b0613399fe30ed98dbd70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use glsl::parser::Parse;
use glsl::syntax;

#[test]
fn incorrect_statement() {
  let r = syntax::TranslationUnit::parse(
    "
    int fetch_transform(int id) {
      return id;
    }

    bool ray_plane() {
      if 1 {
    }
    ",
  );

  assert!(r.is_err());
}