langtools/test/tools/javac/classfiles/attributes/lib/TestResult.java
changeset 43259 1a8c1621084d
parent 36526 3b41f1c69604
equal deleted inserted replaced
43258:45757c4367f2 43259:1a8c1621084d
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    80 
    80 
    81     public boolean checkContains(Collection<?> found, Collection<?> expected, String message) {
    81     public boolean checkContains(Collection<?> found, Collection<?> expected, String message) {
    82         Set<?> copy = new HashSet<>(expected);
    82         Set<?> copy = new HashSet<>(expected);
    83         copy.removeAll(found);
    83         copy.removeAll(found);
    84         if (!found.containsAll(expected)) {
    84         if (!found.containsAll(expected)) {
    85             return checkTrue(false, message + " FAIL : not found elements : " + copy);
    85             return checkTrue(false, message + " FAIL : not found elements : " + copy + "\n" +
       
    86                     "Actual: " + found);
    86         } else {
    87         } else {
    87             return checkTrue(true, message + " PASS : all elements found");
    88             return checkTrue(true, message + " PASS : all elements found");
    88         }
    89         }
    89     }
    90     }
    90 
    91