Migrate lib-obj test to ocamltest

master
Nicolas Ojeda Bar 2017-12-02 23:17:06 +01:00 committed by Sébastien Hinderer
parent 36e979c397
commit bd490da145
3 changed files with 8 additions and 25 deletions

View File

@ -1,21 +0,0 @@
#**************************************************************************
#* *
#* OCaml *
#* *
#* Xavier Clerc, SED, INRIA Rocquencourt *
#* *
#* Copyright 2010 Institut National de Recherche en Informatique et *
#* en Automatique. *
#* *
#* All rights reserved. This file is distributed under the terms of *
#* the GNU Lesser General Public License version 2.1, with the *
#* special exception on linking described in the file LICENSE. *
#* *
#**************************************************************************
BASEDIR=../..
MODULES=
MAIN_MODULE=reachable_words
include $(BASEDIR)/makefiles/Makefile.one
include $(BASEDIR)/makefiles/Makefile.common

View File

@ -0,0 +1 @@
reachable_words.ml

View File

@ -1,8 +1,11 @@
(* TEST
*)
let native =
match Filename.basename Sys.argv.(0) with
| "program.byte" | "program.byte.exe" -> false
| "program.native" | "program.native.exe" -> true
| s -> print_endline s; assert false
match Sys.backend_type with
| Sys.Native -> true
| Sys.Bytecode -> false
| Sys.Other s -> print_endline s; assert false
let size x = Obj.reachable_words (Obj.repr x)