1 # Copyright (C) 2017-2018 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with GCC; see the file COPYING3. If not see
15 # <http://www.gnu.org/licenses/>.
17 load_lib libphobos-dg.exp
19 set dg-output-text [list]
21 # Arguments to pass to the test program, expected output, and return code.
22 set cycle_test_list [list \
24 { abort "object.Error@.*: Cyclic dependency between module mod. and mod." 1 } \
25 { print "Cyclic dependency between module mod. and mod." 0 } \
26 { deprecate "Deprecation 16211 warning:" 0 } \
32 # Gather a list of all tests.
33 set tests [lsort [find $srcdir/$subdir *.d]]
36 foreach cycle_test $cycle_test_list {
37 # The set the argument to pass to the program.
38 set libphobos_run_args "--DRT-oncycle=[lindex $cycle_test 0]"
40 # Whether the program is expected to fail.
41 set expected_fail [lindex $cycle_test 2]
44 set shouldfail $expected_fail
45 dg-test $test "" $DEFAULT_DFLAGS
49 set libphobos_run_args ""