Project

General

Profile

Revision c3d8313d src/tools/stateflow/json-parser/test_json_parser_variables.ml

View differences:

src/tools/stateflow/json-parser/test_json_parser_variables.ml
127 127
                  "Program obtained from simple-var-real-neg.json is not correct")
128 128

  
129 129
let test_simple_var_real_wo_dec tests_ctxt =
130
  let prog = Parse.parse_prog
131
      (Yojson.Basic.from_file "../data-test/simple-var-real-wo-dec.json") in
132
  match prog with
133
  | Program ("simple_var_real_wo_dec", [ ], [ x ]) ->
134
    test_var_skeleton x "my_real_var_wo_dec"
135
      Tydec_real (Expr_const (Const_real (Num.num_of_int 2500, 0, "2500")))
136
  | _ -> raise (OUnitTest.OUnit_failure
137
                  "Program obtained from simple-var-real-wo-dec.json is not correct")
130
  assert_raises (Parse.JSON_parse_error("Invalid real constant 2500"))
131
    (fun _ -> Parse.parse_prog (Yojson.Basic.from_file
132
                                  "../data-test/simple-var-real-wo-dec.json"))
138 133

  
139 134
let var_suite =
140 135
  "suite for variables" >:::

Also available in: Unified diff