summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/unsafeLibs/all.T
blob: 774143e4a61abb781f1c5b3b40a6fcf20c331ec7 (plain)
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
29
30
31
32
# unsafeLib tests are all about testing that the correct
# standard library modules have been marked as unsafe.
# e.g no importing unsafePerformIO
# Checking base package is properly safe basically

# Just do the normal way, SafeHaskell is all in the frontend
def f( name, opts ):
  opts.only_ways = ['normal']

setTestOpts(f)

# Check correct methods are deprecated
test('Dep05', normal, compile_fail, [''])
test('Dep06', normal, compile_fail, [''])
test('Dep07', normal, compile_fail, [''])
test('Dep08', normal, compile_fail, [''])
test('Dep09', normal, compile_fail, [''])
test('Dep10', normal, compile_fail, [''])

# check unsafe modules are marked unsafe
test('BadImport01', normal, compile_fail, [''])
test('BadImport06', normal, compile_fail, [''])
test('BadImport07', normal, compile_fail, [''])
test('BadImport08', normal, compile_fail, [''])
test('BadImport09', normal, compile_fail, [''])
test('T21433', normal, compile_fail, [''])

# check safe modules are marked safe
test('GoodImport01', normal, compile, [''])
test('GoodImport02', normal, compile, [''])
test('GoodImport03', normal, compile, [''])