# Note that when testing multiple compilation units, we compile them all at
# once. If compiled separately, it is not reasonable to expect the compiler
# to open *.java to check that no other compilation unit declared a duplicate.
tcltest::test 7.1-unnamed-1 { The unnamed package may not contain duplicate
        members } {
    compile [saveas T71u1.java {
class T71u1 {}
class T71u1 {}
    }]
} FAIL

tcltest::test 7.1-unnamed-2 { The unnamed package may not contain duplicate
        members } {
    compile [saveas T71u2.java {
class T71u2 {}
interface T71u2 {}
    }]
} FAIL

tcltest::test 7.1-unnamed-3 { The unnamed package may not contain duplicate
        members } {
    compile [saveas T71u3.java {
interface T71u3 {}
interface T71u3 {}
    }]
} FAIL

tcltest::test 7.1-unnamed-4 { The unnamed package may not contain duplicate
        members } {
    compile [saveas T71u4a.java {
class T71u4a {}
    }] [saveas T71u4b.java {
class T71u4a {} // duplicate of the one in file T71u4a
class T71u4b {}
    }]
} FAIL

tcltest::test 7.1-named-1 { A named package may not contain duplicate
        members } {
    compile [saveas p1/T71n1.java {
package p1;
class T71n1 {}
class T71n1 {}
    }]
} FAIL

tcltest::test 7.1-named-2 { A named package may not contain duplicate
        members } {
    compile [saveas p1/T71n2.java {
package p1;
class T71n2 {}
interface T71n2 {}
    }]
} FAIL

tcltest::test 7.1-named-3 { A named package may not contain duplicate
        members } {
    compile [saveas p1/T71n3.java {
package p1;
interface T71n3 {}
interface T71n3 {}
    }]
} FAIL

tcltest::test 7.1-named-4 { A named package may not contain duplicate
        members } {
    compile [saveas p1/T71n4a.java {
package p1;
class T71n4a {}
    }] [saveas p1/T71n4b.java {
package p1;
class T71n4a {} // duplicate of the one in file T71n4a
class T71n4b {}
    }]
} FAIL

tcltest::test 7.1-named-5 { A named package may not contain duplicate
        members } {
    compile [saveas p1/T71n5/T71n5a.java {
package p1.T71n5;
class T71n5a {}
    }] [saveas p1/T71n5.java {
package p1;
class T71n5 {}
    }]
} FAIL

tcltest::test 7.1-named-6 { A named package may not contain duplicate
        members } {
    compile [saveas p1/T71n6/T71n6a.java {
package p1.T71n6;
class T71n6a {}
    }] [saveas p1/T71n6.java {
package p1;
interface T71n6 {}
    }]
} FAIL

tcltest::test 7.1-named-7 { A named package may not contain duplicate
        members } {
    compile [saveas java/lang.java {
package java;
class lang {}
    }]
} FAIL
