01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Library License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
06: //
07: // $Id: SetTest.java,v 1.1 2001/12/18 10:31:30 per_nyfelt Exp $
08:
09: package org.ozoneDB.DxLib.test;
10:
11: import java.lang.*;
12: import java.util.*;
13: import org.ozoneDB.DxLib.*;
14:
15: /**
16: *
17: *
18: * @author <a href="http://www.softwarebuero.de/">SMB</a>
19: * @version $Revision: 1.1 $Date: 2001/12/18 10:31:30 $
20: */
21: public class SetTest extends AbstractTest {
22:
23: /**
24: */
25: public void retainsAll(DxSet set, Object[] objs) throws Exception {
26: set.addAll(objs);
27: DxSet set2 = (DxSet) set.clone();
28: startTimer(set.getClass().getName(), "retainsAll");
29:
30: set.retainAll(set2);
31: if (!set.equals(set2) && set.count() > 0) {
32: error();
33: }
34: set2.clear();
35: set.retainAll(set2);
36: if (!set.isEmpty()) {
37: error();
38: }
39:
40: stopTimer();
41: }
42:
43: }
|