1/* testreadonlyset.vala
2 *
3 * Copyright (C) 2008  Jürg Billeter
4 * Copyright (C) 2009  Didier Villevalois
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 * Lesser General Public License for more details.
15
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
19 *
20 * Author:
21 * 	Tomaž Vajngerl <quikee@gmail.com>
22 * 	Julien Peeters <contact@julienpeeters.fr>
23 */
24
25using Gee;
26
27public class ReadOnlySetTests : ReadOnlyCollectionTests {
28
29	public ReadOnlySetTests () {
30		base.with_name ("ReadOnlySet");
31	}
32
33	public override void set_up () {
34		test_collection = new HashSet<string> ();
35		ro_collection = get_ro_view (test_collection);
36	}
37
38	public override void tear_down () {
39		test_collection = null;
40		ro_collection = null;
41	}
42
43	protected override Collection<string> get_ro_view (Collection<string> collection) {
44		return ((Gee.Set<string>) collection).read_only_view;
45	}
46}
47