Commit 2eb3bf12 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a couple of hsc2hs tests

parent 5695b73d
......@@ -2,14 +2,28 @@ TOP=../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
ALL_TESTS = hsc2hs001 hsc2hs002
.PHONY: $(TESTS)
.PHONY: hsc2hs001
hsc2hs001:
'$(HSC2HS)' $@.hsc
'$(TEST_HC)' $(TEST_HC_OPTS) -c $@.hs
$(ALL_TESTS):
.PHONY: hsc2hs002
hsc2hs002:
'$(HSC2HS)' $@.hsc
'$(TEST_HC)' $(TEST_HC_OPTS) -c $@.hs
.PHONY: hsc2hs003
hsc2hs003:
'$(HSC2HS)' $@.hsc
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make $@
./$@
.PHONY: hsc2hs004
hsc2hs004:
'$(HSC2HS)' --cross-compile $@.hsc
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make $@
./$@
.PHONY: 3837
3837:
LANG=C '$(HSC2HS)' $@.hsc
......
......@@ -11,6 +11,18 @@ test('hsc2hs002',
run_command,
['$MAKE -s --no-print-directory hsc2hs002'])
test('hsc2hs003',
[extra_clean(['hsc2hs003.hs', 'hsc2hs003_hsc_make.c']),
if_platform('i386-unknown-mingw32', expect_broken(3929))],
run_command,
['$MAKE -s --no-print-directory hsc2hs003'])
test('hsc2hs004',
[extra_clean(['hsc2hs004.hs', 'hsc2hs004_hsc_make.c']),
if_platform('i386-unknown-mingw32', expect_broken(3929))],
run_command,
['$MAKE -s --no-print-directory hsc2hs004'])
test('3837',
[extra_clean(['3837.hs', '3837_hsc_make.c']),
......
-- Test that hsc2hs actually gives the right answer in "direct" mode
#include <stdint.h>
module Main (main) where
main :: IO ()
main = print #size uint16_t
-- Test that hsc2hs actually gives the right answer in "cross-compile" mode
#include <stdint.h>
module Main (main) where
main :: IO ()
main = print #size uint16_t
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment