summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRegis Merlino <regis.merlino@intel.com>2013-03-21 11:03:51 +0100
committerRegis Merlino <regis.merlino@intel.com>2013-03-21 11:07:43 +0100
commitf3823f10612b7b0c6796a1041187999ba4afd887 (patch)
treee2b349b0e1477ee2d5864398e875b45a42c1d7af /tests
parent2306f3b30cc3117079c0cfcb8f2cad9720b141ab (diff)
downloadlibgee-f3823f10612b7b0c6796a1041187999ba4afd887.tar.gz
libgee-f3823f10612b7b0c6796a1041187999ba4afd887.tar.bz2
libgee-f3823f10612b7b0c6796a1041187999ba4afd887.zip
Update libgee to 0.9.92 (3462b25)
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am55
-rw-r--r--tests/Makefile.in934
-rw-r--r--tests/testarraylist.c100
-rw-r--r--tests/testarraylist.vala19
-rw-r--r--tests/testarrayqueue.c208
-rw-r--r--tests/testarrayqueue.vala38
-rw-r--r--tests/testbidirlist.c498
-rw-r--r--tests/testbidirlist.vala107
-rw-r--r--tests/testbidirsortedmap.c2251
-rw-r--r--tests/testbidirsortedmap.vala430
-rw-r--r--tests/testbidirsortedset.c1326
-rw-r--r--tests/testbidirsortedset.vala275
-rw-r--r--tests/testcase.c46
-rw-r--r--tests/testcase.vala10
-rw-r--r--tests/testcollection.c4034
-rw-r--r--tests/testcollection.vala660
-rw-r--r--tests/testcomparable.c258
-rw-r--r--tests/testcomparable.vala54
-rw-r--r--tests/testconcurrentlist.c188
-rw-r--r--tests/testconcurrentlist.vala38
-rw-r--r--tests/testconcurrentset.c209
-rw-r--r--tests/testconcurrentset.vala38
-rw-r--r--tests/testdata.c1103
-rw-r--r--tests/testdata.vala111
-rw-r--r--tests/testdeque.c2068
-rw-r--r--tests/testdeque.vala196
-rw-r--r--tests/testfunctions.c1203
-rw-r--r--tests/testfunctions.vala238
-rw-r--r--tests/testhashmap.c120
-rw-r--r--tests/testhashmap.vala37
-rw-r--r--tests/testhashmultimap.c34
-rw-r--r--tests/testhashmultimap.vala6
-rw-r--r--tests/testhashmultiset.c20
-rw-r--r--tests/testhashmultiset.vala4
-rw-r--r--tests/testhashset.c98
-rw-r--r--tests/testhashset.vala31
-rw-r--r--tests/testlinkedlist.c105
-rw-r--r--tests/testlinkedlist.vala27
-rw-r--r--tests/testlinkedlistasdeque.c13
-rw-r--r--tests/testlinkedlistasdeque.vala3
-rw-r--r--tests/testlist.c363
-rw-r--r--tests/testlist.vala39
-rw-r--r--tests/testmain.c344
-rw-r--r--tests/testmain.vala8
-rw-r--r--tests/testmap.c1029
-rw-r--r--tests/testmap.vala74
-rw-r--r--tests/testmultimap.c38
-rw-r--r--tests/testmultimap.vala10
-rw-r--r--tests/testmultiset.c4
-rw-r--r--tests/testpriorityqueue.c72
-rw-r--r--tests/testpriorityqueue.vala25
-rw-r--r--tests/testqueue.c10
-rw-r--r--tests/testreadonlybidirlist.c525
-rw-r--r--tests/testreadonlybidirlist.vala119
-rw-r--r--tests/testreadonlycollection.c161
-rw-r--r--tests/testreadonlycollection.vala6
-rw-r--r--tests/testreadonlylist.c372
-rw-r--r--tests/testreadonlylist.vala26
-rw-r--r--tests/testreadonlymap.c122
-rw-r--r--tests/testreadonlymap.vala4
-rw-r--r--tests/testreadonlyset.c2
-rw-r--r--tests/tests.vala.stamp0
-rw-r--r--tests/tests_vala.stamp1
-rw-r--r--tests/testset.c4
-rw-r--r--tests/testsortedmap.c6438
-rw-r--r--tests/testsortedmap.vala1174
-rw-r--r--tests/testsortedset.c1549
-rw-r--r--tests/testsortedset.vala206
-rw-r--r--tests/testtreemap.c309
-rw-r--r--tests/testtreemap.vala81
-rw-r--r--tests/testtreemultimap.c45
-rw-r--r--tests/testtreemultimap.vala12
-rw-r--r--tests/testtreemultiset.c38
-rw-r--r--tests/testtreemultiset.vala11
-rw-r--r--tests/testtreeset.c105
-rw-r--r--tests/testtreeset.vala27
76 files changed, 24420 insertions, 6126 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b4bfffd..2a9abe3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,25 +1,22 @@
include $(top_srcdir)/Makefile.decl
-NULL =
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)/gee \
- $(GLIB_CFLAGS) \
- $(NULL)
-
noinst_PROGRAMS = $(TEST_PROGS)
-progs_ldadd = $(GLIB_LIBS) ../gee/libgee.la
-
-BUILT_SOURCES = tests.vala.stamp
-
TEST_PROGS += tests
-tests_VALASOURCES = \
+
+tests_SOURCES = \
testarraylist.vala \
+ testarrayqueue.vala \
+ testbidirlist.vala \
+ testbidirsortedset.vala \
+ testbidirsortedmap.vala \
testcase.vala \
testcollection.vala \
- testcomparable.vala \
+ testconcurrentlist.vala \
+ testconcurrentset.vala \
+ testdata.vala \
testdeque.vala \
+ testfunctions.vala \
testhashmap.vala \
testhashmultimap.vala \
testhashmultiset.vala \
@@ -33,26 +30,39 @@ tests_VALASOURCES = \
testmultiset.vala \
testpriorityqueue.vala \
testqueue.vala \
+ testreadonlybidirlist.vala \
testreadonlycollection.vala \
testreadonlylist.vala \
testreadonlymap.vala \
testreadonlyset.vala \
testset.vala \
testsortedset.vala \
+ testsortedmap.vala \
testtreemap.vala \
testtreemultimap.vala \
testtreemultiset.vala \
testtreeset.vala \
$(NULL)
-tests_DEPENDENCIES = $(top_srcdir)/gee/gee-1.0.vapi
+tests_DEPENDENCIES = \
+ $(top_srcdir)/gee/gee-0.8.vapi \
+ $(NULL)
+
+tests_VALAFLAGS = \
+ --basedir $(top_srcdir) \
+ --vapidir $(top_srcdir)/gee \
+ --pkg gee-0.8 --pkg posix \
+ $(VALAFLAGS) \
+ $(NULL)
-tests_SOURCES = tests.vala.stamp $(tests_VALASOURCES:.vala=.c)
-tests.vala.stamp: $(tests_VALASOURCES)
- $(VALAC) -C --basedir $(top_srcdir) --vapidir $(top_srcdir)/gee --pkg gee-1.0 --pkg posix $^
- touch $@
-tests_LDADD = $(progs_ldadd)
-EXTRA_DIST += $(tests_VALASOURCES)
+tests_CPPFLAGS = \
+ -I$(top_srcdir)/gee \
+ $(GLIB_CFLAGS) \
+ $(NULL)
+
+tests_LDADD = \
+ $(GLIB_LIBS) ../gee/libgee-0.8.la \
+ $(NULL)
coverage-reset:
lcov --base-directory=@top_srcdir@ --directory @top_srcdir@/gee --zerocounters
@@ -76,11 +86,6 @@ coverage-report:
@echo 'file://@abs_top_builddir@/tests/coverage/index.html'
@echo
-MAINTAINERCLEANFILES = \
- $(tests_VALASOURCES:.vala=.c) \
- tests.vala.stamp \
- $(NULL)
-
clean-local:
-rm -rf coverage
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 405ce55..7d55b79 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -54,7 +54,18 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/Makefile.decl
+ $(top_srcdir)/Makefile.decl testarraylist.c testarrayqueue.c \
+ testbidirlist.c testbidirsortedmap.c testbidirsortedset.c \
+ testcase.c testcollection.c testconcurrentlist.c \
+ testconcurrentset.c testdata.c testdeque.c testfunctions.c \
+ testhashmap.c testhashmultimap.c testhashmultiset.c \
+ testhashset.c testlinkedlist.c testlinkedlistasdeque.c \
+ testlist.c testmain.c testmap.c testmultimap.c testmultiset.c \
+ testpriorityqueue.c testqueue.c testreadonlybidirlist.c \
+ testreadonlycollection.c testreadonlylist.c testreadonlymap.c \
+ testreadonlyset.c tests_vala.stamp testset.c testsortedmap.c \
+ testsortedset.c testtreemap.c testtreemultimap.c \
+ testtreemultiset.c testtreeset.c
noinst_PROGRAMS = $(am__EXEEXT_1)
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -71,24 +82,32 @@ CONFIG_CLEAN_VPATH_FILES =
am__EXEEXT_1 = tests$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
am__objects_1 =
-am__objects_2 = testarraylist.$(OBJEXT) testcase.$(OBJEXT) \
- testcollection.$(OBJEXT) testcomparable.$(OBJEXT) \
- testdeque.$(OBJEXT) testhashmap.$(OBJEXT) \
- testhashmultimap.$(OBJEXT) testhashmultiset.$(OBJEXT) \
- testhashset.$(OBJEXT) testlinkedlist.$(OBJEXT) \
- testlinkedlistasdeque.$(OBJEXT) testlist.$(OBJEXT) \
- testmain.$(OBJEXT) testmap.$(OBJEXT) testmultimap.$(OBJEXT) \
- testmultiset.$(OBJEXT) testpriorityqueue.$(OBJEXT) \
- testqueue.$(OBJEXT) testreadonlycollection.$(OBJEXT) \
- testreadonlylist.$(OBJEXT) testreadonlymap.$(OBJEXT) \
- testreadonlyset.$(OBJEXT) testset.$(OBJEXT) \
- testsortedset.$(OBJEXT) testtreemap.$(OBJEXT) \
- testtreemultimap.$(OBJEXT) testtreemultiset.$(OBJEXT) \
- testtreeset.$(OBJEXT) $(am__objects_1)
-am_tests_OBJECTS = $(am__objects_2)
+am_tests_OBJECTS = tests-testarraylist.$(OBJEXT) \
+ tests-testarrayqueue.$(OBJEXT) tests-testbidirlist.$(OBJEXT) \
+ tests-testbidirsortedset.$(OBJEXT) \
+ tests-testbidirsortedmap.$(OBJEXT) tests-testcase.$(OBJEXT) \
+ tests-testcollection.$(OBJEXT) \
+ tests-testconcurrentlist.$(OBJEXT) \
+ tests-testconcurrentset.$(OBJEXT) tests-testdata.$(OBJEXT) \
+ tests-testdeque.$(OBJEXT) tests-testfunctions.$(OBJEXT) \
+ tests-testhashmap.$(OBJEXT) tests-testhashmultimap.$(OBJEXT) \
+ tests-testhashmultiset.$(OBJEXT) tests-testhashset.$(OBJEXT) \
+ tests-testlinkedlist.$(OBJEXT) \
+ tests-testlinkedlistasdeque.$(OBJEXT) tests-testlist.$(OBJEXT) \
+ tests-testmain.$(OBJEXT) tests-testmap.$(OBJEXT) \
+ tests-testmultimap.$(OBJEXT) tests-testmultiset.$(OBJEXT) \
+ tests-testpriorityqueue.$(OBJEXT) tests-testqueue.$(OBJEXT) \
+ tests-testreadonlybidirlist.$(OBJEXT) \
+ tests-testreadonlycollection.$(OBJEXT) \
+ tests-testreadonlylist.$(OBJEXT) \
+ tests-testreadonlymap.$(OBJEXT) \
+ tests-testreadonlyset.$(OBJEXT) tests-testset.$(OBJEXT) \
+ tests-testsortedset.$(OBJEXT) tests-testsortedmap.$(OBJEXT) \
+ tests-testtreemap.$(OBJEXT) tests-testtreemultimap.$(OBJEXT) \
+ tests-testtreemultiset.$(OBJEXT) tests-testtreeset.$(OBJEXT) \
+ $(am__objects_1)
tests_OBJECTS = $(am_tests_OBJECTS)
am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) ../gee/libgee.la
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
@@ -115,6 +134,13 @@ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
+VALACOMPILE = $(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)
+LTVALACOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(VALAC) $(AM_VALAFLAGS) \
+ $(VALAFLAGS)
+AM_V_VALAC = $(am__v_VALAC_@AM_V@)
+am__v_VALAC_ = $(am__v_VALAC_@AM_DEFAULT_V@)
+am__v_VALAC_0 = @echo " VALAC " $@;
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
@@ -267,22 +293,24 @@ GTESTER = gtester
GTESTER_REPORT = gtester-report
# initialize variables for unconditional += appending
-EXTRA_DIST = $(tests_VALASOURCES)
+EXTRA_DIST =
TEST_PROGS = tests
-NULL =
-AM_CPPFLAGS = \
- -I$(top_srcdir)/gee \
- $(GLIB_CFLAGS) \
- $(NULL)
-progs_ldadd = $(GLIB_LIBS) ../gee/libgee.la
-BUILT_SOURCES = tests.vala.stamp
-tests_VALASOURCES = \
+# useful constants
+NULL =
+tests_SOURCES = \
testarraylist.vala \
+ testarrayqueue.vala \
+ testbidirlist.vala \
+ testbidirsortedset.vala \
+ testbidirsortedmap.vala \
testcase.vala \
testcollection.vala \
- testcomparable.vala \
+ testconcurrentlist.vala \
+ testconcurrentset.vala \
+ testdata.vala \
testdeque.vala \
+ testfunctions.vala \
testhashmap.vala \
testhashmultimap.vala \
testhashmultiset.vala \
@@ -296,28 +324,41 @@ tests_VALASOURCES = \
testmultiset.vala \
testpriorityqueue.vala \
testqueue.vala \
+ testreadonlybidirlist.vala \
testreadonlycollection.vala \
testreadonlylist.vala \
testreadonlymap.vala \
testreadonlyset.vala \
testset.vala \
testsortedset.vala \
+ testsortedmap.vala \
testtreemap.vala \
testtreemultimap.vala \
testtreemultiset.vala \
testtreeset.vala \
$(NULL)
-tests_DEPENDENCIES = $(top_srcdir)/gee/gee-1.0.vapi
-tests_SOURCES = tests.vala.stamp $(tests_VALASOURCES:.vala=.c)
-tests_LDADD = $(progs_ldadd)
-MAINTAINERCLEANFILES = \
- $(tests_VALASOURCES:.vala=.c) \
- tests.vala.stamp \
+tests_DEPENDENCIES = \
+ $(top_srcdir)/gee/gee-0.8.vapi \
+ $(NULL)
+
+tests_VALAFLAGS = \
+ --basedir $(top_srcdir) \
+ --vapidir $(top_srcdir)/gee \
+ --pkg gee-0.8 --pkg posix \
+ $(VALAFLAGS) \
+ $(NULL)
+
+tests_CPPFLAGS = \
+ -I$(top_srcdir)/gee \
+ $(GLIB_CFLAGS) \
+ $(NULL)
+
+tests_LDADD = \
+ $(GLIB_LIBS) ../gee/libgee-0.8.la \
$(NULL)
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
+all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
@@ -371,34 +412,43 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testarraylist.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcase.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcollection.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcomparable.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdeque.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhashmap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhashmultimap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhashmultiset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testhashset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testlinkedlist.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testlinkedlistasdeque.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testlist.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testmain.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testmap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testmultimap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testmultiset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpriorityqueue.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testqueue.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testreadonlycollection.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testreadonlylist.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testreadonlymap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testreadonlyset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsortedset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testtreemap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testtreemultimap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testtreemultiset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testtreeset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testarraylist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testarrayqueue.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testbidirlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testbidirsortedmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testbidirsortedset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testcase.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testcollection.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testconcurrentlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testconcurrentset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testdata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testdeque.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testfunctions.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testhashmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testhashmultimap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testhashmultiset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testhashset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testlinkedlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testlinkedlistasdeque.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testmain.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testmultimap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testmultiset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testpriorityqueue.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testqueue.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testreadonlybidirlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testreadonlycollection.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testreadonlylist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testreadonlymap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testreadonlyset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testsortedmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testsortedset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testtreemap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testtreemultimap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testtreemultiset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-testtreeset.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -421,6 +471,713 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+tests-testarraylist.o: testarraylist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testarraylist.o -MD -MP -MF $(DEPDIR)/tests-testarraylist.Tpo -c -o tests-testarraylist.o `test -f 'testarraylist.c' || echo '$(srcdir)/'`testarraylist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testarraylist.Tpo $(DEPDIR)/tests-testarraylist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testarraylist.c' object='tests-testarraylist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testarraylist.o `test -f 'testarraylist.c' || echo '$(srcdir)/'`testarraylist.c
+
+tests-testarraylist.obj: testarraylist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testarraylist.obj -MD -MP -MF $(DEPDIR)/tests-testarraylist.Tpo -c -o tests-testarraylist.obj `if test -f 'testarraylist.c'; then $(CYGPATH_W) 'testarraylist.c'; else $(CYGPATH_W) '$(srcdir)/testarraylist.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testarraylist.Tpo $(DEPDIR)/tests-testarraylist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testarraylist.c' object='tests-testarraylist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testarraylist.obj `if test -f 'testarraylist.c'; then $(CYGPATH_W) 'testarraylist.c'; else $(CYGPATH_W) '$(srcdir)/testarraylist.c'; fi`
+
+tests-testarrayqueue.o: testarrayqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testarrayqueue.o -MD -MP -MF $(DEPDIR)/tests-testarrayqueue.Tpo -c -o tests-testarrayqueue.o `test -f 'testarrayqueue.c' || echo '$(srcdir)/'`testarrayqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testarrayqueue.Tpo $(DEPDIR)/tests-testarrayqueue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testarrayqueue.c' object='tests-testarrayqueue.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testarrayqueue.o `test -f 'testarrayqueue.c' || echo '$(srcdir)/'`testarrayqueue.c
+
+tests-testarrayqueue.obj: testarrayqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testarrayqueue.obj -MD -MP -MF $(DEPDIR)/tests-testarrayqueue.Tpo -c -o tests-testarrayqueue.obj `if test -f 'testarrayqueue.c'; then $(CYGPATH_W) 'testarrayqueue.c'; else $(CYGPATH_W) '$(srcdir)/testarrayqueue.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testarrayqueue.Tpo $(DEPDIR)/tests-testarrayqueue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testarrayqueue.c' object='tests-testarrayqueue.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testarrayqueue.obj `if test -f 'testarrayqueue.c'; then $(CYGPATH_W) 'testarrayqueue.c'; else $(CYGPATH_W) '$(srcdir)/testarrayqueue.c'; fi`
+
+tests-testbidirlist.o: testbidirlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testbidirlist.o -MD -MP -MF $(DEPDIR)/tests-testbidirlist.Tpo -c -o tests-testbidirlist.o `test -f 'testbidirlist.c' || echo '$(srcdir)/'`testbidirlist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testbidirlist.Tpo $(DEPDIR)/tests-testbidirlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testbidirlist.c' object='tests-testbidirlist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testbidirlist.o `test -f 'testbidirlist.c' || echo '$(srcdir)/'`testbidirlist.c
+
+tests-testbidirlist.obj: testbidirlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testbidirlist.obj -MD -MP -MF $(DEPDIR)/tests-testbidirlist.Tpo -c -o tests-testbidirlist.obj `if test -f 'testbidirlist.c'; then $(CYGPATH_W) 'testbidirlist.c'; else $(CYGPATH_W) '$(srcdir)/testbidirlist.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testbidirlist.Tpo $(DEPDIR)/tests-testbidirlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testbidirlist.c' object='tests-testbidirlist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testbidirlist.obj `if test -f 'testbidirlist.c'; then $(CYGPATH_W) 'testbidirlist.c'; else $(CYGPATH_W) '$(srcdir)/testbidirlist.c'; fi`
+
+tests-testbidirsortedset.o: testbidirsortedset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testbidirsortedset.o -MD -MP -MF $(DEPDIR)/tests-testbidirsortedset.Tpo -c -o tests-testbidirsortedset.o `test -f 'testbidirsortedset.c' || echo '$(srcdir)/'`testbidirsortedset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testbidirsortedset.Tpo $(DEPDIR)/tests-testbidirsortedset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testbidirsortedset.c' object='tests-testbidirsortedset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testbidirsortedset.o `test -f 'testbidirsortedset.c' || echo '$(srcdir)/'`testbidirsortedset.c
+
+tests-testbidirsortedset.obj: testbidirsortedset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testbidirsortedset.obj -MD -MP -MF $(DEPDIR)/tests-testbidirsortedset.Tpo -c -o tests-testbidirsortedset.obj `if test -f 'testbidirsortedset.c'; then $(CYGPATH_W) 'testbidirsortedset.c'; else $(CYGPATH_W) '$(srcdir)/testbidirsortedset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testbidirsortedset.Tpo $(DEPDIR)/tests-testbidirsortedset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testbidirsortedset.c' object='tests-testbidirsortedset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testbidirsortedset.obj `if test -f 'testbidirsortedset.c'; then $(CYGPATH_W) 'testbidirsortedset.c'; else $(CYGPATH_W) '$(srcdir)/testbidirsortedset.c'; fi`
+
+tests-testbidirsortedmap.o: testbidirsortedmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testbidirsortedmap.o -MD -MP -MF $(DEPDIR)/tests-testbidirsortedmap.Tpo -c -o tests-testbidirsortedmap.o `test -f 'testbidirsortedmap.c' || echo '$(srcdir)/'`testbidirsortedmap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testbidirsortedmap.Tpo $(DEPDIR)/tests-testbidirsortedmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testbidirsortedmap.c' object='tests-testbidirsortedmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testbidirsortedmap.o `test -f 'testbidirsortedmap.c' || echo '$(srcdir)/'`testbidirsortedmap.c
+
+tests-testbidirsortedmap.obj: testbidirsortedmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testbidirsortedmap.obj -MD -MP -MF $(DEPDIR)/tests-testbidirsortedmap.Tpo -c -o tests-testbidirsortedmap.obj `if test -f 'testbidirsortedmap.c'; then $(CYGPATH_W) 'testbidirsortedmap.c'; else $(CYGPATH_W) '$(srcdir)/testbidirsortedmap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testbidirsortedmap.Tpo $(DEPDIR)/tests-testbidirsortedmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testbidirsortedmap.c' object='tests-testbidirsortedmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testbidirsortedmap.obj `if test -f 'testbidirsortedmap.c'; then $(CYGPATH_W) 'testbidirsortedmap.c'; else $(CYGPATH_W) '$(srcdir)/testbidirsortedmap.c'; fi`
+
+tests-testcase.o: testcase.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testcase.o -MD -MP -MF $(DEPDIR)/tests-testcase.Tpo -c -o tests-testcase.o `test -f 'testcase.c' || echo '$(srcdir)/'`testcase.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testcase.Tpo $(DEPDIR)/tests-testcase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testcase.c' object='tests-testcase.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testcase.o `test -f 'testcase.c' || echo '$(srcdir)/'`testcase.c
+
+tests-testcase.obj: testcase.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testcase.obj -MD -MP -MF $(DEPDIR)/tests-testcase.Tpo -c -o tests-testcase.obj `if test -f 'testcase.c'; then $(CYGPATH_W) 'testcase.c'; else $(CYGPATH_W) '$(srcdir)/testcase.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testcase.Tpo $(DEPDIR)/tests-testcase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testcase.c' object='tests-testcase.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testcase.obj `if test -f 'testcase.c'; then $(CYGPATH_W) 'testcase.c'; else $(CYGPATH_W) '$(srcdir)/testcase.c'; fi`
+
+tests-testcollection.o: testcollection.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testcollection.o -MD -MP -MF $(DEPDIR)/tests-testcollection.Tpo -c -o tests-testcollection.o `test -f 'testcollection.c' || echo '$(srcdir)/'`testcollection.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testcollection.Tpo $(DEPDIR)/tests-testcollection.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testcollection.c' object='tests-testcollection.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testcollection.o `test -f 'testcollection.c' || echo '$(srcdir)/'`testcollection.c
+
+tests-testcollection.obj: testcollection.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testcollection.obj -MD -MP -MF $(DEPDIR)/tests-testcollection.Tpo -c -o tests-testcollection.obj `if test -f 'testcollection.c'; then $(CYGPATH_W) 'testcollection.c'; else $(CYGPATH_W) '$(srcdir)/testcollection.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testcollection.Tpo $(DEPDIR)/tests-testcollection.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testcollection.c' object='tests-testcollection.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testcollection.obj `if test -f 'testcollection.c'; then $(CYGPATH_W) 'testcollection.c'; else $(CYGPATH_W) '$(srcdir)/testcollection.c'; fi`
+
+tests-testconcurrentlist.o: testconcurrentlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testconcurrentlist.o -MD -MP -MF $(DEPDIR)/tests-testconcurrentlist.Tpo -c -o tests-testconcurrentlist.o `test -f 'testconcurrentlist.c' || echo '$(srcdir)/'`testconcurrentlist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testconcurrentlist.Tpo $(DEPDIR)/tests-testconcurrentlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testconcurrentlist.c' object='tests-testconcurrentlist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testconcurrentlist.o `test -f 'testconcurrentlist.c' || echo '$(srcdir)/'`testconcurrentlist.c
+
+tests-testconcurrentlist.obj: testconcurrentlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testconcurrentlist.obj -MD -MP -MF $(DEPDIR)/tests-testconcurrentlist.Tpo -c -o tests-testconcurrentlist.obj `if test -f 'testconcurrentlist.c'; then $(CYGPATH_W) 'testconcurrentlist.c'; else $(CYGPATH_W) '$(srcdir)/testconcurrentlist.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testconcurrentlist.Tpo $(DEPDIR)/tests-testconcurrentlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testconcurrentlist.c' object='tests-testconcurrentlist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testconcurrentlist.obj `if test -f 'testconcurrentlist.c'; then $(CYGPATH_W) 'testconcurrentlist.c'; else $(CYGPATH_W) '$(srcdir)/testconcurrentlist.c'; fi`
+
+tests-testconcurrentset.o: testconcurrentset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testconcurrentset.o -MD -MP -MF $(DEPDIR)/tests-testconcurrentset.Tpo -c -o tests-testconcurrentset.o `test -f 'testconcurrentset.c' || echo '$(srcdir)/'`testconcurrentset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testconcurrentset.Tpo $(DEPDIR)/tests-testconcurrentset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testconcurrentset.c' object='tests-testconcurrentset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testconcurrentset.o `test -f 'testconcurrentset.c' || echo '$(srcdir)/'`testconcurrentset.c
+
+tests-testconcurrentset.obj: testconcurrentset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testconcurrentset.obj -MD -MP -MF $(DEPDIR)/tests-testconcurrentset.Tpo -c -o tests-testconcurrentset.obj `if test -f 'testconcurrentset.c'; then $(CYGPATH_W) 'testconcurrentset.c'; else $(CYGPATH_W) '$(srcdir)/testconcurrentset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testconcurrentset.Tpo $(DEPDIR)/tests-testconcurrentset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testconcurrentset.c' object='tests-testconcurrentset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testconcurrentset.obj `if test -f 'testconcurrentset.c'; then $(CYGPATH_W) 'testconcurrentset.c'; else $(CYGPATH_W) '$(srcdir)/testconcurrentset.c'; fi`
+
+tests-testdata.o: testdata.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testdata.o -MD -MP -MF $(DEPDIR)/tests-testdata.Tpo -c -o tests-testdata.o `test -f 'testdata.c' || echo '$(srcdir)/'`testdata.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testdata.Tpo $(DEPDIR)/tests-testdata.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testdata.c' object='tests-testdata.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testdata.o `test -f 'testdata.c' || echo '$(srcdir)/'`testdata.c
+
+tests-testdata.obj: testdata.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testdata.obj -MD -MP -MF $(DEPDIR)/tests-testdata.Tpo -c -o tests-testdata.obj `if test -f 'testdata.c'; then $(CYGPATH_W) 'testdata.c'; else $(CYGPATH_W) '$(srcdir)/testdata.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testdata.Tpo $(DEPDIR)/tests-testdata.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testdata.c' object='tests-testdata.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testdata.obj `if test -f 'testdata.c'; then $(CYGPATH_W) 'testdata.c'; else $(CYGPATH_W) '$(srcdir)/testdata.c'; fi`
+
+tests-testdeque.o: testdeque.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testdeque.o -MD -MP -MF $(DEPDIR)/tests-testdeque.Tpo -c -o tests-testdeque.o `test -f 'testdeque.c' || echo '$(srcdir)/'`testdeque.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testdeque.Tpo $(DEPDIR)/tests-testdeque.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testdeque.c' object='tests-testdeque.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testdeque.o `test -f 'testdeque.c' || echo '$(srcdir)/'`testdeque.c
+
+tests-testdeque.obj: testdeque.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testdeque.obj -MD -MP -MF $(DEPDIR)/tests-testdeque.Tpo -c -o tests-testdeque.obj `if test -f 'testdeque.c'; then $(CYGPATH_W) 'testdeque.c'; else $(CYGPATH_W) '$(srcdir)/testdeque.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testdeque.Tpo $(DEPDIR)/tests-testdeque.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testdeque.c' object='tests-testdeque.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testdeque.obj `if test -f 'testdeque.c'; then $(CYGPATH_W) 'testdeque.c'; else $(CYGPATH_W) '$(srcdir)/testdeque.c'; fi`
+
+tests-testfunctions.o: testfunctions.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testfunctions.o -MD -MP -MF $(DEPDIR)/tests-testfunctions.Tpo -c -o tests-testfunctions.o `test -f 'testfunctions.c' || echo '$(srcdir)/'`testfunctions.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testfunctions.Tpo $(DEPDIR)/tests-testfunctions.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testfunctions.c' object='tests-testfunctions.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testfunctions.o `test -f 'testfunctions.c' || echo '$(srcdir)/'`testfunctions.c
+
+tests-testfunctions.obj: testfunctions.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testfunctions.obj -MD -MP -MF $(DEPDIR)/tests-testfunctions.Tpo -c -o tests-testfunctions.obj `if test -f 'testfunctions.c'; then $(CYGPATH_W) 'testfunctions.c'; else $(CYGPATH_W) '$(srcdir)/testfunctions.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testfunctions.Tpo $(DEPDIR)/tests-testfunctions.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testfunctions.c' object='tests-testfunctions.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testfunctions.obj `if test -f 'testfunctions.c'; then $(CYGPATH_W) 'testfunctions.c'; else $(CYGPATH_W) '$(srcdir)/testfunctions.c'; fi`
+
+tests-testhashmap.o: testhashmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testhashmap.o -MD -MP -MF $(DEPDIR)/tests-testhashmap.Tpo -c -o tests-testhashmap.o `test -f 'testhashmap.c' || echo '$(srcdir)/'`testhashmap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testhashmap.Tpo $(DEPDIR)/tests-testhashmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testhashmap.c' object='tests-testhashmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testhashmap.o `test -f 'testhashmap.c' || echo '$(srcdir)/'`testhashmap.c
+
+tests-testhashmap.obj: testhashmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testhashmap.obj -MD -MP -MF $(DEPDIR)/tests-testhashmap.Tpo -c -o tests-testhashmap.obj `if test -f 'testhashmap.c'; then $(CYGPATH_W) 'testhashmap.c'; else $(CYGPATH_W) '$(srcdir)/testhashmap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testhashmap.Tpo $(DEPDIR)/tests-testhashmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testhashmap.c' object='tests-testhashmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testhashmap.obj `if test -f 'testhashmap.c'; then $(CYGPATH_W) 'testhashmap.c'; else $(CYGPATH_W) '$(srcdir)/testhashmap.c'; fi`
+
+tests-testhashmultimap.o: testhashmultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testhashmultimap.o -MD -MP -MF $(DEPDIR)/tests-testhashmultimap.Tpo -c -o tests-testhashmultimap.o `test -f 'testhashmultimap.c' || echo '$(srcdir)/'`testhashmultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testhashmultimap.Tpo $(DEPDIR)/tests-testhashmultimap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testhashmultimap.c' object='tests-testhashmultimap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testhashmultimap.o `test -f 'testhashmultimap.c' || echo '$(srcdir)/'`testhashmultimap.c
+
+tests-testhashmultimap.obj: testhashmultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testhashmultimap.obj -MD -MP -MF $(DEPDIR)/tests-testhashmultimap.Tpo -c -o tests-testhashmultimap.obj `if test -f 'testhashmultimap.c'; then $(CYGPATH_W) 'testhashmultimap.c'; else $(CYGPATH_W) '$(srcdir)/testhashmultimap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testhashmultimap.Tpo $(DEPDIR)/tests-testhashmultimap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testhashmultimap.c' object='tests-testhashmultimap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testhashmultimap.obj `if test -f 'testhashmultimap.c'; then $(CYGPATH_W) 'testhashmultimap.c'; else $(CYGPATH_W) '$(srcdir)/testhashmultimap.c'; fi`
+
+tests-testhashmultiset.o: testhashmultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testhashmultiset.o -MD -MP -MF $(DEPDIR)/tests-testhashmultiset.Tpo -c -o tests-testhashmultiset.o `test -f 'testhashmultiset.c' || echo '$(srcdir)/'`testhashmultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testhashmultiset.Tpo $(DEPDIR)/tests-testhashmultiset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testhashmultiset.c' object='tests-testhashmultiset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testhashmultiset.o `test -f 'testhashmultiset.c' || echo '$(srcdir)/'`testhashmultiset.c
+
+tests-testhashmultiset.obj: testhashmultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testhashmultiset.obj -MD -MP -MF $(DEPDIR)/tests-testhashmultiset.Tpo -c -o tests-testhashmultiset.obj `if test -f 'testhashmultiset.c'; then $(CYGPATH_W) 'testhashmultiset.c'; else $(CYGPATH_W) '$(srcdir)/testhashmultiset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testhashmultiset.Tpo $(DEPDIR)/tests-testhashmultiset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testhashmultiset.c' object='tests-testhashmultiset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testhashmultiset.obj `if test -f 'testhashmultiset.c'; then $(CYGPATH_W) 'testhashmultiset.c'; else $(CYGPATH_W) '$(srcdir)/testhashmultiset.c'; fi`
+
+tests-testhashset.o: testhashset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testhashset.o -MD -MP -MF $(DEPDIR)/tests-testhashset.Tpo -c -o tests-testhashset.o `test -f 'testhashset.c' || echo '$(srcdir)/'`testhashset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testhashset.Tpo $(DEPDIR)/tests-testhashset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testhashset.c' object='tests-testhashset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testhashset.o `test -f 'testhashset.c' || echo '$(srcdir)/'`testhashset.c
+
+tests-testhashset.obj: testhashset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testhashset.obj -MD -MP -MF $(DEPDIR)/tests-testhashset.Tpo -c -o tests-testhashset.obj `if test -f 'testhashset.c'; then $(CYGPATH_W) 'testhashset.c'; else $(CYGPATH_W) '$(srcdir)/testhashset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testhashset.Tpo $(DEPDIR)/tests-testhashset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testhashset.c' object='tests-testhashset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testhashset.obj `if test -f 'testhashset.c'; then $(CYGPATH_W) 'testhashset.c'; else $(CYGPATH_W) '$(srcdir)/testhashset.c'; fi`
+
+tests-testlinkedlist.o: testlinkedlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testlinkedlist.o -MD -MP -MF $(DEPDIR)/tests-testlinkedlist.Tpo -c -o tests-testlinkedlist.o `test -f 'testlinkedlist.c' || echo '$(srcdir)/'`testlinkedlist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testlinkedlist.Tpo $(DEPDIR)/tests-testlinkedlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testlinkedlist.c' object='tests-testlinkedlist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testlinkedlist.o `test -f 'testlinkedlist.c' || echo '$(srcdir)/'`testlinkedlist.c
+
+tests-testlinkedlist.obj: testlinkedlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testlinkedlist.obj -MD -MP -MF $(DEPDIR)/tests-testlinkedlist.Tpo -c -o tests-testlinkedlist.obj `if test -f 'testlinkedlist.c'; then $(CYGPATH_W) 'testlinkedlist.c'; else $(CYGPATH_W) '$(srcdir)/testlinkedlist.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testlinkedlist.Tpo $(DEPDIR)/tests-testlinkedlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testlinkedlist.c' object='tests-testlinkedlist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testlinkedlist.obj `if test -f 'testlinkedlist.c'; then $(CYGPATH_W) 'testlinkedlist.c'; else $(CYGPATH_W) '$(srcdir)/testlinkedlist.c'; fi`
+
+tests-testlinkedlistasdeque.o: testlinkedlistasdeque.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testlinkedlistasdeque.o -MD -MP -MF $(DEPDIR)/tests-testlinkedlistasdeque.Tpo -c -o tests-testlinkedlistasdeque.o `test -f 'testlinkedlistasdeque.c' || echo '$(srcdir)/'`testlinkedlistasdeque.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testlinkedlistasdeque.Tpo $(DEPDIR)/tests-testlinkedlistasdeque.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testlinkedlistasdeque.c' object='tests-testlinkedlistasdeque.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testlinkedlistasdeque.o `test -f 'testlinkedlistasdeque.c' || echo '$(srcdir)/'`testlinkedlistasdeque.c
+
+tests-testlinkedlistasdeque.obj: testlinkedlistasdeque.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testlinkedlistasdeque.obj -MD -MP -MF $(DEPDIR)/tests-testlinkedlistasdeque.Tpo -c -o tests-testlinkedlistasdeque.obj `if test -f 'testlinkedlistasdeque.c'; then $(CYGPATH_W) 'testlinkedlistasdeque.c'; else $(CYGPATH_W) '$(srcdir)/testlinkedlistasdeque.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testlinkedlistasdeque.Tpo $(DEPDIR)/tests-testlinkedlistasdeque.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testlinkedlistasdeque.c' object='tests-testlinkedlistasdeque.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testlinkedlistasdeque.obj `if test -f 'testlinkedlistasdeque.c'; then $(CYGPATH_W) 'testlinkedlistasdeque.c'; else $(CYGPATH_W) '$(srcdir)/testlinkedlistasdeque.c'; fi`
+
+tests-testlist.o: testlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testlist.o -MD -MP -MF $(DEPDIR)/tests-testlist.Tpo -c -o tests-testlist.o `test -f 'testlist.c' || echo '$(srcdir)/'`testlist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testlist.Tpo $(DEPDIR)/tests-testlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testlist.c' object='tests-testlist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testlist.o `test -f 'testlist.c' || echo '$(srcdir)/'`testlist.c
+
+tests-testlist.obj: testlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testlist.obj -MD -MP -MF $(DEPDIR)/tests-testlist.Tpo -c -o tests-testlist.obj `if test -f 'testlist.c'; then $(CYGPATH_W) 'testlist.c'; else $(CYGPATH_W) '$(srcdir)/testlist.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testlist.Tpo $(DEPDIR)/tests-testlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testlist.c' object='tests-testlist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testlist.obj `if test -f 'testlist.c'; then $(CYGPATH_W) 'testlist.c'; else $(CYGPATH_W) '$(srcdir)/testlist.c'; fi`
+
+tests-testmain.o: testmain.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testmain.o -MD -MP -MF $(DEPDIR)/tests-testmain.Tpo -c -o tests-testmain.o `test -f 'testmain.c' || echo '$(srcdir)/'`testmain.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testmain.Tpo $(DEPDIR)/tests-testmain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testmain.c' object='tests-testmain.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testmain.o `test -f 'testmain.c' || echo '$(srcdir)/'`testmain.c
+
+tests-testmain.obj: testmain.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testmain.obj -MD -MP -MF $(DEPDIR)/tests-testmain.Tpo -c -o tests-testmain.obj `if test -f 'testmain.c'; then $(CYGPATH_W) 'testmain.c'; else $(CYGPATH_W) '$(srcdir)/testmain.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testmain.Tpo $(DEPDIR)/tests-testmain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testmain.c' object='tests-testmain.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testmain.obj `if test -f 'testmain.c'; then $(CYGPATH_W) 'testmain.c'; else $(CYGPATH_W) '$(srcdir)/testmain.c'; fi`
+
+tests-testmap.o: testmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testmap.o -MD -MP -MF $(DEPDIR)/tests-testmap.Tpo -c -o tests-testmap.o `test -f 'testmap.c' || echo '$(srcdir)/'`testmap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testmap.Tpo $(DEPDIR)/tests-testmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testmap.c' object='tests-testmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testmap.o `test -f 'testmap.c' || echo '$(srcdir)/'`testmap.c
+
+tests-testmap.obj: testmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testmap.obj -MD -MP -MF $(DEPDIR)/tests-testmap.Tpo -c -o tests-testmap.obj `if test -f 'testmap.c'; then $(CYGPATH_W) 'testmap.c'; else $(CYGPATH_W) '$(srcdir)/testmap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testmap.Tpo $(DEPDIR)/tests-testmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testmap.c' object='tests-testmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testmap.obj `if test -f 'testmap.c'; then $(CYGPATH_W) 'testmap.c'; else $(CYGPATH_W) '$(srcdir)/testmap.c'; fi`
+
+tests-testmultimap.o: testmultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testmultimap.o -MD -MP -MF $(DEPDIR)/tests-testmultimap.Tpo -c -o tests-testmultimap.o `test -f 'testmultimap.c' || echo '$(srcdir)/'`testmultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testmultimap.Tpo $(DEPDIR)/tests-testmultimap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testmultimap.c' object='tests-testmultimap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testmultimap.o `test -f 'testmultimap.c' || echo '$(srcdir)/'`testmultimap.c
+
+tests-testmultimap.obj: testmultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testmultimap.obj -MD -MP -MF $(DEPDIR)/tests-testmultimap.Tpo -c -o tests-testmultimap.obj `if test -f 'testmultimap.c'; then $(CYGPATH_W) 'testmultimap.c'; else $(CYGPATH_W) '$(srcdir)/testmultimap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testmultimap.Tpo $(DEPDIR)/tests-testmultimap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testmultimap.c' object='tests-testmultimap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testmultimap.obj `if test -f 'testmultimap.c'; then $(CYGPATH_W) 'testmultimap.c'; else $(CYGPATH_W) '$(srcdir)/testmultimap.c'; fi`
+
+tests-testmultiset.o: testmultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testmultiset.o -MD -MP -MF $(DEPDIR)/tests-testmultiset.Tpo -c -o tests-testmultiset.o `test -f 'testmultiset.c' || echo '$(srcdir)/'`testmultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testmultiset.Tpo $(DEPDIR)/tests-testmultiset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testmultiset.c' object='tests-testmultiset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testmultiset.o `test -f 'testmultiset.c' || echo '$(srcdir)/'`testmultiset.c
+
+tests-testmultiset.obj: testmultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testmultiset.obj -MD -MP -MF $(DEPDIR)/tests-testmultiset.Tpo -c -o tests-testmultiset.obj `if test -f 'testmultiset.c'; then $(CYGPATH_W) 'testmultiset.c'; else $(CYGPATH_W) '$(srcdir)/testmultiset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testmultiset.Tpo $(DEPDIR)/tests-testmultiset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testmultiset.c' object='tests-testmultiset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testmultiset.obj `if test -f 'testmultiset.c'; then $(CYGPATH_W) 'testmultiset.c'; else $(CYGPATH_W) '$(srcdir)/testmultiset.c'; fi`
+
+tests-testpriorityqueue.o: testpriorityqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testpriorityqueue.o -MD -MP -MF $(DEPDIR)/tests-testpriorityqueue.Tpo -c -o tests-testpriorityqueue.o `test -f 'testpriorityqueue.c' || echo '$(srcdir)/'`testpriorityqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testpriorityqueue.Tpo $(DEPDIR)/tests-testpriorityqueue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testpriorityqueue.c' object='tests-testpriorityqueue.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testpriorityqueue.o `test -f 'testpriorityqueue.c' || echo '$(srcdir)/'`testpriorityqueue.c
+
+tests-testpriorityqueue.obj: testpriorityqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testpriorityqueue.obj -MD -MP -MF $(DEPDIR)/tests-testpriorityqueue.Tpo -c -o tests-testpriorityqueue.obj `if test -f 'testpriorityqueue.c'; then $(CYGPATH_W) 'testpriorityqueue.c'; else $(CYGPATH_W) '$(srcdir)/testpriorityqueue.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testpriorityqueue.Tpo $(DEPDIR)/tests-testpriorityqueue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testpriorityqueue.c' object='tests-testpriorityqueue.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testpriorityqueue.obj `if test -f 'testpriorityqueue.c'; then $(CYGPATH_W) 'testpriorityqueue.c'; else $(CYGPATH_W) '$(srcdir)/testpriorityqueue.c'; fi`
+
+tests-testqueue.o: testqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testqueue.o -MD -MP -MF $(DEPDIR)/tests-testqueue.Tpo -c -o tests-testqueue.o `test -f 'testqueue.c' || echo '$(srcdir)/'`testqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testqueue.Tpo $(DEPDIR)/tests-testqueue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testqueue.c' object='tests-testqueue.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testqueue.o `test -f 'testqueue.c' || echo '$(srcdir)/'`testqueue.c
+
+tests-testqueue.obj: testqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testqueue.obj -MD -MP -MF $(DEPDIR)/tests-testqueue.Tpo -c -o tests-testqueue.obj `if test -f 'testqueue.c'; then $(CYGPATH_W) 'testqueue.c'; else $(CYGPATH_W) '$(srcdir)/testqueue.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testqueue.Tpo $(DEPDIR)/tests-testqueue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testqueue.c' object='tests-testqueue.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testqueue.obj `if test -f 'testqueue.c'; then $(CYGPATH_W) 'testqueue.c'; else $(CYGPATH_W) '$(srcdir)/testqueue.c'; fi`
+
+tests-testreadonlybidirlist.o: testreadonlybidirlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlybidirlist.o -MD -MP -MF $(DEPDIR)/tests-testreadonlybidirlist.Tpo -c -o tests-testreadonlybidirlist.o `test -f 'testreadonlybidirlist.c' || echo '$(srcdir)/'`testreadonlybidirlist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlybidirlist.Tpo $(DEPDIR)/tests-testreadonlybidirlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlybidirlist.c' object='tests-testreadonlybidirlist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlybidirlist.o `test -f 'testreadonlybidirlist.c' || echo '$(srcdir)/'`testreadonlybidirlist.c
+
+tests-testreadonlybidirlist.obj: testreadonlybidirlist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlybidirlist.obj -MD -MP -MF $(DEPDIR)/tests-testreadonlybidirlist.Tpo -c -o tests-testreadonlybidirlist.obj `if test -f 'testreadonlybidirlist.c'; then $(CYGPATH_W) 'testreadonlybidirlist.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlybidirlist.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlybidirlist.Tpo $(DEPDIR)/tests-testreadonlybidirlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlybidirlist.c' object='tests-testreadonlybidirlist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlybidirlist.obj `if test -f 'testreadonlybidirlist.c'; then $(CYGPATH_W) 'testreadonlybidirlist.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlybidirlist.c'; fi`
+
+tests-testreadonlycollection.o: testreadonlycollection.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlycollection.o -MD -MP -MF $(DEPDIR)/tests-testreadonlycollection.Tpo -c -o tests-testreadonlycollection.o `test -f 'testreadonlycollection.c' || echo '$(srcdir)/'`testreadonlycollection.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlycollection.Tpo $(DEPDIR)/tests-testreadonlycollection.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlycollection.c' object='tests-testreadonlycollection.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlycollection.o `test -f 'testreadonlycollection.c' || echo '$(srcdir)/'`testreadonlycollection.c
+
+tests-testreadonlycollection.obj: testreadonlycollection.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlycollection.obj -MD -MP -MF $(DEPDIR)/tests-testreadonlycollection.Tpo -c -o tests-testreadonlycollection.obj `if test -f 'testreadonlycollection.c'; then $(CYGPATH_W) 'testreadonlycollection.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlycollection.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlycollection.Tpo $(DEPDIR)/tests-testreadonlycollection.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlycollection.c' object='tests-testreadonlycollection.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlycollection.obj `if test -f 'testreadonlycollection.c'; then $(CYGPATH_W) 'testreadonlycollection.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlycollection.c'; fi`
+
+tests-testreadonlylist.o: testreadonlylist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlylist.o -MD -MP -MF $(DEPDIR)/tests-testreadonlylist.Tpo -c -o tests-testreadonlylist.o `test -f 'testreadonlylist.c' || echo '$(srcdir)/'`testreadonlylist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlylist.Tpo $(DEPDIR)/tests-testreadonlylist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlylist.c' object='tests-testreadonlylist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlylist.o `test -f 'testreadonlylist.c' || echo '$(srcdir)/'`testreadonlylist.c
+
+tests-testreadonlylist.obj: testreadonlylist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlylist.obj -MD -MP -MF $(DEPDIR)/tests-testreadonlylist.Tpo -c -o tests-testreadonlylist.obj `if test -f 'testreadonlylist.c'; then $(CYGPATH_W) 'testreadonlylist.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlylist.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlylist.Tpo $(DEPDIR)/tests-testreadonlylist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlylist.c' object='tests-testreadonlylist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlylist.obj `if test -f 'testreadonlylist.c'; then $(CYGPATH_W) 'testreadonlylist.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlylist.c'; fi`
+
+tests-testreadonlymap.o: testreadonlymap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlymap.o -MD -MP -MF $(DEPDIR)/tests-testreadonlymap.Tpo -c -o tests-testreadonlymap.o `test -f 'testreadonlymap.c' || echo '$(srcdir)/'`testreadonlymap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlymap.Tpo $(DEPDIR)/tests-testreadonlymap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlymap.c' object='tests-testreadonlymap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlymap.o `test -f 'testreadonlymap.c' || echo '$(srcdir)/'`testreadonlymap.c
+
+tests-testreadonlymap.obj: testreadonlymap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlymap.obj -MD -MP -MF $(DEPDIR)/tests-testreadonlymap.Tpo -c -o tests-testreadonlymap.obj `if test -f 'testreadonlymap.c'; then $(CYGPATH_W) 'testreadonlymap.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlymap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlymap.Tpo $(DEPDIR)/tests-testreadonlymap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlymap.c' object='tests-testreadonlymap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlymap.obj `if test -f 'testreadonlymap.c'; then $(CYGPATH_W) 'testreadonlymap.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlymap.c'; fi`
+
+tests-testreadonlyset.o: testreadonlyset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlyset.o -MD -MP -MF $(DEPDIR)/tests-testreadonlyset.Tpo -c -o tests-testreadonlyset.o `test -f 'testreadonlyset.c' || echo '$(srcdir)/'`testreadonlyset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlyset.Tpo $(DEPDIR)/tests-testreadonlyset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlyset.c' object='tests-testreadonlyset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlyset.o `test -f 'testreadonlyset.c' || echo '$(srcdir)/'`testreadonlyset.c
+
+tests-testreadonlyset.obj: testreadonlyset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testreadonlyset.obj -MD -MP -MF $(DEPDIR)/tests-testreadonlyset.Tpo -c -o tests-testreadonlyset.obj `if test -f 'testreadonlyset.c'; then $(CYGPATH_W) 'testreadonlyset.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlyset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testreadonlyset.Tpo $(DEPDIR)/tests-testreadonlyset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testreadonlyset.c' object='tests-testreadonlyset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testreadonlyset.obj `if test -f 'testreadonlyset.c'; then $(CYGPATH_W) 'testreadonlyset.c'; else $(CYGPATH_W) '$(srcdir)/testreadonlyset.c'; fi`
+
+tests-testset.o: testset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testset.o -MD -MP -MF $(DEPDIR)/tests-testset.Tpo -c -o tests-testset.o `test -f 'testset.c' || echo '$(srcdir)/'`testset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testset.Tpo $(DEPDIR)/tests-testset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testset.c' object='tests-testset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testset.o `test -f 'testset.c' || echo '$(srcdir)/'`testset.c
+
+tests-testset.obj: testset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testset.obj -MD -MP -MF $(DEPDIR)/tests-testset.Tpo -c -o tests-testset.obj `if test -f 'testset.c'; then $(CYGPATH_W) 'testset.c'; else $(CYGPATH_W) '$(srcdir)/testset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testset.Tpo $(DEPDIR)/tests-testset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testset.c' object='tests-testset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testset.obj `if test -f 'testset.c'; then $(CYGPATH_W) 'testset.c'; else $(CYGPATH_W) '$(srcdir)/testset.c'; fi`
+
+tests-testsortedset.o: testsortedset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testsortedset.o -MD -MP -MF $(DEPDIR)/tests-testsortedset.Tpo -c -o tests-testsortedset.o `test -f 'testsortedset.c' || echo '$(srcdir)/'`testsortedset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testsortedset.Tpo $(DEPDIR)/tests-testsortedset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsortedset.c' object='tests-testsortedset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testsortedset.o `test -f 'testsortedset.c' || echo '$(srcdir)/'`testsortedset.c
+
+tests-testsortedset.obj: testsortedset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testsortedset.obj -MD -MP -MF $(DEPDIR)/tests-testsortedset.Tpo -c -o tests-testsortedset.obj `if test -f 'testsortedset.c'; then $(CYGPATH_W) 'testsortedset.c'; else $(CYGPATH_W) '$(srcdir)/testsortedset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testsortedset.Tpo $(DEPDIR)/tests-testsortedset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsortedset.c' object='tests-testsortedset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testsortedset.obj `if test -f 'testsortedset.c'; then $(CYGPATH_W) 'testsortedset.c'; else $(CYGPATH_W) '$(srcdir)/testsortedset.c'; fi`
+
+tests-testsortedmap.o: testsortedmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testsortedmap.o -MD -MP -MF $(DEPDIR)/tests-testsortedmap.Tpo -c -o tests-testsortedmap.o `test -f 'testsortedmap.c' || echo '$(srcdir)/'`testsortedmap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testsortedmap.Tpo $(DEPDIR)/tests-testsortedmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsortedmap.c' object='tests-testsortedmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testsortedmap.o `test -f 'testsortedmap.c' || echo '$(srcdir)/'`testsortedmap.c
+
+tests-testsortedmap.obj: testsortedmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testsortedmap.obj -MD -MP -MF $(DEPDIR)/tests-testsortedmap.Tpo -c -o tests-testsortedmap.obj `if test -f 'testsortedmap.c'; then $(CYGPATH_W) 'testsortedmap.c'; else $(CYGPATH_W) '$(srcdir)/testsortedmap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testsortedmap.Tpo $(DEPDIR)/tests-testsortedmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testsortedmap.c' object='tests-testsortedmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testsortedmap.obj `if test -f 'testsortedmap.c'; then $(CYGPATH_W) 'testsortedmap.c'; else $(CYGPATH_W) '$(srcdir)/testsortedmap.c'; fi`
+
+tests-testtreemap.o: testtreemap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testtreemap.o -MD -MP -MF $(DEPDIR)/tests-testtreemap.Tpo -c -o tests-testtreemap.o `test -f 'testtreemap.c' || echo '$(srcdir)/'`testtreemap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testtreemap.Tpo $(DEPDIR)/tests-testtreemap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testtreemap.c' object='tests-testtreemap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testtreemap.o `test -f 'testtreemap.c' || echo '$(srcdir)/'`testtreemap.c
+
+tests-testtreemap.obj: testtreemap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testtreemap.obj -MD -MP -MF $(DEPDIR)/tests-testtreemap.Tpo -c -o tests-testtreemap.obj `if test -f 'testtreemap.c'; then $(CYGPATH_W) 'testtreemap.c'; else $(CYGPATH_W) '$(srcdir)/testtreemap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testtreemap.Tpo $(DEPDIR)/tests-testtreemap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testtreemap.c' object='tests-testtreemap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testtreemap.obj `if test -f 'testtreemap.c'; then $(CYGPATH_W) 'testtreemap.c'; else $(CYGPATH_W) '$(srcdir)/testtreemap.c'; fi`
+
+tests-testtreemultimap.o: testtreemultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testtreemultimap.o -MD -MP -MF $(DEPDIR)/tests-testtreemultimap.Tpo -c -o tests-testtreemultimap.o `test -f 'testtreemultimap.c' || echo '$(srcdir)/'`testtreemultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testtreemultimap.Tpo $(DEPDIR)/tests-testtreemultimap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testtreemultimap.c' object='tests-testtreemultimap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testtreemultimap.o `test -f 'testtreemultimap.c' || echo '$(srcdir)/'`testtreemultimap.c
+
+tests-testtreemultimap.obj: testtreemultimap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testtreemultimap.obj -MD -MP -MF $(DEPDIR)/tests-testtreemultimap.Tpo -c -o tests-testtreemultimap.obj `if test -f 'testtreemultimap.c'; then $(CYGPATH_W) 'testtreemultimap.c'; else $(CYGPATH_W) '$(srcdir)/testtreemultimap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testtreemultimap.Tpo $(DEPDIR)/tests-testtreemultimap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testtreemultimap.c' object='tests-testtreemultimap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testtreemultimap.obj `if test -f 'testtreemultimap.c'; then $(CYGPATH_W) 'testtreemultimap.c'; else $(CYGPATH_W) '$(srcdir)/testtreemultimap.c'; fi`
+
+tests-testtreemultiset.o: testtreemultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testtreemultiset.o -MD -MP -MF $(DEPDIR)/tests-testtreemultiset.Tpo -c -o tests-testtreemultiset.o `test -f 'testtreemultiset.c' || echo '$(srcdir)/'`testtreemultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testtreemultiset.Tpo $(DEPDIR)/tests-testtreemultiset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testtreemultiset.c' object='tests-testtreemultiset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testtreemultiset.o `test -f 'testtreemultiset.c' || echo '$(srcdir)/'`testtreemultiset.c
+
+tests-testtreemultiset.obj: testtreemultiset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testtreemultiset.obj -MD -MP -MF $(DEPDIR)/tests-testtreemultiset.Tpo -c -o tests-testtreemultiset.obj `if test -f 'testtreemultiset.c'; then $(CYGPATH_W) 'testtreemultiset.c'; else $(CYGPATH_W) '$(srcdir)/testtreemultiset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testtreemultiset.Tpo $(DEPDIR)/tests-testtreemultiset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testtreemultiset.c' object='tests-testtreemultiset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testtreemultiset.obj `if test -f 'testtreemultiset.c'; then $(CYGPATH_W) 'testtreemultiset.c'; else $(CYGPATH_W) '$(srcdir)/testtreemultiset.c'; fi`
+
+tests-testtreeset.o: testtreeset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testtreeset.o -MD -MP -MF $(DEPDIR)/tests-testtreeset.Tpo -c -o tests-testtreeset.o `test -f 'testtreeset.c' || echo '$(srcdir)/'`testtreeset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testtreeset.Tpo $(DEPDIR)/tests-testtreeset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testtreeset.c' object='tests-testtreeset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testtreeset.o `test -f 'testtreeset.c' || echo '$(srcdir)/'`testtreeset.c
+
+tests-testtreeset.obj: testtreeset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-testtreeset.obj -MD -MP -MF $(DEPDIR)/tests-testtreeset.Tpo -c -o tests-testtreeset.obj `if test -f 'testtreeset.c'; then $(CYGPATH_W) 'testtreeset.c'; else $(CYGPATH_W) '$(srcdir)/testtreeset.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-testtreeset.Tpo $(DEPDIR)/tests-testtreeset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testtreeset.c' object='tests-testtreeset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-testtreeset.obj `if test -f 'testtreeset.c'; then $(CYGPATH_W) 'testtreeset.c'; else $(CYGPATH_W) '$(srcdir)/testtreeset.c'; fi`
+$(srcdir)/testarraylist.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testarrayqueue.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testbidirlist.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testbidirsortedset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testbidirsortedmap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testcase.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testcollection.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testconcurrentlist.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testconcurrentset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testdata.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testdeque.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testfunctions.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testhashmap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testhashmultimap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testhashmultiset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testhashset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testlinkedlist.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testlinkedlistasdeque.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testlist.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testmain.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testmap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testmultimap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testmultiset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testpriorityqueue.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testqueue.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testreadonlybidirlist.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testreadonlycollection.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testreadonlylist.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testreadonlymap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testreadonlyset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testsortedset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testsortedmap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testtreemap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testtreemultimap.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testtreemultiset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/testtreeset.c: $(srcdir)/tests_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/tests_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/tests_vala.stamp; \
+ fi
+$(srcdir)/tests_vala.stamp: testarraylist.vala testarrayqueue.vala testbidirlist.vala testbidirsortedset.vala testbidirsortedmap.vala testcase.vala testcollection.vala testconcurrentlist.vala testconcurrentset.vala testdata.vala testdeque.vala testfunctions.vala testhashmap.vala testhashmultimap.vala testhashmultiset.vala testhashset.vala testlinkedlist.vala testlinkedlistasdeque.vala testlist.vala testmain.vala testmap.vala testmultimap.vala testmultiset.vala testpriorityqueue.vala testqueue.vala testreadonlybidirlist.vala testreadonlycollection.vala testreadonlylist.vala testreadonlymap.vala testreadonlyset.vala testset.vala testsortedset.vala testsortedmap.vala testtreemap.vala testtreemultimap.vala testtreemultiset.vala testtreeset.vala
+ $(AM_V_at)rm -f $@ && echo stamp > $@-t
+ $(AM_V_VALAC)$(am__cd) $(srcdir) && $(VALAC) $(tests_VALAFLAGS) $(VALAFLAGS) -C testarraylist.vala testarrayqueue.vala testbidirlist.vala testbidirsortedset.vala testbidirsortedmap.vala testcase.vala testcollection.vala testconcurrentlist.vala testconcurrentset.vala testdata.vala testdeque.vala testfunctions.vala testhashmap.vala testhashmultimap.vala testhashmultiset.vala testhashset.vala testlinkedlist.vala testlinkedlistasdeque.vala testlist.vala testmain.vala testmap.vala testmultimap.vala testmultiset.vala testpriorityqueue.vala testqueue.vala testreadonlybidirlist.vala testreadonlycollection.vala testreadonlylist.vala testreadonlymap.vala testreadonlyset.vala testset.vala testsortedset.vala testsortedmap.vala testtreemap.vala testtreemultimap.vala testtreemultiset.vala testtreeset.vala
+ $(AM_V_at)mv -f $@-t $@
+
mostlyclean-libtool:
-rm -f *.lo
@@ -511,12 +1268,10 @@ distdir: $(DISTFILES)
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
+check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
+install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -546,8 +1301,44 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -rm -f testarraylist.c
+ -rm -f testarrayqueue.c
+ -rm -f testbidirlist.c
+ -rm -f testbidirsortedmap.c
+ -rm -f testbidirsortedset.c
+ -rm -f testcase.c
+ -rm -f testcollection.c
+ -rm -f testconcurrentlist.c
+ -rm -f testconcurrentset.c
+ -rm -f testdata.c
+ -rm -f testdeque.c
+ -rm -f testfunctions.c
+ -rm -f testhashmap.c
+ -rm -f testhashmultimap.c
+ -rm -f testhashmultiset.c
+ -rm -f testhashset.c
+ -rm -f testlinkedlist.c
+ -rm -f testlinkedlistasdeque.c
+ -rm -f testlist.c
+ -rm -f testmain.c
+ -rm -f testmap.c
+ -rm -f testmultimap.c
+ -rm -f testmultiset.c
+ -rm -f testpriorityqueue.c
+ -rm -f testqueue.c
+ -rm -f testreadonlybidirlist.c
+ -rm -f testreadonlycollection.c
+ -rm -f testreadonlylist.c
+ -rm -f testreadonlymap.c
+ -rm -f testreadonlyset.c
+ -rm -f tests_vala.stamp
+ -rm -f testset.c
+ -rm -f testsortedmap.c
+ -rm -f testsortedset.c
+ -rm -f testtreemap.c
+ -rm -f testtreemultimap.c
+ -rm -f testtreemultiset.c
+ -rm -f testtreeset.c
clean: clean-am
clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
@@ -619,7 +1410,7 @@ ps-am:
uninstall-am:
-.MAKE: all check check-am install install-am install-strip
+.MAKE: check-am install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
@@ -684,9 +1475,6 @@ test-report perf-report full-report: ${TEST_PROGS}
.PHONY: test test-report perf-report full-report
# run make test as part of make check
check-local: test
-tests.vala.stamp: $(tests_VALASOURCES)
- $(VALAC) -C --basedir $(top_srcdir) --vapidir $(top_srcdir)/gee --pkg gee-1.0 --pkg posix $^
- touch $@
coverage-reset:
lcov --base-directory=@top_srcdir@ --directory @top_srcdir@/gee --zerocounters
diff --git a/tests/testarraylist.c b/tests/testarraylist.c
index 423396e..6a7b2e6 100644
--- a/tests/testarraylist.c
+++ b/tests/testarraylist.c
@@ -68,6 +68,17 @@ typedef struct _ListTests ListTests;
typedef struct _ListTestsClass ListTestsClass;
typedef struct _ListTestsPrivate ListTestsPrivate;
+#define TYPE_BIDIR_LIST_TESTS (bidir_list_tests_get_type ())
+#define BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTests))
+#define BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
+#define IS_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_LIST_TESTS))
+#define IS_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_LIST_TESTS))
+#define BIDIR_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
+
+typedef struct _BidirListTests BidirListTests;
+typedef struct _BidirListTestsClass BidirListTestsClass;
+typedef struct _BidirListTestsPrivate BidirListTestsPrivate;
+
#define TYPE_ARRAY_LIST_TESTS (array_list_tests_get_type ())
#define ARRAY_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ARRAY_LIST_TESTS, ArrayListTests))
#define ARRAY_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ARRAY_LIST_TESTS, ArrayListTestsClass))
@@ -113,13 +124,22 @@ struct _ListTestsClass {
void (*test_duplicates_are_retained) (ListTests* self);
};
-struct _ArrayListTests {
+struct _BidirListTests {
ListTests parent_instance;
+ BidirListTestsPrivate * priv;
+};
+
+struct _BidirListTestsClass {
+ ListTestsClass parent_class;
+};
+
+struct _ArrayListTests {
+ BidirListTests parent_instance;
ArrayListTestsPrivate * priv;
};
struct _ArrayListTestsClass {
- ListTestsClass parent_class;
+ BidirListTestsClass parent_class;
};
typedef void (*GeeTestCaseTestMethod) (void* user_data);
@@ -129,6 +149,7 @@ static gpointer array_list_tests_parent_class = NULL;
GType gee_test_case_get_type (void) G_GNUC_CONST;
GType collection_tests_get_type (void) G_GNUC_CONST;
GType list_tests_get_type (void) G_GNUC_CONST;
+GType bidir_list_tests_get_type (void) G_GNUC_CONST;
GType array_list_tests_get_type (void) G_GNUC_CONST;
enum {
ARRAY_LIST_TESTS_DUMMY_PROPERTY
@@ -136,12 +157,10 @@ enum {
#define ARRAY_LIST_TESTS_BIG_SORT_SIZE 1000000
ArrayListTests* array_list_tests_new (void);
ArrayListTests* array_list_tests_construct (GType object_type);
-ListTests* list_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+BidirListTests* bidir_list_tests_construct (GType object_type, const gchar* name);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void array_list_tests_test_selected_functions (ArrayListTests* self);
static void _array_list_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
-void array_list_tests_test_gobject_properties (ArrayListTests* self);
-static void _array_list_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
static void array_list_tests_test_small_sort (ArrayListTests* self);
static void _array_list_tests_test_small_sort_gee_test_case_test_method (gpointer self);
static void array_list_tests_test_big_sort (ArrayListTests* self);
@@ -160,11 +179,6 @@ static void _array_list_tests_test_selected_functions_gee_test_case_test_method
}
-static void _array_list_tests_test_gobject_properties_gee_test_case_test_method (gpointer self) {
- array_list_tests_test_gobject_properties (self);
-}
-
-
static void _array_list_tests_test_small_sort_gee_test_case_test_method (gpointer self) {
array_list_tests_test_small_sort (self);
}
@@ -182,12 +196,11 @@ static void _array_list_tests_test_typed_to_array_gee_test_case_test_method (gpo
ArrayListTests* array_list_tests_construct (GType object_type) {
ArrayListTests * self = NULL;
- self = (ArrayListTests*) list_tests_construct (object_type, "ArrayList");
- gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] selected functions", _array_list_tests_test_selected_functions_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] GObject properties", _array_list_tests_test_gobject_properties_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] small sort (insertion)", _array_list_tests_test_small_sort_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] big sort (timsort)", _array_list_tests_test_big_sort_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] typed to_array calls", _array_list_tests_test_typed_to_array_gee_test_case_test_method, self);
+ self = (ArrayListTests*) bidir_list_tests_construct (object_type, "ArrayList");
+ gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] selected functions", _array_list_tests_test_selected_functions_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] small sort (insertion)", _array_list_tests_test_small_sort_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] big sort (timsort)", _array_list_tests_test_big_sort_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ArrayList] typed to_array calls", _array_list_tests_test_typed_to_array_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -201,7 +214,7 @@ static void array_list_tests_real_set_up (GeeTestCase* base) {
ArrayListTests * self;
GeeArrayList* _tmp0_;
self = (ArrayListTests*) base;
- _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
_g_object_unref0 (((CollectionTests*) self)->test_collection);
((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}
@@ -224,48 +237,11 @@ void array_list_tests_test_selected_functions (ArrayListTests* self) {
GeeCollection* _tmp0_;
GeeArrayList* _tmp1_;
GeeArrayList* test_list;
- GEqualFunc _tmp2_;
- GEqualFunc _tmp3_;
- GEqualFunc _tmp4_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_ARRAY_LIST) ? ((GeeArrayList*) _tmp0_) : NULL);
- test_list = _tmp1_;
- _vala_assert (test_list != NULL, "test_list != null");
- _tmp2_ = gee_array_list_get_equal_func (test_list);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_str_equal;
- _vala_assert (_tmp3_ == _tmp4_, "test_list.equal_func == str_equal");
- _g_object_unref0 (test_list);
-}
-
-
-void array_list_tests_test_gobject_properties (ArrayListTests* self) {
- GeeCollection* _tmp0_;
- GeeArrayList* _tmp1_;
- GeeArrayList* test_list;
- GValue value = {0};
- GValue _tmp2_ = {0};
- GValue _tmp3_;
- void* _tmp4_ = NULL;
- GEqualFunc _tmp5_;
- GEqualFunc _tmp6_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_ARRAY_LIST) ? ((GeeArrayList*) _tmp0_) : NULL);
test_list = _tmp1_;
_vala_assert (test_list != NULL, "test_list != null");
- g_value_init (&_tmp2_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp2_;
- _tmp3_ = value;
- g_object_get_property ((GObject*) test_list, "equal-func", &value);
- _tmp4_ = g_value_get_pointer (&value);
- _tmp5_ = gee_array_list_get_equal_func (test_list);
- _tmp6_ = _tmp5_;
- _vala_assert (_tmp4_ == ((void*) _tmp6_), "value.get_pointer () == (void*) test_list.equal_func");
- g_value_unset (&value);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
_g_object_unref0 (test_list);
}
@@ -315,7 +291,7 @@ static void array_list_tests_test_small_sort (ArrayListTests* self) {
gee_abstract_collection_add ((GeeAbstractCollection*) test_list, "ten");
gee_abstract_collection_add ((GeeAbstractCollection*) test_list, "eleven");
gee_abstract_collection_add ((GeeAbstractCollection*) test_list, "twelve");
- gee_list_sort ((GeeList*) test_list, NULL);
+ gee_list_sort ((GeeList*) test_list, NULL, NULL, NULL);
_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) test_list, 0);
_tmp3_ = (gchar*) _tmp2_;
_vala_assert (g_strcmp0 (_tmp3_, "eight") == 0, "test_list.get (0) == \"eight\"");
@@ -373,7 +349,7 @@ static void array_list_tests_test_big_sort (ArrayListTests* self) {
GeeList* big_test_list;
GeeList* _tmp7_;
g_return_if_fail (self != NULL);
- _tmp0_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL);
+ _tmp0_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
big_test_list = (GeeList*) _tmp0_;
{
gint i;
@@ -404,7 +380,7 @@ static void array_list_tests_test_big_sort (ArrayListTests* self) {
}
}
_tmp7_ = big_test_list;
- gee_list_sort (_tmp7_, NULL);
+ gee_list_sort (_tmp7_, NULL, NULL, NULL);
{
gint i;
i = 1;
@@ -501,7 +477,7 @@ static void array_list_tests_test_typed_to_array (ArrayListTests* self) {
gint double_array_length1;
gint _double_array_size_;
g_return_if_fail (self != NULL);
- _tmp0_ = gee_array_list_new (G_TYPE_BOOLEAN, NULL, NULL, NULL);
+ _tmp0_ = gee_array_list_new (G_TYPE_BOOLEAN, NULL, NULL, NULL, NULL, NULL);
bool_list = (GeeList*) _tmp0_;
_tmp1_ = bool_list;
_tmp2_ = gee_collection_add ((GeeCollection*) _tmp1_, (gpointer) ((gintptr) TRUE));
@@ -569,7 +545,7 @@ static void array_list_tests_test_typed_to_array (ArrayListTests* self) {
}
_g_object_unref0 (_element_list);
}
- _tmp25_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL);
+ _tmp25_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
int_list = (GeeList*) _tmp25_;
_tmp26_ = int_list;
_tmp27_ = gee_collection_add ((GeeCollection*) _tmp26_, (gpointer) ((gintptr) 1));
@@ -637,7 +613,7 @@ static void array_list_tests_test_typed_to_array (ArrayListTests* self) {
}
_g_object_unref0 (_element_list);
}
- _tmp50_ = gee_array_list_new (G_TYPE_DOUBLE, (GBoxedCopyFunc) _double_dup, g_free, NULL);
+ _tmp50_ = gee_array_list_new (G_TYPE_DOUBLE, (GBoxedCopyFunc) _double_dup, g_free, NULL, NULL, NULL);
double_list = (GeeList*) _tmp50_;
_tmp51_ = double_list;
_tmp52_ = 1.0;
@@ -738,7 +714,7 @@ GType array_list_tests_get_type (void) {
if (g_once_init_enter (&array_list_tests_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ArrayListTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) array_list_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ArrayListTests), 0, (GInstanceInitFunc) array_list_tests_instance_init, NULL };
GType array_list_tests_type_id;
- array_list_tests_type_id = g_type_register_static (TYPE_LIST_TESTS, "ArrayListTests", &g_define_type_info, 0);
+ array_list_tests_type_id = g_type_register_static (TYPE_BIDIR_LIST_TESTS, "ArrayListTests", &g_define_type_info, 0);
g_once_init_leave (&array_list_tests_type_id__volatile, array_list_tests_type_id);
}
return array_list_tests_type_id__volatile;
diff --git a/tests/testarraylist.vala b/tests/testarraylist.vala
index 9537f79..381740e 100644
--- a/tests/testarraylist.vala
+++ b/tests/testarraylist.vala
@@ -25,12 +25,11 @@
using Gee;
-public class ArrayListTests : ListTests {
+public class ArrayListTests : BidirListTests {
public ArrayListTests () {
base ("ArrayList");
add_test ("[ArrayList] selected functions", test_selected_functions);
- add_test ("[ArrayList] GObject properties", test_gobject_properties);
add_test ("[ArrayList] small sort (insertion)", test_small_sort);
add_test ("[ArrayList] big sort (timsort)", test_big_sort);
add_test ("[ArrayList] typed to_array calls", test_typed_to_array);
@@ -51,22 +50,6 @@ public class ArrayListTests : ListTests {
// Check the collection exists
assert (test_list != null);
-
- // Check the selected equal function
- assert (test_list.equal_func == str_equal);
- }
-
- public new void test_gobject_properties () {
- var test_list = test_collection as ArrayList<string>;
-
- // Check the list exists
- assert (test_list != null);
- Value value;
-
- value = Value (typeof (EqualFunc));
- test_list.get_property ("equal-func", ref value);
- assert (value.get_pointer () == (void*) test_list.equal_func);
- value.unset ();
}
private void test_small_sort () {
diff --git a/tests/testarrayqueue.c b/tests/testarrayqueue.c
new file mode 100644
index 0000000..7ebf2d9
--- /dev/null
+++ b/tests/testarrayqueue.c
@@ -0,0 +1,208 @@
+/* testarrayqueue.c generated by valac 0.18.0, the Vala compiler
+ * generated from testarrayqueue.vala, do not modify */
+
+/* arrayqueue.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_COLLECTION_TESTS (collection_tests_get_type ())
+#define COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_TESTS, CollectionTests))
+#define COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+#define IS_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_TESTS))
+#define IS_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_TESTS))
+#define COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+
+typedef struct _CollectionTests CollectionTests;
+typedef struct _CollectionTestsClass CollectionTestsClass;
+typedef struct _CollectionTestsPrivate CollectionTestsPrivate;
+
+#define TYPE_QUEUE_TESTS (queue_tests_get_type ())
+#define QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUEUE_TESTS, QueueTests))
+#define QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_QUEUE_TESTS, QueueTestsClass))
+#define IS_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUEUE_TESTS))
+#define IS_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_QUEUE_TESTS))
+#define QUEUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_QUEUE_TESTS, QueueTestsClass))
+
+typedef struct _QueueTests QueueTests;
+typedef struct _QueueTestsClass QueueTestsClass;
+typedef struct _QueueTestsPrivate QueueTestsPrivate;
+
+#define TYPE_DEQUE_TESTS (deque_tests_get_type ())
+#define DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEQUE_TESTS, DequeTests))
+#define DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEQUE_TESTS, DequeTestsClass))
+#define IS_DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEQUE_TESTS))
+#define IS_DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEQUE_TESTS))
+#define DEQUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEQUE_TESTS, DequeTestsClass))
+
+typedef struct _DequeTests DequeTests;
+typedef struct _DequeTestsClass DequeTestsClass;
+typedef struct _DequeTestsPrivate DequeTestsPrivate;
+
+#define TYPE_ARRAY_QUEUE_TESTS (array_queue_tests_get_type ())
+#define ARRAY_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ARRAY_QUEUE_TESTS, ArrayQueueTests))
+#define ARRAY_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ARRAY_QUEUE_TESTS, ArrayQueueTestsClass))
+#define IS_ARRAY_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ARRAY_QUEUE_TESTS))
+#define IS_ARRAY_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ARRAY_QUEUE_TESTS))
+#define ARRAY_QUEUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ARRAY_QUEUE_TESTS, ArrayQueueTestsClass))
+
+typedef struct _ArrayQueueTests ArrayQueueTests;
+typedef struct _ArrayQueueTestsClass ArrayQueueTestsClass;
+typedef struct _ArrayQueueTestsPrivate ArrayQueueTestsPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _CollectionTests {
+ GeeTestCase parent_instance;
+ CollectionTestsPrivate * priv;
+ GeeCollection* test_collection;
+};
+
+struct _CollectionTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _QueueTests {
+ CollectionTests parent_instance;
+ QueueTestsPrivate * priv;
+};
+
+struct _QueueTestsClass {
+ CollectionTestsClass parent_class;
+};
+
+struct _DequeTests {
+ QueueTests parent_instance;
+ DequeTestsPrivate * priv;
+};
+
+struct _DequeTestsClass {
+ QueueTestsClass parent_class;
+};
+
+struct _ArrayQueueTests {
+ DequeTests parent_instance;
+ ArrayQueueTestsPrivate * priv;
+};
+
+struct _ArrayQueueTestsClass {
+ DequeTestsClass parent_class;
+};
+
+
+static gpointer array_queue_tests_parent_class = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType collection_tests_get_type (void) G_GNUC_CONST;
+GType queue_tests_get_type (void) G_GNUC_CONST;
+GType deque_tests_get_type (void) G_GNUC_CONST;
+GType array_queue_tests_get_type (void) G_GNUC_CONST;
+enum {
+ ARRAY_QUEUE_TESTS_DUMMY_PROPERTY
+};
+ArrayQueueTests* array_queue_tests_new (void);
+ArrayQueueTests* array_queue_tests_construct (GType object_type);
+DequeTests* deque_tests_construct (GType object_type, const gchar* name);
+static void array_queue_tests_real_set_up (GeeTestCase* base);
+static void array_queue_tests_real_tear_down (GeeTestCase* base);
+
+
+ArrayQueueTests* array_queue_tests_construct (GType object_type) {
+ ArrayQueueTests * self = NULL;
+ self = (ArrayQueueTests*) deque_tests_construct (object_type, "ArrayQueue");
+ return self;
+}
+
+
+ArrayQueueTests* array_queue_tests_new (void) {
+ return array_queue_tests_construct (TYPE_ARRAY_QUEUE_TESTS);
+}
+
+
+static void array_queue_tests_real_set_up (GeeTestCase* base) {
+ ArrayQueueTests * self;
+ GeeArrayQueue* _tmp0_;
+ self = (ArrayQueueTests*) base;
+ _tmp0_ = gee_array_queue_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+ _g_object_unref0 (((CollectionTests*) self)->test_collection);
+ ((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
+}
+
+
+static void array_queue_tests_real_tear_down (GeeTestCase* base) {
+ ArrayQueueTests * self;
+ self = (ArrayQueueTests*) base;
+ _g_object_unref0 (((CollectionTests*) self)->test_collection);
+ ((CollectionTests*) self)->test_collection = NULL;
+}
+
+
+static void array_queue_tests_class_init (ArrayQueueTestsClass * klass) {
+ array_queue_tests_parent_class = g_type_class_peek_parent (klass);
+ GEE_TEST_CASE_CLASS (klass)->set_up = array_queue_tests_real_set_up;
+ GEE_TEST_CASE_CLASS (klass)->tear_down = array_queue_tests_real_tear_down;
+}
+
+
+static void array_queue_tests_instance_init (ArrayQueueTests * self) {
+}
+
+
+GType array_queue_tests_get_type (void) {
+ static volatile gsize array_queue_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&array_queue_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (ArrayQueueTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) array_queue_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ArrayQueueTests), 0, (GInstanceInitFunc) array_queue_tests_instance_init, NULL };
+ GType array_queue_tests_type_id;
+ array_queue_tests_type_id = g_type_register_static (TYPE_DEQUE_TESTS, "ArrayQueueTests", &g_define_type_info, 0);
+ g_once_init_leave (&array_queue_tests_type_id__volatile, array_queue_tests_type_id);
+ }
+ return array_queue_tests_type_id__volatile;
+}
+
+
+
diff --git a/tests/testarrayqueue.vala b/tests/testarrayqueue.vala
new file mode 100644
index 0000000..6122330
--- /dev/null
+++ b/tests/testarrayqueue.vala
@@ -0,0 +1,38 @@
+/* arrayqueue.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+using Gee;
+
+public class ArrayQueueTests : DequeTests {
+ public ArrayQueueTests () {
+ base ("ArrayQueue");
+ }
+
+ public override void set_up () {
+ test_collection = new ArrayQueue<string> ();
+ }
+
+ public override void tear_down () {
+ test_collection = null;
+ }
+}
+
diff --git a/tests/testbidirlist.c b/tests/testbidirlist.c
new file mode 100644
index 0000000..7e9ba9e
--- /dev/null
+++ b/tests/testbidirlist.c
@@ -0,0 +1,498 @@
+/* testbidirlist.c generated by valac 0.18.0, the Vala compiler
+ * generated from testbidirlist.vala, do not modify */
+
+/* testbidirlist.vala
+ *
+ * Copyright (C) 2011 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_COLLECTION_TESTS (collection_tests_get_type ())
+#define COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_TESTS, CollectionTests))
+#define COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+#define IS_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_TESTS))
+#define IS_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_TESTS))
+#define COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+
+typedef struct _CollectionTests CollectionTests;
+typedef struct _CollectionTestsClass CollectionTestsClass;
+typedef struct _CollectionTestsPrivate CollectionTestsPrivate;
+
+#define TYPE_LIST_TESTS (list_tests_get_type ())
+#define LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIST_TESTS, ListTests))
+#define LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIST_TESTS, ListTestsClass))
+#define IS_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIST_TESTS))
+#define IS_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIST_TESTS))
+#define LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIST_TESTS, ListTestsClass))
+
+typedef struct _ListTests ListTests;
+typedef struct _ListTestsClass ListTestsClass;
+typedef struct _ListTestsPrivate ListTestsPrivate;
+
+#define TYPE_BIDIR_LIST_TESTS (bidir_list_tests_get_type ())
+#define BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTests))
+#define BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
+#define IS_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_LIST_TESTS))
+#define IS_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_LIST_TESTS))
+#define BIDIR_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
+
+typedef struct _BidirListTests BidirListTests;
+typedef struct _BidirListTestsClass BidirListTestsClass;
+typedef struct _BidirListTestsPrivate BidirListTestsPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _CollectionTests {
+ GeeTestCase parent_instance;
+ CollectionTestsPrivate * priv;
+ GeeCollection* test_collection;
+};
+
+struct _CollectionTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _ListTests {
+ CollectionTests parent_instance;
+ ListTestsPrivate * priv;
+};
+
+struct _ListTestsClass {
+ CollectionTestsClass parent_class;
+ void (*test_duplicates_are_retained) (ListTests* self);
+};
+
+struct _BidirListTests {
+ ListTests parent_instance;
+ BidirListTestsPrivate * priv;
+};
+
+struct _BidirListTestsClass {
+ ListTestsClass parent_class;
+};
+
+typedef void (*GeeTestCaseTestMethod) (void* user_data);
+
+static gpointer bidir_list_tests_parent_class = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType collection_tests_get_type (void) G_GNUC_CONST;
+GType list_tests_get_type (void) G_GNUC_CONST;
+GType bidir_list_tests_get_type (void) G_GNUC_CONST;
+enum {
+ BIDIR_LIST_TESTS_DUMMY_PROPERTY
+};
+BidirListTests* bidir_list_tests_construct (GType object_type, const gchar* name);
+ListTests* list_tests_construct (GType object_type, const gchar* name);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
+void bidir_list_tests_test_bidir_list_iterator (BidirListTests* self);
+static void _bidir_list_tests_test_bidir_list_iterator_gee_test_case_test_method (gpointer self);
+
+
+static void _bidir_list_tests_test_bidir_list_iterator_gee_test_case_test_method (gpointer self) {
+ bidir_list_tests_test_bidir_list_iterator (self);
+}
+
+
+BidirListTests* bidir_list_tests_construct (GType object_type, const gchar* name) {
+ BidirListTests * self = NULL;
+ const gchar* _tmp0_;
+ g_return_val_if_fail (name != NULL, NULL);
+ _tmp0_ = name;
+ self = (BidirListTests*) list_tests_construct (object_type, _tmp0_);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] bi-directional list iterator", _bidir_list_tests_test_bidir_list_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ return self;
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+ return self ? g_object_ref (self) : NULL;
+}
+
+
+void bidir_list_tests_test_bidir_list_iterator (BidirListTests* self) {
+ GeeCollection* _tmp0_;
+ GeeBidirList* _tmp1_;
+ GeeBidirList* test_list;
+ GeeBidirListIterator* _tmp2_ = NULL;
+ GeeBidirListIterator* iterator;
+ GeeBidirListIterator* _tmp3_;
+ gboolean _tmp4_ = FALSE;
+ GeeBidirListIterator* _tmp5_;
+ gboolean _tmp6_ = FALSE;
+ GeeBidirListIterator* _tmp7_;
+ gboolean _tmp8_ = FALSE;
+ GeeBidirListIterator* _tmp9_;
+ gboolean _tmp10_ = FALSE;
+ GeeBidirListIterator* _tmp11_;
+ gboolean _tmp12_ = FALSE;
+ GeeBidirListIterator* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ gboolean _tmp15_ = FALSE;
+ gboolean _tmp16_ = FALSE;
+ gboolean _tmp17_ = FALSE;
+ GeeBidirListIterator* _tmp18_ = NULL;
+ GeeBidirListIterator* _tmp19_;
+ gboolean _tmp20_ = FALSE;
+ GeeBidirListIterator* _tmp21_;
+ gpointer _tmp22_ = NULL;
+ gchar* _tmp23_;
+ GeeBidirListIterator* _tmp24_;
+ gint _tmp25_ = 0;
+ GeeBidirListIterator* _tmp26_;
+ GeeBidirListIterator* _tmp27_;
+ gboolean _tmp28_ = FALSE;
+ GeeBidirListIterator* _tmp29_;
+ gpointer _tmp30_ = NULL;
+ gchar* _tmp31_;
+ GeeBidirListIterator* _tmp32_;
+ gint _tmp33_ = 0;
+ GeeBidirListIterator* _tmp34_;
+ gint _tmp35_;
+ gint _tmp36_;
+ GeeBidirListIterator* _tmp37_;
+ gint _tmp38_ = 0;
+ GeeBidirListIterator* _tmp39_;
+ gint _tmp40_;
+ gint _tmp41_;
+ GeeBidirListIterator* _tmp42_;
+ gint _tmp43_ = 0;
+ GeeBidirListIterator* _tmp44_;
+ gint _tmp45_;
+ gint _tmp46_;
+ GeeBidirListIterator* _tmp47_;
+ gint _tmp48_ = 0;
+ GeeBidirListIterator* _tmp49_;
+ gboolean _tmp50_ = FALSE;
+ GeeBidirListIterator* _tmp51_;
+ gpointer _tmp52_ = NULL;
+ gchar* _tmp53_;
+ GeeBidirListIterator* _tmp54_;
+ gint _tmp55_ = 0;
+ GeeBidirListIterator* _tmp56_;
+ GeeBidirListIterator* _tmp57_;
+ gboolean _tmp58_ = FALSE;
+ GeeBidirListIterator* _tmp59_;
+ gboolean _tmp60_ = FALSE;
+ GeeBidirListIterator* _tmp61_;
+ gboolean _tmp62_ = FALSE;
+ GeeBidirListIterator* _tmp63_;
+ gpointer _tmp64_ = NULL;
+ gchar* _tmp65_;
+ GeeBidirListIterator* _tmp66_;
+ gint _tmp67_ = 0;
+ GeeBidirListIterator* _tmp68_;
+ gboolean _tmp69_ = FALSE;
+ GeeBidirListIterator* _tmp70_;
+ gboolean _tmp71_ = FALSE;
+ GeeBidirListIterator* _tmp72_;
+ gboolean _tmp73_ = FALSE;
+ GeeBidirListIterator* _tmp74_;
+ gpointer _tmp75_ = NULL;
+ gchar* _tmp76_;
+ GeeBidirListIterator* _tmp77_;
+ gint _tmp78_ = 0;
+ GeeBidirListIterator* _tmp79_;
+ gboolean _tmp80_ = FALSE;
+ GeeBidirListIterator* _tmp81_;
+ gboolean _tmp82_ = FALSE;
+ GeeBidirListIterator* _tmp83_;
+ gboolean _tmp84_ = FALSE;
+ GeeBidirListIterator* _tmp85_;
+ gboolean _tmp86_ = FALSE;
+ GeeBidirListIterator* _tmp87_;
+ gpointer _tmp88_ = NULL;
+ gchar* _tmp89_;
+ GeeBidirListIterator* _tmp90_;
+ gint _tmp91_ = 0;
+ GeeBidirListIterator* _tmp92_;
+ gboolean _tmp93_ = FALSE;
+ GeeBidirListIterator* _tmp94_;
+ gboolean _tmp95_ = FALSE;
+ GeeBidirListIterator* _tmp96_;
+ gpointer _tmp97_ = NULL;
+ gchar* _tmp98_;
+ GeeBidirListIterator* _tmp99_;
+ gint _tmp100_ = 0;
+ GeeBidirListIterator* _tmp101_;
+ gboolean _tmp102_ = FALSE;
+ GeeBidirListIterator* _tmp103_;
+ gboolean _tmp104_ = FALSE;
+ GeeBidirListIterator* _tmp105_;
+ gpointer _tmp106_ = NULL;
+ gchar* _tmp107_;
+ GeeBidirListIterator* _tmp108_;
+ gint _tmp109_ = 0;
+ GeeBidirListIterator* _tmp110_;
+ gboolean _tmp111_ = FALSE;
+ GeeBidirListIterator* _tmp112_;
+ gboolean _tmp113_ = FALSE;
+ GeeBidirListIterator* _tmp114_;
+ gpointer _tmp115_ = NULL;
+ gchar* _tmp116_;
+ GeeBidirListIterator* _tmp117_;
+ gint _tmp118_ = 0;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((CollectionTests*) self)->test_collection;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_LIST) ? ((GeeBidirList*) _tmp0_) : NULL);
+ test_list = _tmp1_;
+ _vala_assert (test_list != NULL, "test_list != null");
+ _tmp2_ = gee_bidir_list_bidir_list_iterator (test_list);
+ iterator = _tmp2_;
+ _tmp3_ = iterator;
+ _tmp4_ = gee_iterator_has_next ((GeeIterator*) _tmp3_);
+ _vala_assert (!_tmp4_, "! iterator.has_next ()");
+ _tmp5_ = iterator;
+ _tmp6_ = gee_iterator_next ((GeeIterator*) _tmp5_);
+ _vala_assert (!_tmp6_, "! iterator.next ()");
+ _tmp7_ = iterator;
+ _tmp8_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp7_);
+ _vala_assert (!_tmp8_, "! iterator.has_previous ()");
+ _tmp9_ = iterator;
+ _tmp10_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp9_);
+ _vala_assert (!_tmp10_, "! iterator.previous ()");
+ _tmp11_ = iterator;
+ _tmp12_ = gee_bidir_iterator_first ((GeeBidirIterator*) _tmp11_);
+ _vala_assert (!_tmp12_, "! iterator.first ()");
+ _tmp13_ = iterator;
+ _tmp14_ = gee_bidir_iterator_last ((GeeBidirIterator*) _tmp13_);
+ _vala_assert (!_tmp14_, "! iterator.last ()");
+ _tmp15_ = gee_collection_add ((GeeCollection*) test_list, "one");
+ _vala_assert (_tmp15_, "test_list.add (\"one\")");
+ _tmp16_ = gee_collection_add ((GeeCollection*) test_list, "two");
+ _vala_assert (_tmp16_, "test_list.add (\"two\")");
+ _tmp17_ = gee_collection_add ((GeeCollection*) test_list, "three");
+ _vala_assert (_tmp17_, "test_list.add (\"three\")");
+ _tmp18_ = gee_bidir_list_bidir_list_iterator (test_list);
+ _g_object_unref0 (iterator);
+ iterator = _tmp18_;
+ _tmp19_ = iterator;
+ _tmp20_ = gee_iterator_next ((GeeIterator*) _tmp19_);
+ _vala_assert (_tmp20_, "iterator.next()");
+ _tmp21_ = iterator;
+ _tmp22_ = gee_iterator_get ((GeeIterator*) _tmp21_);
+ _tmp23_ = (gchar*) _tmp22_;
+ _vala_assert (g_strcmp0 (_tmp23_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp23_);
+ _tmp24_ = iterator;
+ _tmp25_ = gee_list_iterator_index ((GeeListIterator*) _tmp24_);
+ _vala_assert (_tmp25_ == 0, "iterator.index () == 0");
+ _tmp26_ = iterator;
+ gee_list_iterator_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_LIST_ITERATOR, GeeListIterator), "new one");
+ _tmp27_ = iterator;
+ _tmp28_ = gee_iterator_next ((GeeIterator*) _tmp27_);
+ _vala_assert (_tmp28_, "iterator.next()");
+ _tmp29_ = iterator;
+ _tmp30_ = gee_iterator_get ((GeeIterator*) _tmp29_);
+ _tmp31_ = (gchar*) _tmp30_;
+ _vala_assert (g_strcmp0 (_tmp31_, "two") == 0, "iterator.get () == \"two\"");
+ _g_free0 (_tmp31_);
+ _tmp32_ = iterator;
+ _tmp33_ = gee_list_iterator_index ((GeeListIterator*) _tmp32_);
+ _vala_assert (_tmp33_ == 1, "iterator.index () == 1");
+ _tmp34_ = iterator;
+ gee_list_iterator_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_LIST_ITERATOR, GeeListIterator), "new two");
+ _tmp35_ = gee_collection_get_size ((GeeCollection*) test_list);
+ _tmp36_ = _tmp35_;
+ _vala_assert (_tmp36_ == 3, "test_list.size == 3");
+ _tmp37_ = iterator;
+ _tmp38_ = gee_list_iterator_index ((GeeListIterator*) _tmp37_);
+ _vala_assert (_tmp38_ == 1, "iterator.index () == 1");
+ _tmp39_ = iterator;
+ gee_bidir_list_iterator_insert (_tmp39_, "before two");
+ _tmp40_ = gee_collection_get_size ((GeeCollection*) test_list);
+ _tmp41_ = _tmp40_;
+ _vala_assert (_tmp41_ == 4, "test_list.size == 4");
+ _tmp42_ = iterator;
+ _tmp43_ = gee_list_iterator_index ((GeeListIterator*) _tmp42_);
+ _vala_assert (_tmp43_ == 2, "iterator.index () == 2");
+ _tmp44_ = iterator;
+ gee_list_iterator_add ((GeeListIterator*) _tmp44_, "after two");
+ _tmp45_ = gee_collection_get_size ((GeeCollection*) test_list);
+ _tmp46_ = _tmp45_;
+ _vala_assert (_tmp46_ == 5, "test_list.size == 5");
+ _tmp47_ = iterator;
+ _tmp48_ = gee_list_iterator_index ((GeeListIterator*) _tmp47_);
+ _vala_assert (_tmp48_ == 3, "iterator.index () == 3");
+ _tmp49_ = iterator;
+ _tmp50_ = gee_iterator_next ((GeeIterator*) _tmp49_);
+ _vala_assert (_tmp50_, "iterator.next()");
+ _tmp51_ = iterator;
+ _tmp52_ = gee_iterator_get ((GeeIterator*) _tmp51_);
+ _tmp53_ = (gchar*) _tmp52_;
+ _vala_assert (g_strcmp0 (_tmp53_, "three") == 0, "iterator.get () == \"three\"");
+ _g_free0 (_tmp53_);
+ _tmp54_ = iterator;
+ _tmp55_ = gee_list_iterator_index ((GeeListIterator*) _tmp54_);
+ _vala_assert (_tmp55_ == 4, "iterator.index () == 4");
+ _tmp56_ = iterator;
+ gee_list_iterator_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, GEE_TYPE_LIST_ITERATOR, GeeListIterator), "new three");
+ _tmp57_ = iterator;
+ _tmp58_ = gee_iterator_has_next ((GeeIterator*) _tmp57_);
+ _vala_assert (!_tmp58_, "! iterator.has_next ()");
+ _tmp59_ = iterator;
+ _tmp60_ = gee_iterator_next ((GeeIterator*) _tmp59_);
+ _vala_assert (!_tmp60_, "! iterator.next ()");
+ _tmp61_ = iterator;
+ _tmp62_ = gee_bidir_iterator_first ((GeeBidirIterator*) _tmp61_);
+ _vala_assert (_tmp62_, "iterator.first ()");
+ _tmp63_ = iterator;
+ _tmp64_ = gee_iterator_get ((GeeIterator*) _tmp63_);
+ _tmp65_ = (gchar*) _tmp64_;
+ _vala_assert (g_strcmp0 (_tmp65_, "new one") == 0, "iterator.get () == \"new one\"");
+ _g_free0 (_tmp65_);
+ _tmp66_ = iterator;
+ _tmp67_ = gee_list_iterator_index ((GeeListIterator*) _tmp66_);
+ _vala_assert (_tmp67_ == 0, "iterator.index () == 0");
+ _tmp68_ = iterator;
+ _tmp69_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp68_);
+ _vala_assert (!_tmp69_, "! iterator.has_previous ()");
+ _tmp70_ = iterator;
+ _tmp71_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp70_);
+ _vala_assert (!_tmp71_, "! iterator.previous ()");
+ _tmp72_ = iterator;
+ _tmp73_ = gee_bidir_iterator_last ((GeeBidirIterator*) _tmp72_);
+ _vala_assert (_tmp73_, "iterator.last ()");
+ _tmp74_ = iterator;
+ _tmp75_ = gee_iterator_get ((GeeIterator*) _tmp74_);
+ _tmp76_ = (gchar*) _tmp75_;
+ _vala_assert (g_strcmp0 (_tmp76_, "new three") == 0, "iterator.get () == \"new three\"");
+ _g_free0 (_tmp76_);
+ _tmp77_ = iterator;
+ _tmp78_ = gee_list_iterator_index ((GeeListIterator*) _tmp77_);
+ _vala_assert (_tmp78_ == 4, "iterator.index () == 4");
+ _tmp79_ = iterator;
+ _tmp80_ = gee_iterator_has_next ((GeeIterator*) _tmp79_);
+ _vala_assert (!_tmp80_, "! iterator.has_next ()");
+ _tmp81_ = iterator;
+ _tmp82_ = gee_iterator_next ((GeeIterator*) _tmp81_);
+ _vala_assert (!_tmp82_, "! iterator.next ()");
+ _tmp83_ = iterator;
+ _tmp84_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp83_);
+ _vala_assert (_tmp84_, "iterator.has_previous ()");
+ _tmp85_ = iterator;
+ _tmp86_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp85_);
+ _vala_assert (_tmp86_, "iterator.previous ()");
+ _tmp87_ = iterator;
+ _tmp88_ = gee_iterator_get ((GeeIterator*) _tmp87_);
+ _tmp89_ = (gchar*) _tmp88_;
+ _vala_assert (g_strcmp0 (_tmp89_, "after two") == 0, "iterator.get () == \"after two\"");
+ _g_free0 (_tmp89_);
+ _tmp90_ = iterator;
+ _tmp91_ = gee_list_iterator_index ((GeeListIterator*) _tmp90_);
+ _vala_assert (_tmp91_ == 3, "iterator.index () == 3");
+ _tmp92_ = iterator;
+ _tmp93_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp92_);
+ _vala_assert (_tmp93_, "iterator.has_previous ()");
+ _tmp94_ = iterator;
+ _tmp95_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp94_);
+ _vala_assert (_tmp95_, "iterator.previous ()");
+ _tmp96_ = iterator;
+ _tmp97_ = gee_iterator_get ((GeeIterator*) _tmp96_);
+ _tmp98_ = (gchar*) _tmp97_;
+ _vala_assert (g_strcmp0 (_tmp98_, "new two") == 0, "iterator.get () == \"new two\"");
+ _g_free0 (_tmp98_);
+ _tmp99_ = iterator;
+ _tmp100_ = gee_list_iterator_index ((GeeListIterator*) _tmp99_);
+ _vala_assert (_tmp100_ == 2, "iterator.index () == 2");
+ _tmp101_ = iterator;
+ _tmp102_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp101_);
+ _vala_assert (_tmp102_, "iterator.has_previous ()");
+ _tmp103_ = iterator;
+ _tmp104_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp103_);
+ _vala_assert (_tmp104_, "iterator.previous ()");
+ _tmp105_ = iterator;
+ _tmp106_ = gee_iterator_get ((GeeIterator*) _tmp105_);
+ _tmp107_ = (gchar*) _tmp106_;
+ _vala_assert (g_strcmp0 (_tmp107_, "before two") == 0, "iterator.get () == \"before two\"");
+ _g_free0 (_tmp107_);
+ _tmp108_ = iterator;
+ _tmp109_ = gee_list_iterator_index ((GeeListIterator*) _tmp108_);
+ _vala_assert (_tmp109_ == 1, "iterator.index () == 1");
+ _tmp110_ = iterator;
+ _tmp111_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp110_);
+ _vala_assert (_tmp111_, "iterator.has_previous ()");
+ _tmp112_ = iterator;
+ _tmp113_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp112_);
+ _vala_assert (_tmp113_, "iterator.previous ()");
+ _tmp114_ = iterator;
+ _tmp115_ = gee_iterator_get ((GeeIterator*) _tmp114_);
+ _tmp116_ = (gchar*) _tmp115_;
+ _vala_assert (g_strcmp0 (_tmp116_, "new one") == 0, "iterator.get () == \"new one\"");
+ _g_free0 (_tmp116_);
+ _tmp117_ = iterator;
+ _tmp118_ = gee_list_iterator_index ((GeeListIterator*) _tmp117_);
+ _vala_assert (_tmp118_ == 0, "iterator.index () == 0");
+ _g_object_unref0 (iterator);
+ _g_object_unref0 (test_list);
+}
+
+
+static void bidir_list_tests_class_init (BidirListTestsClass * klass) {
+ bidir_list_tests_parent_class = g_type_class_peek_parent (klass);
+}
+
+
+static void bidir_list_tests_instance_init (BidirListTests * self) {
+}
+
+
+GType bidir_list_tests_get_type (void) {
+ static volatile gsize bidir_list_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&bidir_list_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (BidirListTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bidir_list_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BidirListTests), 0, (GInstanceInitFunc) bidir_list_tests_instance_init, NULL };
+ GType bidir_list_tests_type_id;
+ bidir_list_tests_type_id = g_type_register_static (TYPE_LIST_TESTS, "BidirListTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&bidir_list_tests_type_id__volatile, bidir_list_tests_type_id);
+ }
+ return bidir_list_tests_type_id__volatile;
+}
+
+
+
diff --git a/tests/testbidirlist.vala b/tests/testbidirlist.vala
new file mode 100644
index 0000000..7e53f5b
--- /dev/null
+++ b/tests/testbidirlist.vala
@@ -0,0 +1,107 @@
+/* testbidirlist.vala
+ *
+ * Copyright (C) 2011 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+using GLib;
+using Gee;
+
+public abstract class BidirListTests : ListTests {
+
+ public BidirListTests (string name) {
+ base (name);
+ add_test ("[List] bi-directional list iterator", test_bidir_list_iterator);
+ }
+
+ public void test_bidir_list_iterator () {
+ var test_list = test_collection as Gee.BidirList<string>;
+
+ // Check the test list is not null
+ assert (test_list != null);
+
+ // Check iterate empty list
+ var iterator = test_list.bidir_list_iterator ();
+ assert (! iterator.has_next ());
+ assert (! iterator.next ());
+ assert (! iterator.has_previous ());
+ assert (! iterator.previous ());
+ assert (! iterator.first ());
+ assert (! iterator.last ());
+
+ // Check iterate list
+ assert (test_list.add ("one"));
+ assert (test_list.add ("two"));
+ assert (test_list.add ("three"));
+
+ iterator = test_list.bidir_list_iterator ();
+ assert (iterator.next());
+ assert (iterator.get () == "one");
+ assert (iterator.index () == 0);
+ ((ListIterator<string>)iterator).set ("new one");
+ assert (iterator.next());
+ assert (iterator.get () == "two");
+ assert (iterator.index () == 1);
+ ((ListIterator<string>)iterator).set ("new two");
+ assert (test_list.size == 3);
+ assert (iterator.index () == 1);
+ iterator.insert ("before two");
+ assert (test_list.size == 4);
+ assert (iterator.index () == 2);
+ iterator.add ("after two");
+ assert (test_list.size == 5);
+ assert (iterator.index () == 3);
+ assert (iterator.next());
+ assert (iterator.get () == "three");
+ assert (iterator.index () == 4);
+ ((ListIterator<string>)iterator).set ("new three");
+ assert (! iterator.has_next ());
+ assert (! iterator.next ());
+
+ assert (iterator.first ());
+ assert (iterator.get () == "new one");
+ assert (iterator.index () == 0);
+ assert (! iterator.has_previous ());
+ assert (! iterator.previous ());
+
+ assert (iterator.last ());
+ assert (iterator.get () == "new three");
+ assert (iterator.index () == 4);
+ assert (! iterator.has_next ());
+ assert (! iterator.next ());
+
+ assert (iterator.has_previous ());
+ assert (iterator.previous ());
+ assert (iterator.get () == "after two");
+ assert (iterator.index () == 3);
+ assert (iterator.has_previous ());
+ assert (iterator.previous ());
+ assert (iterator.get () == "new two");
+ assert (iterator.index () == 2);
+ assert (iterator.has_previous ());
+ assert (iterator.previous ());
+ assert (iterator.get () == "before two");
+ assert (iterator.index () == 1);
+ assert (iterator.has_previous ());
+ assert (iterator.previous ());
+ assert (iterator.get () == "new one");
+ assert (iterator.index () == 0);
+ }
+}
+
diff --git a/tests/testbidirsortedmap.c b/tests/testbidirsortedmap.c
new file mode 100644
index 0000000..5c19452
--- /dev/null
+++ b/tests/testbidirsortedmap.c
@@ -0,0 +1,2251 @@
+/* testbidirsortedmap.c generated by valac 0.18.0, the Vala compiler
+ * generated from testbidirsortedmap.vala, do not modify */
+
+/* testbidirsortedmap.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_MAP_TESTS (map_tests_get_type ())
+#define MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAP_TESTS, MapTests))
+#define MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAP_TESTS, MapTestsClass))
+#define IS_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAP_TESTS))
+#define IS_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAP_TESTS))
+#define MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAP_TESTS, MapTestsClass))
+
+typedef struct _MapTests MapTests;
+typedef struct _MapTestsClass MapTestsClass;
+typedef struct _MapTestsPrivate MapTestsPrivate;
+
+#define GEE_TYPE_SORTED_MAP_TESTS (gee_sorted_map_tests_get_type ())
+#define GEE_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTests))
+#define GEE_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTestsClass))
+#define GEE_IS_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SORTED_MAP_TESTS))
+#define GEE_IS_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_SORTED_MAP_TESTS))
+#define GEE_SORTED_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTestsClass))
+
+typedef struct _GeeSortedMapTests GeeSortedMapTests;
+typedef struct _GeeSortedMapTestsClass GeeSortedMapTestsClass;
+typedef struct _GeeSortedMapTestsPrivate GeeSortedMapTestsPrivate;
+
+#define TYPE_BIDIR_SORTED_MAP_TESTS (bidir_sorted_map_tests_get_type ())
+#define BIDIR_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTests))
+#define BIDIR_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTestsClass))
+#define IS_BIDIR_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_SORTED_MAP_TESTS))
+#define IS_BIDIR_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_SORTED_MAP_TESTS))
+#define BIDIR_SORTED_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTestsClass))
+
+typedef struct _BidirSortedMapTests BidirSortedMapTests;
+typedef struct _BidirSortedMapTestsClass BidirSortedMapTestsClass;
+typedef struct _BidirSortedMapTestsPrivate BidirSortedMapTestsPrivate;
+
+#define GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TYPE (gee_sorted_map_tests_sub_map_tests_type_get_type ())
+
+#define BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS (bidir_sorted_map_tests_bidir_sub_map_tests_get_type ())
+#define BIDIR_SORTED_MAP_TESTS_BIDIR_SUB_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS, BidirSortedMapTestsBidirSubMapTests))
+#define BIDIR_SORTED_MAP_TESTS_BIDIR_SUB_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS, BidirSortedMapTestsBidirSubMapTestsClass))
+#define BIDIR_SORTED_MAP_TESTS_IS_BIDIR_SUB_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS))
+#define BIDIR_SORTED_MAP_TESTS_IS_BIDIR_SUB_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS))
+#define BIDIR_SORTED_MAP_TESTS_BIDIR_SUB_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS, BidirSortedMapTestsBidirSubMapTestsClass))
+
+typedef struct _BidirSortedMapTestsBidirSubMapTests BidirSortedMapTestsBidirSubMapTests;
+typedef struct _BidirSortedMapTestsBidirSubMapTestsClass BidirSortedMapTestsBidirSubMapTestsClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _BidirSortedMapTestsBidirSubMapTestsPrivate BidirSortedMapTestsBidirSubMapTestsPrivate;
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _MapTests {
+ GeeTestCase parent_instance;
+ MapTestsPrivate * priv;
+ GeeMap* test_map;
+};
+
+struct _MapTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _GeeSortedMapTests {
+ MapTests parent_instance;
+ GeeSortedMapTestsPrivate * priv;
+};
+
+struct _GeeSortedMapTestsClass {
+ MapTestsClass parent_class;
+};
+
+struct _BidirSortedMapTests {
+ GeeSortedMapTests parent_instance;
+ BidirSortedMapTestsPrivate * priv;
+};
+
+struct _BidirSortedMapTestsClass {
+ GeeSortedMapTestsClass parent_class;
+};
+
+typedef void (*GeeTestCaseTestMethod) (void* user_data);
+typedef enum {
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD,
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL,
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB,
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY
+} GeeSortedMapTestsSubMapTestsType;
+
+struct _BidirSortedMapTestsBidirSubMapTests {
+ GeeTestCase parent_instance;
+ BidirSortedMapTestsBidirSubMapTestsPrivate * priv;
+};
+
+struct _BidirSortedMapTestsBidirSubMapTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _BidirSortedMapTestsBidirSubMapTestsPrivate {
+ GeeBidirSortedMap* master;
+ GeeBidirSortedMap* submap;
+ BidirSortedMapTests* test;
+ GeeSortedMapTestsSubMapTestsType type;
+};
+
+
+static gpointer bidir_sorted_map_tests_parent_class = NULL;
+static gpointer bidir_sorted_map_tests_bidir_sub_map_tests_parent_class = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType map_tests_get_type (void) G_GNUC_CONST;
+GType gee_sorted_map_tests_get_type (void) G_GNUC_CONST;
+GType bidir_sorted_map_tests_get_type (void) G_GNUC_CONST;
+enum {
+ BIDIR_SORTED_MAP_TESTS_DUMMY_PROPERTY
+};
+BidirSortedMapTests* bidir_sorted_map_tests_construct (GType object_type, const gchar* name);
+GeeSortedMapTests* gee_sorted_map_tests_construct (GType object_type, const gchar* name);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
+void bidir_sorted_map_tests_test_bidir_iterator_can_go_backward (BidirSortedMapTests* self);
+static void _bidir_sorted_map_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method (gpointer self);
+void bidir_sorted_map_tests_test_bidir_iterator_last (BidirSortedMapTests* self);
+static void _bidir_sorted_map_tests_test_bidir_iterator_last_gee_test_case_test_method (gpointer self);
+GTestSuite* gee_test_case_get_suite (GeeTestCase* self);
+GType gee_sorted_map_tests_sub_map_tests_type_get_type (void) G_GNUC_CONST;
+BidirSortedMapTestsBidirSubMapTests* bidir_sorted_map_tests_bidir_sub_map_tests_new (BidirSortedMapTests* test, GeeSortedMapTestsSubMapTestsType type);
+BidirSortedMapTestsBidirSubMapTests* bidir_sorted_map_tests_bidir_sub_map_tests_construct (GType object_type, BidirSortedMapTests* test, GeeSortedMapTestsSubMapTestsType type);
+GType bidir_sorted_map_tests_bidir_sub_map_tests_get_type (void) G_GNUC_CONST;
+void map_tests_assert_entry (GeeMapEntry* e, const gchar* key, const gchar* value);
+#define BIDIR_SORTED_MAP_TESTS_BIDIR_SUB_MAP_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS, BidirSortedMapTestsBidirSubMapTestsPrivate))
+enum {
+ BIDIR_SORTED_MAP_TESTS_BIDIR_SUB_MAP_TESTS_DUMMY_PROPERTY
+};
+const gchar* gee_sorted_map_tests_sub_map_tests_type_to_string (GeeSortedMapTestsSubMapTestsType self);
+GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
+void bidir_sorted_map_tests_bidir_sub_map_tests_test_bidir_iterators (BidirSortedMapTestsBidirSubMapTests* self);
+static void _bidir_sorted_map_tests_bidir_sub_map_tests_test_bidir_iterators_gee_test_case_test_method (gpointer self);
+static void bidir_sorted_map_tests_bidir_sub_map_tests_real_set_up (GeeTestCase* base);
+void gee_test_case_set_up (GeeTestCase* self);
+static void bidir_sorted_map_tests_bidir_sub_map_tests_real_tear_down (GeeTestCase* base);
+void gee_test_case_tear_down (GeeTestCase* self);
+void bidir_sorted_map_tests_bidir_sub_map_tests_set_default_values (BidirSortedMapTestsBidirSubMapTests* self, gchar*** contains, int* contains_length1, gchar*** not_contains, int* not_contains_length1);
+static void bidir_sorted_map_tests_bidir_sub_map_tests_finalize (GObject* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+
+static void _bidir_sorted_map_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method (gpointer self) {
+ bidir_sorted_map_tests_test_bidir_iterator_can_go_backward (self);
+}
+
+
+static void _bidir_sorted_map_tests_test_bidir_iterator_last_gee_test_case_test_method (gpointer self) {
+ bidir_sorted_map_tests_test_bidir_iterator_last (self);
+}
+
+
+BidirSortedMapTests* bidir_sorted_map_tests_construct (GType object_type, const gchar* name) {
+ BidirSortedMapTests * self = NULL;
+ const gchar* _tmp0_;
+ GTestSuite* _tmp1_ = NULL;
+ BidirSortedMapTestsBidirSubMapTests* _tmp2_;
+ BidirSortedMapTestsBidirSubMapTests* _tmp3_;
+ GTestSuite* _tmp4_ = NULL;
+ GTestSuite* _tmp5_ = NULL;
+ BidirSortedMapTestsBidirSubMapTests* _tmp6_;
+ BidirSortedMapTestsBidirSubMapTests* _tmp7_;
+ GTestSuite* _tmp8_ = NULL;
+ GTestSuite* _tmp9_ = NULL;
+ BidirSortedMapTestsBidirSubMapTests* _tmp10_;
+ BidirSortedMapTestsBidirSubMapTests* _tmp11_;
+ GTestSuite* _tmp12_ = NULL;
+ GTestSuite* _tmp13_ = NULL;
+ BidirSortedMapTestsBidirSubMapTests* _tmp14_;
+ BidirSortedMapTestsBidirSubMapTests* _tmp15_;
+ GTestSuite* _tmp16_ = NULL;
+ g_return_val_if_fail (name != NULL, NULL);
+ _tmp0_ = name;
+ self = (BidirSortedMapTests*) gee_sorted_map_tests_construct (object_type, _tmp0_);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] bi-directional iterators can go backward", _bidir_sorted_map_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can to end", _bidir_sorted_map_tests_test_bidir_iterator_last_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ _tmp1_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp2_ = bidir_sorted_map_tests_bidir_sub_map_tests_new (self, GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD);
+ _tmp3_ = _tmp2_;
+ _tmp4_ = gee_test_case_get_suite ((GeeTestCase*) _tmp3_);
+ g_test_suite_add_suite (_tmp1_, _tmp4_);
+ _g_object_unref0 (_tmp3_);
+ _tmp5_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp6_ = bidir_sorted_map_tests_bidir_sub_map_tests_new (self, GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL);
+ _tmp7_ = _tmp6_;
+ _tmp8_ = gee_test_case_get_suite ((GeeTestCase*) _tmp7_);
+ g_test_suite_add_suite (_tmp5_, _tmp8_);
+ _g_object_unref0 (_tmp7_);
+ _tmp9_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp10_ = bidir_sorted_map_tests_bidir_sub_map_tests_new (self, GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB);
+ _tmp11_ = _tmp10_;
+ _tmp12_ = gee_test_case_get_suite ((GeeTestCase*) _tmp11_);
+ g_test_suite_add_suite (_tmp9_, _tmp12_);
+ _g_object_unref0 (_tmp11_);
+ _tmp13_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp14_ = bidir_sorted_map_tests_bidir_sub_map_tests_new (self, GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY);
+ _tmp15_ = _tmp14_;
+ _tmp16_ = gee_test_case_get_suite ((GeeTestCase*) _tmp15_);
+ g_test_suite_add_suite (_tmp13_, _tmp16_);
+ _g_object_unref0 (_tmp15_);
+ return self;
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+ return self ? g_object_ref (self) : NULL;
+}
+
+
+void bidir_sorted_map_tests_test_bidir_iterator_can_go_backward (BidirSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeBidirSortedMap* _tmp1_;
+ GeeBidirSortedMap* test_sorted_map;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeBidirSortedSet* keys;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeBidirSortedSet* entries;
+ GeeBidirIterator* _tmp6_ = NULL;
+ GeeBidirIterator* keys_iterator;
+ GeeBidirIterator* _tmp7_ = NULL;
+ GeeBidirIterator* entries_iterator;
+ GeeBidirMapIterator* _tmp8_ = NULL;
+ GeeBidirMapIterator* map_iterator;
+ GeeBidirIterator* _tmp9_;
+ gboolean _tmp10_ = FALSE;
+ GeeBidirIterator* _tmp11_;
+ gboolean _tmp12_ = FALSE;
+ GeeBidirMapIterator* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ GeeBidirIterator* _tmp15_;
+ gboolean _tmp16_ = FALSE;
+ GeeBidirIterator* _tmp17_;
+ gboolean _tmp18_ = FALSE;
+ GeeBidirMapIterator* _tmp19_;
+ gboolean _tmp20_ = FALSE;
+ GeeBidirIterator* _tmp21_ = NULL;
+ GeeBidirIterator* _tmp22_ = NULL;
+ GeeBidirMapIterator* _tmp23_ = NULL;
+ GeeBidirIterator* _tmp24_;
+ gboolean _tmp25_ = FALSE;
+ GeeBidirIterator* _tmp26_;
+ gboolean _tmp27_ = FALSE;
+ GeeBidirMapIterator* _tmp28_;
+ gboolean _tmp29_ = FALSE;
+ GeeBidirIterator* _tmp30_;
+ gpointer _tmp31_ = NULL;
+ gchar* _tmp32_;
+ GeeBidirIterator* _tmp33_;
+ gpointer _tmp34_ = NULL;
+ GeeMapEntry* _tmp35_;
+ GeeBidirMapIterator* _tmp36_;
+ gpointer _tmp37_ = NULL;
+ gchar* _tmp38_;
+ GeeBidirMapIterator* _tmp39_;
+ gpointer _tmp40_ = NULL;
+ gchar* _tmp41_;
+ GeeBidirIterator* _tmp42_;
+ gboolean _tmp43_ = FALSE;
+ GeeBidirIterator* _tmp44_;
+ gboolean _tmp45_ = FALSE;
+ GeeBidirMapIterator* _tmp46_;
+ gboolean _tmp47_ = FALSE;
+ GeeBidirIterator* _tmp48_;
+ gboolean _tmp49_ = FALSE;
+ GeeBidirIterator* _tmp50_;
+ gboolean _tmp51_ = FALSE;
+ GeeBidirMapIterator* _tmp52_;
+ gboolean _tmp53_ = FALSE;
+ GeeBidirIterator* _tmp54_;
+ gpointer _tmp55_ = NULL;
+ gchar* _tmp56_;
+ GeeBidirIterator* _tmp57_;
+ gpointer _tmp58_ = NULL;
+ GeeMapEntry* _tmp59_;
+ GeeBidirMapIterator* _tmp60_;
+ gpointer _tmp61_ = NULL;
+ gchar* _tmp62_;
+ GeeBidirMapIterator* _tmp63_;
+ gpointer _tmp64_ = NULL;
+ gchar* _tmp65_;
+ GeeBidirIterator* _tmp66_;
+ gboolean _tmp67_ = FALSE;
+ GeeBidirIterator* _tmp68_;
+ gboolean _tmp69_ = FALSE;
+ GeeBidirMapIterator* _tmp70_;
+ gboolean _tmp71_ = FALSE;
+ GeeBidirIterator* _tmp72_;
+ gboolean _tmp73_ = FALSE;
+ GeeBidirIterator* _tmp74_;
+ gboolean _tmp75_ = FALSE;
+ GeeBidirMapIterator* _tmp76_;
+ gboolean _tmp77_ = FALSE;
+ GeeBidirIterator* _tmp78_;
+ gpointer _tmp79_ = NULL;
+ gchar* _tmp80_;
+ GeeBidirIterator* _tmp81_;
+ gpointer _tmp82_ = NULL;
+ GeeMapEntry* _tmp83_;
+ GeeBidirMapIterator* _tmp84_;
+ gpointer _tmp85_ = NULL;
+ gchar* _tmp86_;
+ GeeBidirMapIterator* _tmp87_;
+ gpointer _tmp88_ = NULL;
+ gchar* _tmp89_;
+ GeeBidirIterator* _tmp90_;
+ gboolean _tmp91_ = FALSE;
+ GeeBidirIterator* _tmp92_;
+ gboolean _tmp93_ = FALSE;
+ GeeBidirMapIterator* _tmp94_;
+ gboolean _tmp95_ = FALSE;
+ GeeBidirIterator* _tmp96_;
+ gboolean _tmp97_ = FALSE;
+ GeeBidirIterator* _tmp98_;
+ gboolean _tmp99_ = FALSE;
+ GeeBidirMapIterator* _tmp100_;
+ gboolean _tmp101_ = FALSE;
+ GeeBidirIterator* _tmp102_;
+ gpointer _tmp103_ = NULL;
+ gchar* _tmp104_;
+ GeeBidirIterator* _tmp105_;
+ gpointer _tmp106_ = NULL;
+ GeeMapEntry* _tmp107_;
+ GeeBidirMapIterator* _tmp108_;
+ gpointer _tmp109_ = NULL;
+ gchar* _tmp110_;
+ GeeBidirMapIterator* _tmp111_;
+ gpointer _tmp112_ = NULL;
+ gchar* _tmp113_;
+ GeeBidirIterator* _tmp114_;
+ gboolean _tmp115_ = FALSE;
+ GeeBidirIterator* _tmp116_;
+ gboolean _tmp117_ = FALSE;
+ GeeBidirMapIterator* _tmp118_;
+ gboolean _tmp119_ = FALSE;
+ GeeBidirIterator* _tmp120_;
+ gboolean _tmp121_ = FALSE;
+ GeeBidirIterator* _tmp122_;
+ gboolean _tmp123_ = FALSE;
+ GeeBidirMapIterator* _tmp124_;
+ gboolean _tmp125_ = FALSE;
+ GeeBidirIterator* _tmp126_;
+ gpointer _tmp127_ = NULL;
+ gchar* _tmp128_;
+ GeeBidirIterator* _tmp129_;
+ gpointer _tmp130_ = NULL;
+ GeeMapEntry* _tmp131_;
+ GeeBidirMapIterator* _tmp132_;
+ gpointer _tmp133_ = NULL;
+ gchar* _tmp134_;
+ GeeBidirMapIterator* _tmp135_;
+ gpointer _tmp136_ = NULL;
+ gchar* _tmp137_;
+ GeeBidirIterator* _tmp138_;
+ gboolean _tmp139_ = FALSE;
+ GeeBidirIterator* _tmp140_;
+ gboolean _tmp141_ = FALSE;
+ GeeBidirMapIterator* _tmp142_;
+ gboolean _tmp143_ = FALSE;
+ GeeBidirIterator* _tmp144_;
+ gboolean _tmp145_ = FALSE;
+ GeeBidirIterator* _tmp146_;
+ gboolean _tmp147_ = FALSE;
+ GeeBidirMapIterator* _tmp148_;
+ gboolean _tmp149_ = FALSE;
+ GeeBidirIterator* _tmp150_;
+ gpointer _tmp151_ = NULL;
+ gchar* _tmp152_;
+ GeeBidirIterator* _tmp153_;
+ gpointer _tmp154_ = NULL;
+ GeeMapEntry* _tmp155_;
+ GeeBidirMapIterator* _tmp156_;
+ gpointer _tmp157_ = NULL;
+ gchar* _tmp158_;
+ GeeBidirMapIterator* _tmp159_;
+ gpointer _tmp160_ = NULL;
+ gchar* _tmp161_;
+ GeeBidirIterator* _tmp162_;
+ gboolean _tmp163_ = FALSE;
+ GeeBidirIterator* _tmp164_;
+ gboolean _tmp165_ = FALSE;
+ GeeBidirMapIterator* _tmp166_;
+ gboolean _tmp167_ = FALSE;
+ GeeBidirIterator* _tmp168_;
+ gboolean _tmp169_ = FALSE;
+ GeeBidirIterator* _tmp170_;
+ gboolean _tmp171_ = FALSE;
+ GeeBidirMapIterator* _tmp172_;
+ gboolean _tmp173_ = FALSE;
+ GeeBidirIterator* _tmp174_;
+ gboolean _tmp175_ = FALSE;
+ GeeBidirIterator* _tmp176_;
+ gboolean _tmp177_ = FALSE;
+ GeeBidirMapIterator* _tmp178_;
+ gboolean _tmp179_ = FALSE;
+ GeeBidirIterator* _tmp180_;
+ gpointer _tmp181_ = NULL;
+ gchar* _tmp182_;
+ GeeBidirIterator* _tmp183_;
+ gpointer _tmp184_ = NULL;
+ GeeMapEntry* _tmp185_;
+ GeeBidirMapIterator* _tmp186_;
+ gpointer _tmp187_ = NULL;
+ gchar* _tmp188_;
+ GeeBidirMapIterator* _tmp189_;
+ gpointer _tmp190_ = NULL;
+ gchar* _tmp191_;
+ GeeBidirIterator* _tmp192_;
+ gboolean _tmp193_ = FALSE;
+ GeeBidirIterator* _tmp194_;
+ gboolean _tmp195_ = FALSE;
+ GeeBidirMapIterator* _tmp196_;
+ gboolean _tmp197_ = FALSE;
+ GeeBidirIterator* _tmp198_;
+ gpointer _tmp199_ = NULL;
+ gchar* _tmp200_;
+ GeeBidirIterator* _tmp201_;
+ gpointer _tmp202_ = NULL;
+ GeeMapEntry* _tmp203_;
+ GeeBidirMapIterator* _tmp204_;
+ gpointer _tmp205_ = NULL;
+ gchar* _tmp206_;
+ GeeBidirMapIterator* _tmp207_;
+ gpointer _tmp208_ = NULL;
+ gchar* _tmp209_;
+ GeeBidirIterator* _tmp210_;
+ gboolean _tmp211_ = FALSE;
+ GeeBidirIterator* _tmp212_;
+ gboolean _tmp213_ = FALSE;
+ GeeBidirMapIterator* _tmp214_;
+ gboolean _tmp215_ = FALSE;
+ GeeBidirIterator* _tmp216_;
+ gpointer _tmp217_ = NULL;
+ gchar* _tmp218_;
+ GeeBidirIterator* _tmp219_;
+ gpointer _tmp220_ = NULL;
+ GeeMapEntry* _tmp221_;
+ GeeBidirMapIterator* _tmp222_;
+ gpointer _tmp223_ = NULL;
+ gchar* _tmp224_;
+ GeeBidirMapIterator* _tmp225_;
+ gpointer _tmp226_ = NULL;
+ gchar* _tmp227_;
+ GeeBidirIterator* _tmp228_;
+ gboolean _tmp229_ = FALSE;
+ GeeBidirIterator* _tmp230_;
+ gboolean _tmp231_ = FALSE;
+ GeeBidirMapIterator* _tmp232_;
+ gboolean _tmp233_ = FALSE;
+ GeeBidirIterator* _tmp234_;
+ gpointer _tmp235_ = NULL;
+ gchar* _tmp236_;
+ GeeBidirIterator* _tmp237_;
+ gpointer _tmp238_ = NULL;
+ GeeMapEntry* _tmp239_;
+ GeeBidirMapIterator* _tmp240_;
+ gpointer _tmp241_ = NULL;
+ gchar* _tmp242_;
+ GeeBidirMapIterator* _tmp243_;
+ gpointer _tmp244_ = NULL;
+ gchar* _tmp245_;
+ GeeBidirIterator* _tmp246_;
+ gboolean _tmp247_ = FALSE;
+ GeeBidirIterator* _tmp248_;
+ gboolean _tmp249_ = FALSE;
+ GeeBidirMapIterator* _tmp250_;
+ gboolean _tmp251_ = FALSE;
+ GeeBidirIterator* _tmp252_;
+ gpointer _tmp253_ = NULL;
+ gchar* _tmp254_;
+ GeeBidirIterator* _tmp255_;
+ gpointer _tmp256_ = NULL;
+ GeeMapEntry* _tmp257_;
+ GeeBidirMapIterator* _tmp258_;
+ gpointer _tmp259_ = NULL;
+ gchar* _tmp260_;
+ GeeBidirMapIterator* _tmp261_;
+ gpointer _tmp262_ = NULL;
+ gchar* _tmp263_;
+ GeeBidirIterator* _tmp264_;
+ gboolean _tmp265_ = FALSE;
+ GeeBidirIterator* _tmp266_;
+ gboolean _tmp267_ = FALSE;
+ GeeBidirMapIterator* _tmp268_;
+ gboolean _tmp269_ = FALSE;
+ GeeBidirIterator* _tmp270_;
+ gpointer _tmp271_ = NULL;
+ gchar* _tmp272_;
+ GeeBidirIterator* _tmp273_;
+ gpointer _tmp274_ = NULL;
+ GeeMapEntry* _tmp275_;
+ GeeBidirMapIterator* _tmp276_;
+ gpointer _tmp277_ = NULL;
+ gchar* _tmp278_;
+ GeeBidirMapIterator* _tmp279_;
+ gpointer _tmp280_ = NULL;
+ gchar* _tmp281_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_MAP) ? ((GeeBidirSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = gee_sorted_map_get_ascending_keys ((GeeSortedMap*) test_sorted_map);
+ _tmp3_ = _tmp2_;
+ keys = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp3_) : NULL;
+ _tmp4_ = gee_sorted_map_get_ascending_entries ((GeeSortedMap*) test_sorted_map);
+ _tmp5_ = _tmp4_;
+ entries = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp5_) : NULL;
+ _tmp6_ = gee_bidir_sorted_set_bidir_iterator (keys);
+ keys_iterator = _tmp6_;
+ _tmp7_ = gee_bidir_sorted_set_bidir_iterator (entries);
+ entries_iterator = _tmp7_;
+ _tmp8_ = gee_bidir_sorted_map_bidir_map_iterator (test_sorted_map);
+ map_iterator = _tmp8_;
+ _tmp9_ = keys_iterator;
+ _tmp10_ = gee_bidir_iterator_has_previous (_tmp9_);
+ _vala_assert (!_tmp10_, "!keys_iterator.has_previous ()");
+ _tmp11_ = entries_iterator;
+ _tmp12_ = gee_bidir_iterator_has_previous (_tmp11_);
+ _vala_assert (!_tmp12_, "!entries_iterator.has_previous ()");
+ _tmp13_ = map_iterator;
+ _tmp14_ = gee_bidir_map_iterator_has_previous (_tmp13_);
+ _vala_assert (!_tmp14_, "!map_iterator.has_previous ()");
+ _tmp15_ = keys_iterator;
+ _tmp16_ = gee_bidir_iterator_previous (_tmp15_);
+ _vala_assert (!_tmp16_, "!keys_iterator.previous ()");
+ _tmp17_ = entries_iterator;
+ _tmp18_ = gee_bidir_iterator_has_previous (_tmp17_);
+ _vala_assert (!_tmp18_, "!entries_iterator.has_previous ()");
+ _tmp19_ = map_iterator;
+ _tmp20_ = gee_bidir_map_iterator_previous (_tmp19_);
+ _vala_assert (!_tmp20_, "!map_iterator.previous ()");
+ gee_map_set ((GeeMap*) test_sorted_map, "one", "one");
+ gee_map_set ((GeeMap*) test_sorted_map, "two", "two");
+ gee_map_set ((GeeMap*) test_sorted_map, "three", "three");
+ gee_map_set ((GeeMap*) test_sorted_map, "four", "four");
+ gee_map_set ((GeeMap*) test_sorted_map, "five", "five");
+ gee_map_set ((GeeMap*) test_sorted_map, "six", "six");
+ _tmp21_ = gee_bidir_sorted_set_bidir_iterator (keys);
+ _g_object_unref0 (keys_iterator);
+ keys_iterator = _tmp21_;
+ _tmp22_ = gee_bidir_sorted_set_bidir_iterator (entries);
+ _g_object_unref0 (entries_iterator);
+ entries_iterator = _tmp22_;
+ _tmp23_ = gee_bidir_sorted_map_bidir_map_iterator (test_sorted_map);
+ _g_object_unref0 (map_iterator);
+ map_iterator = _tmp23_;
+ _tmp24_ = keys_iterator;
+ _tmp25_ = gee_iterator_next ((GeeIterator*) _tmp24_);
+ _vala_assert (_tmp25_, "keys_iterator.next ()");
+ _tmp26_ = entries_iterator;
+ _tmp27_ = gee_iterator_next ((GeeIterator*) _tmp26_);
+ _vala_assert (_tmp27_, "entries_iterator.next ()");
+ _tmp28_ = map_iterator;
+ _tmp29_ = gee_map_iterator_next ((GeeMapIterator*) _tmp28_);
+ _vala_assert (_tmp29_, "map_iterator.next ()");
+ _tmp30_ = keys_iterator;
+ _tmp31_ = gee_iterator_get ((GeeIterator*) _tmp30_);
+ _tmp32_ = (gchar*) _tmp31_;
+ _vala_assert (g_strcmp0 (_tmp32_, "five") == 0, "keys_iterator.get () == \"five\"");
+ _g_free0 (_tmp32_);
+ _tmp33_ = entries_iterator;
+ _tmp34_ = gee_iterator_get ((GeeIterator*) _tmp33_);
+ _tmp35_ = (GeeMapEntry*) _tmp34_;
+ map_tests_assert_entry (_tmp35_, "five", "five");
+ _g_object_unref0 (_tmp35_);
+ _tmp36_ = map_iterator;
+ _tmp37_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp36_);
+ _tmp38_ = (gchar*) _tmp37_;
+ _vala_assert (g_strcmp0 (_tmp38_, "five") == 0, "map_iterator.get_key () == \"five\"");
+ _g_free0 (_tmp38_);
+ _tmp39_ = map_iterator;
+ _tmp40_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp39_);
+ _tmp41_ = (gchar*) _tmp40_;
+ _vala_assert (g_strcmp0 (_tmp41_, "five") == 0, "map_iterator.get_value () == \"five\"");
+ _g_free0 (_tmp41_);
+ _tmp42_ = keys_iterator;
+ _tmp43_ = gee_bidir_iterator_has_previous (_tmp42_);
+ _vala_assert (!_tmp43_, "!keys_iterator.has_previous ()");
+ _tmp44_ = entries_iterator;
+ _tmp45_ = gee_bidir_iterator_has_previous (_tmp44_);
+ _vala_assert (!_tmp45_, "!entries_iterator.has_previous ()");
+ _tmp46_ = map_iterator;
+ _tmp47_ = gee_bidir_map_iterator_has_previous (_tmp46_);
+ _vala_assert (!_tmp47_, "!map_iterator.has_previous ()");
+ _tmp48_ = keys_iterator;
+ _tmp49_ = gee_iterator_next ((GeeIterator*) _tmp48_);
+ _vala_assert (_tmp49_, "keys_iterator.next ()");
+ _tmp50_ = entries_iterator;
+ _tmp51_ = gee_iterator_next ((GeeIterator*) _tmp50_);
+ _vala_assert (_tmp51_, "entries_iterator.next ()");
+ _tmp52_ = map_iterator;
+ _tmp53_ = gee_map_iterator_next ((GeeMapIterator*) _tmp52_);
+ _vala_assert (_tmp53_, "map_iterator.next ()");
+ _tmp54_ = keys_iterator;
+ _tmp55_ = gee_iterator_get ((GeeIterator*) _tmp54_);
+ _tmp56_ = (gchar*) _tmp55_;
+ _vala_assert (g_strcmp0 (_tmp56_, "four") == 0, "keys_iterator.get () == \"four\"");
+ _g_free0 (_tmp56_);
+ _tmp57_ = entries_iterator;
+ _tmp58_ = gee_iterator_get ((GeeIterator*) _tmp57_);
+ _tmp59_ = (GeeMapEntry*) _tmp58_;
+ map_tests_assert_entry (_tmp59_, "four", "four");
+ _g_object_unref0 (_tmp59_);
+ _tmp60_ = map_iterator;
+ _tmp61_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp60_);
+ _tmp62_ = (gchar*) _tmp61_;
+ _vala_assert (g_strcmp0 (_tmp62_, "four") == 0, "map_iterator.get_key () == \"four\"");
+ _g_free0 (_tmp62_);
+ _tmp63_ = map_iterator;
+ _tmp64_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp63_);
+ _tmp65_ = (gchar*) _tmp64_;
+ _vala_assert (g_strcmp0 (_tmp65_, "four") == 0, "map_iterator.get_value () == \"four\"");
+ _g_free0 (_tmp65_);
+ _tmp66_ = keys_iterator;
+ _tmp67_ = gee_bidir_iterator_has_previous (_tmp66_);
+ _vala_assert (_tmp67_, "keys_iterator.has_previous ()");
+ _tmp68_ = entries_iterator;
+ _tmp69_ = gee_bidir_iterator_has_previous (_tmp68_);
+ _vala_assert (_tmp69_, "entries_iterator.has_previous ()");
+ _tmp70_ = map_iterator;
+ _tmp71_ = gee_bidir_map_iterator_has_previous (_tmp70_);
+ _vala_assert (_tmp71_, "map_iterator.has_previous ()");
+ _tmp72_ = keys_iterator;
+ _tmp73_ = gee_iterator_next ((GeeIterator*) _tmp72_);
+ _vala_assert (_tmp73_, "keys_iterator.next ()");
+ _tmp74_ = entries_iterator;
+ _tmp75_ = gee_iterator_next ((GeeIterator*) _tmp74_);
+ _vala_assert (_tmp75_, "entries_iterator.next ()");
+ _tmp76_ = map_iterator;
+ _tmp77_ = gee_map_iterator_next ((GeeMapIterator*) _tmp76_);
+ _vala_assert (_tmp77_, "map_iterator.next ()");
+ _tmp78_ = keys_iterator;
+ _tmp79_ = gee_iterator_get ((GeeIterator*) _tmp78_);
+ _tmp80_ = (gchar*) _tmp79_;
+ _vala_assert (g_strcmp0 (_tmp80_, "one") == 0, "keys_iterator.get () == \"one\"");
+ _g_free0 (_tmp80_);
+ _tmp81_ = entries_iterator;
+ _tmp82_ = gee_iterator_get ((GeeIterator*) _tmp81_);
+ _tmp83_ = (GeeMapEntry*) _tmp82_;
+ map_tests_assert_entry (_tmp83_, "one", "one");
+ _g_object_unref0 (_tmp83_);
+ _tmp84_ = map_iterator;
+ _tmp85_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp84_);
+ _tmp86_ = (gchar*) _tmp85_;
+ _vala_assert (g_strcmp0 (_tmp86_, "one") == 0, "map_iterator.get_key () == \"one\"");
+ _g_free0 (_tmp86_);
+ _tmp87_ = map_iterator;
+ _tmp88_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp87_);
+ _tmp89_ = (gchar*) _tmp88_;
+ _vala_assert (g_strcmp0 (_tmp89_, "one") == 0, "map_iterator.get_value () == \"one\"");
+ _g_free0 (_tmp89_);
+ _tmp90_ = keys_iterator;
+ _tmp91_ = gee_bidir_iterator_has_previous (_tmp90_);
+ _vala_assert (_tmp91_, "keys_iterator.has_previous ()");
+ _tmp92_ = entries_iterator;
+ _tmp93_ = gee_bidir_iterator_has_previous (_tmp92_);
+ _vala_assert (_tmp93_, "entries_iterator.has_previous ()");
+ _tmp94_ = map_iterator;
+ _tmp95_ = gee_bidir_map_iterator_has_previous (_tmp94_);
+ _vala_assert (_tmp95_, "map_iterator.has_previous ()");
+ _tmp96_ = keys_iterator;
+ _tmp97_ = gee_iterator_next ((GeeIterator*) _tmp96_);
+ _vala_assert (_tmp97_, "keys_iterator.next ()");
+ _tmp98_ = entries_iterator;
+ _tmp99_ = gee_iterator_next ((GeeIterator*) _tmp98_);
+ _vala_assert (_tmp99_, "entries_iterator.next ()");
+ _tmp100_ = map_iterator;
+ _tmp101_ = gee_map_iterator_next ((GeeMapIterator*) _tmp100_);
+ _vala_assert (_tmp101_, "map_iterator.next ()");
+ _tmp102_ = keys_iterator;
+ _tmp103_ = gee_iterator_get ((GeeIterator*) _tmp102_);
+ _tmp104_ = (gchar*) _tmp103_;
+ _vala_assert (g_strcmp0 (_tmp104_, "six") == 0, "keys_iterator.get () == \"six\"");
+ _g_free0 (_tmp104_);
+ _tmp105_ = entries_iterator;
+ _tmp106_ = gee_iterator_get ((GeeIterator*) _tmp105_);
+ _tmp107_ = (GeeMapEntry*) _tmp106_;
+ map_tests_assert_entry (_tmp107_, "six", "six");
+ _g_object_unref0 (_tmp107_);
+ _tmp108_ = map_iterator;
+ _tmp109_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp108_);
+ _tmp110_ = (gchar*) _tmp109_;
+ _vala_assert (g_strcmp0 (_tmp110_, "six") == 0, "map_iterator.get_key () == \"six\"");
+ _g_free0 (_tmp110_);
+ _tmp111_ = map_iterator;
+ _tmp112_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp111_);
+ _tmp113_ = (gchar*) _tmp112_;
+ _vala_assert (g_strcmp0 (_tmp113_, "six") == 0, "map_iterator.get_value () == \"six\"");
+ _g_free0 (_tmp113_);
+ _tmp114_ = keys_iterator;
+ _tmp115_ = gee_bidir_iterator_has_previous (_tmp114_);
+ _vala_assert (_tmp115_, "keys_iterator.has_previous ()");
+ _tmp116_ = entries_iterator;
+ _tmp117_ = gee_bidir_iterator_has_previous (_tmp116_);
+ _vala_assert (_tmp117_, "entries_iterator.has_previous ()");
+ _tmp118_ = map_iterator;
+ _tmp119_ = gee_bidir_map_iterator_has_previous (_tmp118_);
+ _vala_assert (_tmp119_, "map_iterator.has_previous ()");
+ _tmp120_ = keys_iterator;
+ _tmp121_ = gee_iterator_next ((GeeIterator*) _tmp120_);
+ _vala_assert (_tmp121_, "keys_iterator.next ()");
+ _tmp122_ = entries_iterator;
+ _tmp123_ = gee_iterator_next ((GeeIterator*) _tmp122_);
+ _vala_assert (_tmp123_, "entries_iterator.next ()");
+ _tmp124_ = map_iterator;
+ _tmp125_ = gee_map_iterator_next ((GeeMapIterator*) _tmp124_);
+ _vala_assert (_tmp125_, "map_iterator.next ()");
+ _tmp126_ = keys_iterator;
+ _tmp127_ = gee_iterator_get ((GeeIterator*) _tmp126_);
+ _tmp128_ = (gchar*) _tmp127_;
+ _vala_assert (g_strcmp0 (_tmp128_, "three") == 0, "keys_iterator.get () == \"three\"");
+ _g_free0 (_tmp128_);
+ _tmp129_ = entries_iterator;
+ _tmp130_ = gee_iterator_get ((GeeIterator*) _tmp129_);
+ _tmp131_ = (GeeMapEntry*) _tmp130_;
+ map_tests_assert_entry (_tmp131_, "three", "three");
+ _g_object_unref0 (_tmp131_);
+ _tmp132_ = map_iterator;
+ _tmp133_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp132_);
+ _tmp134_ = (gchar*) _tmp133_;
+ _vala_assert (g_strcmp0 (_tmp134_, "three") == 0, "map_iterator.get_key () == \"three\"");
+ _g_free0 (_tmp134_);
+ _tmp135_ = map_iterator;
+ _tmp136_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp135_);
+ _tmp137_ = (gchar*) _tmp136_;
+ _vala_assert (g_strcmp0 (_tmp137_, "three") == 0, "map_iterator.get_value () == \"three\"");
+ _g_free0 (_tmp137_);
+ _tmp138_ = keys_iterator;
+ _tmp139_ = gee_bidir_iterator_has_previous (_tmp138_);
+ _vala_assert (_tmp139_, "keys_iterator.has_previous ()");
+ _tmp140_ = entries_iterator;
+ _tmp141_ = gee_bidir_iterator_has_previous (_tmp140_);
+ _vala_assert (_tmp141_, "entries_iterator.has_previous ()");
+ _tmp142_ = map_iterator;
+ _tmp143_ = gee_bidir_map_iterator_has_previous (_tmp142_);
+ _vala_assert (_tmp143_, "map_iterator.has_previous ()");
+ _tmp144_ = keys_iterator;
+ _tmp145_ = gee_iterator_next ((GeeIterator*) _tmp144_);
+ _vala_assert (_tmp145_, "keys_iterator.next ()");
+ _tmp146_ = entries_iterator;
+ _tmp147_ = gee_iterator_next ((GeeIterator*) _tmp146_);
+ _vala_assert (_tmp147_, "entries_iterator.next ()");
+ _tmp148_ = map_iterator;
+ _tmp149_ = gee_map_iterator_next ((GeeMapIterator*) _tmp148_);
+ _vala_assert (_tmp149_, "map_iterator.next ()");
+ _tmp150_ = keys_iterator;
+ _tmp151_ = gee_iterator_get ((GeeIterator*) _tmp150_);
+ _tmp152_ = (gchar*) _tmp151_;
+ _vala_assert (g_strcmp0 (_tmp152_, "two") == 0, "keys_iterator.get () == \"two\"");
+ _g_free0 (_tmp152_);
+ _tmp153_ = entries_iterator;
+ _tmp154_ = gee_iterator_get ((GeeIterator*) _tmp153_);
+ _tmp155_ = (GeeMapEntry*) _tmp154_;
+ map_tests_assert_entry (_tmp155_, "two", "two");
+ _g_object_unref0 (_tmp155_);
+ _tmp156_ = map_iterator;
+ _tmp157_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp156_);
+ _tmp158_ = (gchar*) _tmp157_;
+ _vala_assert (g_strcmp0 (_tmp158_, "two") == 0, "map_iterator.get_key () == \"two\"");
+ _g_free0 (_tmp158_);
+ _tmp159_ = map_iterator;
+ _tmp160_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp159_);
+ _tmp161_ = (gchar*) _tmp160_;
+ _vala_assert (g_strcmp0 (_tmp161_, "two") == 0, "map_iterator.get_value () == \"two\"");
+ _g_free0 (_tmp161_);
+ _tmp162_ = keys_iterator;
+ _tmp163_ = gee_bidir_iterator_has_previous (_tmp162_);
+ _vala_assert (_tmp163_, "keys_iterator.has_previous ()");
+ _tmp164_ = entries_iterator;
+ _tmp165_ = gee_bidir_iterator_has_previous (_tmp164_);
+ _vala_assert (_tmp165_, "entries_iterator.has_previous ()");
+ _tmp166_ = map_iterator;
+ _tmp167_ = gee_bidir_map_iterator_has_previous (_tmp166_);
+ _vala_assert (_tmp167_, "map_iterator.has_previous ()");
+ _tmp168_ = keys_iterator;
+ _tmp169_ = gee_iterator_next ((GeeIterator*) _tmp168_);
+ _vala_assert (!_tmp169_, "!keys_iterator.next ()");
+ _tmp170_ = entries_iterator;
+ _tmp171_ = gee_iterator_next ((GeeIterator*) _tmp170_);
+ _vala_assert (!_tmp171_, "!entries_iterator.next ()");
+ _tmp172_ = map_iterator;
+ _tmp173_ = gee_map_iterator_next ((GeeMapIterator*) _tmp172_);
+ _vala_assert (!_tmp173_, "!map_iterator.next ()");
+ _tmp174_ = keys_iterator;
+ _tmp175_ = gee_bidir_iterator_previous (_tmp174_);
+ _vala_assert (_tmp175_, "keys_iterator.previous ()");
+ _tmp176_ = entries_iterator;
+ _tmp177_ = gee_bidir_iterator_previous (_tmp176_);
+ _vala_assert (_tmp177_, "entries_iterator.previous ()");
+ _tmp178_ = map_iterator;
+ _tmp179_ = gee_bidir_map_iterator_previous (_tmp178_);
+ _vala_assert (_tmp179_, "map_iterator.previous ()");
+ _tmp180_ = keys_iterator;
+ _tmp181_ = gee_iterator_get ((GeeIterator*) _tmp180_);
+ _tmp182_ = (gchar*) _tmp181_;
+ _vala_assert (g_strcmp0 (_tmp182_, "three") == 0, "keys_iterator.get () == \"three\"");
+ _g_free0 (_tmp182_);
+ _tmp183_ = entries_iterator;
+ _tmp184_ = gee_iterator_get ((GeeIterator*) _tmp183_);
+ _tmp185_ = (GeeMapEntry*) _tmp184_;
+ map_tests_assert_entry (_tmp185_, "three", "three");
+ _g_object_unref0 (_tmp185_);
+ _tmp186_ = map_iterator;
+ _tmp187_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp186_);
+ _tmp188_ = (gchar*) _tmp187_;
+ _vala_assert (g_strcmp0 (_tmp188_, "three") == 0, "map_iterator.get_key () == \"three\"");
+ _g_free0 (_tmp188_);
+ _tmp189_ = map_iterator;
+ _tmp190_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp189_);
+ _tmp191_ = (gchar*) _tmp190_;
+ _vala_assert (g_strcmp0 (_tmp191_, "three") == 0, "map_iterator.get_value () == \"three\"");
+ _g_free0 (_tmp191_);
+ _tmp192_ = keys_iterator;
+ _tmp193_ = gee_bidir_iterator_previous (_tmp192_);
+ _vala_assert (_tmp193_, "keys_iterator.previous ()");
+ _tmp194_ = entries_iterator;
+ _tmp195_ = gee_bidir_iterator_previous (_tmp194_);
+ _vala_assert (_tmp195_, "entries_iterator.previous ()");
+ _tmp196_ = map_iterator;
+ _tmp197_ = gee_bidir_map_iterator_previous (_tmp196_);
+ _vala_assert (_tmp197_, "map_iterator.previous ()");
+ _tmp198_ = keys_iterator;
+ _tmp199_ = gee_iterator_get ((GeeIterator*) _tmp198_);
+ _tmp200_ = (gchar*) _tmp199_;
+ _vala_assert (g_strcmp0 (_tmp200_, "six") == 0, "keys_iterator.get () == \"six\"");
+ _g_free0 (_tmp200_);
+ _tmp201_ = entries_iterator;
+ _tmp202_ = gee_iterator_get ((GeeIterator*) _tmp201_);
+ _tmp203_ = (GeeMapEntry*) _tmp202_;
+ map_tests_assert_entry (_tmp203_, "six", "six");
+ _g_object_unref0 (_tmp203_);
+ _tmp204_ = map_iterator;
+ _tmp205_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp204_);
+ _tmp206_ = (gchar*) _tmp205_;
+ _vala_assert (g_strcmp0 (_tmp206_, "six") == 0, "map_iterator.get_key () == \"six\"");
+ _g_free0 (_tmp206_);
+ _tmp207_ = map_iterator;
+ _tmp208_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp207_);
+ _tmp209_ = (gchar*) _tmp208_;
+ _vala_assert (g_strcmp0 (_tmp209_, "six") == 0, "map_iterator.get_value () == \"six\"");
+ _g_free0 (_tmp209_);
+ _tmp210_ = keys_iterator;
+ _tmp211_ = gee_bidir_iterator_previous (_tmp210_);
+ _vala_assert (_tmp211_, "keys_iterator.previous ()");
+ _tmp212_ = entries_iterator;
+ _tmp213_ = gee_bidir_iterator_previous (_tmp212_);
+ _vala_assert (_tmp213_, "entries_iterator.previous ()");
+ _tmp214_ = map_iterator;
+ _tmp215_ = gee_bidir_map_iterator_previous (_tmp214_);
+ _vala_assert (_tmp215_, "map_iterator.previous ()");
+ _tmp216_ = keys_iterator;
+ _tmp217_ = gee_iterator_get ((GeeIterator*) _tmp216_);
+ _tmp218_ = (gchar*) _tmp217_;
+ _vala_assert (g_strcmp0 (_tmp218_, "one") == 0, "keys_iterator.get () == \"one\"");
+ _g_free0 (_tmp218_);
+ _tmp219_ = entries_iterator;
+ _tmp220_ = gee_iterator_get ((GeeIterator*) _tmp219_);
+ _tmp221_ = (GeeMapEntry*) _tmp220_;
+ map_tests_assert_entry (_tmp221_, "one", "one");
+ _g_object_unref0 (_tmp221_);
+ _tmp222_ = map_iterator;
+ _tmp223_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp222_);
+ _tmp224_ = (gchar*) _tmp223_;
+ _vala_assert (g_strcmp0 (_tmp224_, "one") == 0, "map_iterator.get_key () == \"one\"");
+ _g_free0 (_tmp224_);
+ _tmp225_ = map_iterator;
+ _tmp226_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp225_);
+ _tmp227_ = (gchar*) _tmp226_;
+ _vala_assert (g_strcmp0 (_tmp227_, "one") == 0, "map_iterator.get_value () == \"one\"");
+ _g_free0 (_tmp227_);
+ _tmp228_ = keys_iterator;
+ _tmp229_ = gee_bidir_iterator_previous (_tmp228_);
+ _vala_assert (_tmp229_, "keys_iterator.previous ()");
+ _tmp230_ = entries_iterator;
+ _tmp231_ = gee_bidir_iterator_previous (_tmp230_);
+ _vala_assert (_tmp231_, "entries_iterator.previous ()");
+ _tmp232_ = map_iterator;
+ _tmp233_ = gee_bidir_map_iterator_previous (_tmp232_);
+ _vala_assert (_tmp233_, "map_iterator.previous ()");
+ _tmp234_ = keys_iterator;
+ _tmp235_ = gee_iterator_get ((GeeIterator*) _tmp234_);
+ _tmp236_ = (gchar*) _tmp235_;
+ _vala_assert (g_strcmp0 (_tmp236_, "four") == 0, "keys_iterator.get () == \"four\"");
+ _g_free0 (_tmp236_);
+ _tmp237_ = entries_iterator;
+ _tmp238_ = gee_iterator_get ((GeeIterator*) _tmp237_);
+ _tmp239_ = (GeeMapEntry*) _tmp238_;
+ map_tests_assert_entry (_tmp239_, "four", "four");
+ _g_object_unref0 (_tmp239_);
+ _tmp240_ = map_iterator;
+ _tmp241_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp240_);
+ _tmp242_ = (gchar*) _tmp241_;
+ _vala_assert (g_strcmp0 (_tmp242_, "four") == 0, "map_iterator.get_key () == \"four\"");
+ _g_free0 (_tmp242_);
+ _tmp243_ = map_iterator;
+ _tmp244_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp243_);
+ _tmp245_ = (gchar*) _tmp244_;
+ _vala_assert (g_strcmp0 (_tmp245_, "four") == 0, "map_iterator.get_value () == \"four\"");
+ _g_free0 (_tmp245_);
+ _tmp246_ = keys_iterator;
+ _tmp247_ = gee_bidir_iterator_previous (_tmp246_);
+ _vala_assert (_tmp247_, "keys_iterator.previous ()");
+ _tmp248_ = entries_iterator;
+ _tmp249_ = gee_bidir_iterator_previous (_tmp248_);
+ _vala_assert (_tmp249_, "entries_iterator.previous ()");
+ _tmp250_ = map_iterator;
+ _tmp251_ = gee_bidir_map_iterator_previous (_tmp250_);
+ _vala_assert (_tmp251_, "map_iterator.previous ()");
+ _tmp252_ = keys_iterator;
+ _tmp253_ = gee_iterator_get ((GeeIterator*) _tmp252_);
+ _tmp254_ = (gchar*) _tmp253_;
+ _vala_assert (g_strcmp0 (_tmp254_, "five") == 0, "keys_iterator.get () == \"five\"");
+ _g_free0 (_tmp254_);
+ _tmp255_ = entries_iterator;
+ _tmp256_ = gee_iterator_get ((GeeIterator*) _tmp255_);
+ _tmp257_ = (GeeMapEntry*) _tmp256_;
+ map_tests_assert_entry (_tmp257_, "five", "five");
+ _g_object_unref0 (_tmp257_);
+ _tmp258_ = map_iterator;
+ _tmp259_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp258_);
+ _tmp260_ = (gchar*) _tmp259_;
+ _vala_assert (g_strcmp0 (_tmp260_, "five") == 0, "map_iterator.get_key () == \"five\"");
+ _g_free0 (_tmp260_);
+ _tmp261_ = map_iterator;
+ _tmp262_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp261_);
+ _tmp263_ = (gchar*) _tmp262_;
+ _vala_assert (g_strcmp0 (_tmp263_, "five") == 0, "map_iterator.get_value () == \"five\"");
+ _g_free0 (_tmp263_);
+ _tmp264_ = keys_iterator;
+ _tmp265_ = gee_bidir_iterator_previous (_tmp264_);
+ _vala_assert (!_tmp265_, "!keys_iterator.previous ()");
+ _tmp266_ = entries_iterator;
+ _tmp267_ = gee_bidir_iterator_previous (_tmp266_);
+ _vala_assert (!_tmp267_, "!entries_iterator.previous ()");
+ _tmp268_ = map_iterator;
+ _tmp269_ = gee_bidir_map_iterator_previous (_tmp268_);
+ _vala_assert (!_tmp269_, "!map_iterator.previous ()");
+ _tmp270_ = keys_iterator;
+ _tmp271_ = gee_iterator_get ((GeeIterator*) _tmp270_);
+ _tmp272_ = (gchar*) _tmp271_;
+ _vala_assert (g_strcmp0 (_tmp272_, "five") == 0, "keys_iterator.get () == \"five\"");
+ _g_free0 (_tmp272_);
+ _tmp273_ = entries_iterator;
+ _tmp274_ = gee_iterator_get ((GeeIterator*) _tmp273_);
+ _tmp275_ = (GeeMapEntry*) _tmp274_;
+ map_tests_assert_entry (_tmp275_, "five", "five");
+ _g_object_unref0 (_tmp275_);
+ _tmp276_ = map_iterator;
+ _tmp277_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp276_);
+ _tmp278_ = (gchar*) _tmp277_;
+ _vala_assert (g_strcmp0 (_tmp278_, "five") == 0, "map_iterator.get_key () == \"five\"");
+ _g_free0 (_tmp278_);
+ _tmp279_ = map_iterator;
+ _tmp280_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp279_);
+ _tmp281_ = (gchar*) _tmp280_;
+ _vala_assert (g_strcmp0 (_tmp281_, "five") == 0, "map_iterator.get_value () == \"five\"");
+ _g_free0 (_tmp281_);
+ _g_object_unref0 (map_iterator);
+ _g_object_unref0 (entries_iterator);
+ _g_object_unref0 (keys_iterator);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+void bidir_sorted_map_tests_test_bidir_iterator_last (BidirSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeBidirSortedMap* _tmp1_;
+ GeeBidirSortedMap* test_sorted_map;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeBidirSortedSet* keys;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeBidirSortedSet* entries;
+ GeeBidirIterator* _tmp6_ = NULL;
+ GeeBidirIterator* keys_iterator;
+ GeeBidirIterator* _tmp7_ = NULL;
+ GeeBidirIterator* entries_iterator;
+ GeeBidirIterator* _tmp8_;
+ gboolean _tmp9_ = FALSE;
+ GeeBidirIterator* _tmp10_;
+ gboolean _tmp11_ = FALSE;
+ GeeBidirIterator* _tmp12_ = NULL;
+ GeeBidirIterator* _tmp13_ = NULL;
+ GeeBidirIterator* _tmp14_;
+ gboolean _tmp15_ = FALSE;
+ GeeBidirIterator* _tmp16_;
+ gboolean _tmp17_ = FALSE;
+ GeeBidirIterator* _tmp18_;
+ gpointer _tmp19_ = NULL;
+ gchar* _tmp20_;
+ GeeBidirIterator* _tmp21_;
+ gpointer _tmp22_ = NULL;
+ GeeMapEntry* _tmp23_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_MAP) ? ((GeeBidirSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = gee_sorted_map_get_ascending_keys ((GeeSortedMap*) test_sorted_map);
+ _tmp3_ = _tmp2_;
+ keys = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp3_) : NULL;
+ _tmp4_ = gee_sorted_map_get_ascending_entries ((GeeSortedMap*) test_sorted_map);
+ _tmp5_ = _tmp4_;
+ entries = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp5_) : NULL;
+ _tmp6_ = gee_bidir_sorted_set_bidir_iterator (keys);
+ keys_iterator = _tmp6_;
+ _tmp7_ = gee_bidir_sorted_set_bidir_iterator (entries);
+ entries_iterator = _tmp7_;
+ _tmp8_ = keys_iterator;
+ _tmp9_ = gee_bidir_iterator_last (_tmp8_);
+ _vala_assert (!_tmp9_, "!keys_iterator.last ()");
+ _tmp10_ = entries_iterator;
+ _tmp11_ = gee_bidir_iterator_last (_tmp10_);
+ _vala_assert (!_tmp11_, "!entries_iterator.last ()");
+ gee_map_set ((GeeMap*) test_sorted_map, "one", "one");
+ gee_map_set ((GeeMap*) test_sorted_map, "two", "two");
+ gee_map_set ((GeeMap*) test_sorted_map, "three", "three");
+ gee_map_set ((GeeMap*) test_sorted_map, "four", "four");
+ gee_map_set ((GeeMap*) test_sorted_map, "five", "five");
+ gee_map_set ((GeeMap*) test_sorted_map, "six", "six");
+ _tmp12_ = gee_bidir_sorted_set_bidir_iterator (keys);
+ _g_object_unref0 (keys_iterator);
+ keys_iterator = _tmp12_;
+ _tmp13_ = gee_bidir_sorted_set_bidir_iterator (entries);
+ _g_object_unref0 (entries_iterator);
+ entries_iterator = _tmp13_;
+ _tmp14_ = keys_iterator;
+ _tmp15_ = gee_bidir_iterator_last (_tmp14_);
+ _vala_assert (_tmp15_, "keys_iterator.last ()");
+ _tmp16_ = entries_iterator;
+ _tmp17_ = gee_bidir_iterator_last (_tmp16_);
+ _vala_assert (_tmp17_, "entries_iterator.last ()");
+ _tmp18_ = keys_iterator;
+ _tmp19_ = gee_iterator_get ((GeeIterator*) _tmp18_);
+ _tmp20_ = (gchar*) _tmp19_;
+ _vala_assert (g_strcmp0 (_tmp20_, "two") == 0, "keys_iterator.get () == \"two\"");
+ _g_free0 (_tmp20_);
+ _tmp21_ = entries_iterator;
+ _tmp22_ = gee_iterator_get ((GeeIterator*) _tmp21_);
+ _tmp23_ = (GeeMapEntry*) _tmp22_;
+ map_tests_assert_entry (_tmp23_, "two", "two");
+ _g_object_unref0 (_tmp23_);
+ _g_object_unref0 (entries_iterator);
+ _g_object_unref0 (keys_iterator);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+static void _bidir_sorted_map_tests_bidir_sub_map_tests_test_bidir_iterators_gee_test_case_test_method (gpointer self) {
+ bidir_sorted_map_tests_bidir_sub_map_tests_test_bidir_iterators (self);
+}
+
+
+BidirSortedMapTestsBidirSubMapTests* bidir_sorted_map_tests_bidir_sub_map_tests_construct (GType object_type, BidirSortedMapTests* test, GeeSortedMapTestsSubMapTestsType type) {
+ BidirSortedMapTestsBidirSubMapTests * self = NULL;
+ GeeSortedMapTestsSubMapTestsType _tmp0_;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_;
+ BidirSortedMapTests* _tmp4_;
+ BidirSortedMapTests* _tmp5_;
+ GeeSortedMapTestsSubMapTestsType _tmp6_;
+ g_return_val_if_fail (test != NULL, NULL);
+ _tmp0_ = type;
+ _tmp1_ = gee_sorted_map_tests_sub_map_tests_type_to_string (_tmp0_);
+ _tmp2_ = g_strdup_printf ("%s Subset", _tmp1_);
+ _tmp3_ = _tmp2_;
+ self = (BidirSortedMapTestsBidirSubMapTests*) gee_test_case_construct (object_type, _tmp3_);
+ _g_free0 (_tmp3_);
+ _tmp4_ = test;
+ _tmp5_ = _g_object_ref0 (_tmp4_);
+ _g_object_unref0 (self->priv->test);
+ self->priv->test = _tmp5_;
+ _tmp6_ = type;
+ self->priv->type = _tmp6_;
+ gee_test_case_add_test ((GeeTestCase*) self, "[BidirSortedSet] bi-directional iterator", _bidir_sorted_map_tests_bidir_sub_map_tests_test_bidir_iterators_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ return self;
+}
+
+
+BidirSortedMapTestsBidirSubMapTests* bidir_sorted_map_tests_bidir_sub_map_tests_new (BidirSortedMapTests* test, GeeSortedMapTestsSubMapTestsType type) {
+ return bidir_sorted_map_tests_bidir_sub_map_tests_construct (BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS, test, type);
+}
+
+
+static void bidir_sorted_map_tests_bidir_sub_map_tests_real_set_up (GeeTestCase* base) {
+ BidirSortedMapTestsBidirSubMapTests * self;
+ BidirSortedMapTests* _tmp0_;
+ BidirSortedMapTests* _tmp1_;
+ GeeMap* _tmp2_;
+ GeeBidirSortedMap* _tmp3_;
+ GeeSortedMapTestsSubMapTestsType _tmp4_;
+ self = (BidirSortedMapTestsBidirSubMapTests*) base;
+ _tmp0_ = self->priv->test;
+ gee_test_case_set_up ((GeeTestCase*) _tmp0_);
+ _tmp1_ = self->priv->test;
+ _tmp2_ = ((MapTests*) _tmp1_)->test_map;
+ _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_BIDIR_SORTED_MAP) ? ((GeeBidirSortedMap*) _tmp2_) : NULL);
+ _g_object_unref0 (self->priv->master);
+ self->priv->master = _tmp3_;
+ _tmp4_ = self->priv->type;
+ switch (_tmp4_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ GeeBidirSortedMap* _tmp5_;
+ GeeSortedMap* _tmp6_ = NULL;
+ _tmp5_ = self->priv->master;
+ _tmp6_ = gee_sorted_map_head_map ((GeeSortedMap*) _tmp5_, "one");
+ _g_object_unref0 (self->priv->submap);
+ self->priv->submap = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, GEE_TYPE_BIDIR_SORTED_MAP) ? ((GeeBidirSortedMap*) _tmp6_) : NULL;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ GeeBidirSortedMap* _tmp7_;
+ GeeSortedMap* _tmp8_ = NULL;
+ _tmp7_ = self->priv->master;
+ _tmp8_ = gee_sorted_map_tail_map ((GeeSortedMap*) _tmp7_, "six");
+ _g_object_unref0 (self->priv->submap);
+ self->priv->submap = G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, GEE_TYPE_BIDIR_SORTED_MAP) ? ((GeeBidirSortedMap*) _tmp8_) : NULL;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ GeeBidirSortedMap* _tmp9_;
+ GeeSortedMap* _tmp10_ = NULL;
+ _tmp9_ = self->priv->master;
+ _tmp10_ = gee_sorted_map_sub_map ((GeeSortedMap*) _tmp9_, "four", "three");
+ _g_object_unref0 (self->priv->submap);
+ self->priv->submap = G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, GEE_TYPE_BIDIR_SORTED_MAP) ? ((GeeBidirSortedMap*) _tmp10_) : NULL;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ GeeBidirSortedMap* _tmp11_;
+ GeeSortedMap* _tmp12_ = NULL;
+ _tmp11_ = self->priv->master;
+ _tmp12_ = gee_sorted_map_sub_map ((GeeSortedMap*) _tmp11_, "three", "four");
+ _g_object_unref0 (self->priv->submap);
+ self->priv->submap = G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, GEE_TYPE_BIDIR_SORTED_MAP) ? ((GeeBidirSortedMap*) _tmp12_) : NULL;
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+}
+
+
+static void bidir_sorted_map_tests_bidir_sub_map_tests_real_tear_down (GeeTestCase* base) {
+ BidirSortedMapTestsBidirSubMapTests * self;
+ BidirSortedMapTests* _tmp0_;
+ self = (BidirSortedMapTestsBidirSubMapTests*) base;
+ _tmp0_ = self->priv->test;
+ gee_test_case_tear_down ((GeeTestCase*) _tmp0_);
+}
+
+
+void bidir_sorted_map_tests_bidir_sub_map_tests_set_default_values (BidirSortedMapTestsBidirSubMapTests* self, gchar*** contains, int* contains_length1, gchar*** not_contains, int* not_contains_length1) {
+ gchar** _vala_contains = NULL;
+ int _vala_contains_length1 = 0;
+ gchar** _vala_not_contains = NULL;
+ int _vala_not_contains_length1 = 0;
+ GeeBidirSortedMap* _tmp0_;
+ GeeBidirSortedMap* _tmp1_;
+ GeeBidirSortedMap* _tmp2_;
+ GeeBidirSortedMap* _tmp3_;
+ GeeBidirSortedMap* _tmp4_;
+ GeeBidirSortedMap* _tmp5_;
+ GeeSortedMapTestsSubMapTestsType _tmp6_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp0_, "one", "one");
+ _tmp1_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp1_, "two", "two");
+ _tmp2_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp2_, "three", "three");
+ _tmp3_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp3_, "four", "four");
+ _tmp4_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp4_, "five", "five");
+ _tmp5_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp5_, "six", "six");
+ _tmp6_ = self->priv->type;
+ switch (_tmp6_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ gchar* _tmp7_;
+ gchar* _tmp8_;
+ gchar** _tmp9_ = NULL;
+ gchar* _tmp10_;
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar** _tmp14_ = NULL;
+ _tmp7_ = g_strdup ("five");
+ _tmp8_ = g_strdup ("four");
+ _tmp9_ = g_new0 (gchar*, 2 + 1);
+ _tmp9_[0] = _tmp7_;
+ _tmp9_[1] = _tmp8_;
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_contains = _tmp9_;
+ _vala_contains_length1 = 2;
+ _tmp10_ = g_strdup ("one");
+ _tmp11_ = g_strdup ("two");
+ _tmp12_ = g_strdup ("three");
+ _tmp13_ = g_strdup ("six");
+ _tmp14_ = g_new0 (gchar*, 4 + 1);
+ _tmp14_[0] = _tmp10_;
+ _tmp14_[1] = _tmp11_;
+ _tmp14_[2] = _tmp12_;
+ _tmp14_[3] = _tmp13_;
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_not_contains = _tmp14_;
+ _vala_not_contains_length1 = 4;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ gchar* _tmp15_;
+ gchar* _tmp16_;
+ gchar* _tmp17_;
+ gchar** _tmp18_ = NULL;
+ gchar* _tmp19_;
+ gchar* _tmp20_;
+ gchar* _tmp21_;
+ gchar** _tmp22_ = NULL;
+ _tmp15_ = g_strdup ("six");
+ _tmp16_ = g_strdup ("three");
+ _tmp17_ = g_strdup ("two");
+ _tmp18_ = g_new0 (gchar*, 3 + 1);
+ _tmp18_[0] = _tmp15_;
+ _tmp18_[1] = _tmp16_;
+ _tmp18_[2] = _tmp17_;
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_contains = _tmp18_;
+ _vala_contains_length1 = 3;
+ _tmp19_ = g_strdup ("one");
+ _tmp20_ = g_strdup ("four");
+ _tmp21_ = g_strdup ("five");
+ _tmp22_ = g_new0 (gchar*, 3 + 1);
+ _tmp22_[0] = _tmp19_;
+ _tmp22_[1] = _tmp20_;
+ _tmp22_[2] = _tmp21_;
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_not_contains = _tmp22_;
+ _vala_not_contains_length1 = 3;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ gchar* _tmp23_;
+ gchar* _tmp24_;
+ gchar* _tmp25_;
+ gchar** _tmp26_ = NULL;
+ gchar* _tmp27_;
+ gchar* _tmp28_;
+ gchar* _tmp29_;
+ gchar** _tmp30_ = NULL;
+ _tmp23_ = g_strdup ("four");
+ _tmp24_ = g_strdup ("one");
+ _tmp25_ = g_strdup ("six");
+ _tmp26_ = g_new0 (gchar*, 3 + 1);
+ _tmp26_[0] = _tmp23_;
+ _tmp26_[1] = _tmp24_;
+ _tmp26_[2] = _tmp25_;
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_contains = _tmp26_;
+ _vala_contains_length1 = 3;
+ _tmp27_ = g_strdup ("two");
+ _tmp28_ = g_strdup ("three");
+ _tmp29_ = g_strdup ("five");
+ _tmp30_ = g_new0 (gchar*, 3 + 1);
+ _tmp30_[0] = _tmp27_;
+ _tmp30_[1] = _tmp28_;
+ _tmp30_[2] = _tmp29_;
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_not_contains = _tmp30_;
+ _vala_not_contains_length1 = 3;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ gchar** _tmp31_ = NULL;
+ gchar* _tmp32_;
+ gchar* _tmp33_;
+ gchar* _tmp34_;
+ gchar* _tmp35_;
+ gchar* _tmp36_;
+ gchar* _tmp37_;
+ gchar** _tmp38_ = NULL;
+ _tmp31_ = g_new0 (gchar*, 0 + 1);
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_contains = _tmp31_;
+ _vala_contains_length1 = 0;
+ _tmp32_ = g_strdup ("one");
+ _tmp33_ = g_strdup ("two");
+ _tmp34_ = g_strdup ("three");
+ _tmp35_ = g_strdup ("four");
+ _tmp36_ = g_strdup ("five");
+ _tmp37_ = g_strdup ("six");
+ _tmp38_ = g_new0 (gchar*, 6 + 1);
+ _tmp38_[0] = _tmp32_;
+ _tmp38_[1] = _tmp33_;
+ _tmp38_[2] = _tmp34_;
+ _tmp38_[3] = _tmp35_;
+ _tmp38_[4] = _tmp36_;
+ _tmp38_[5] = _tmp37_;
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_not_contains = _tmp38_;
+ _vala_not_contains_length1 = 6;
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ if (contains) {
+ *contains = _vala_contains;
+ } else {
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ }
+ if (contains_length1) {
+ *contains_length1 = _vala_contains_length1;
+ }
+ if (not_contains) {
+ *not_contains = _vala_not_contains;
+ } else {
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ }
+ if (not_contains_length1) {
+ *not_contains_length1 = _vala_not_contains_length1;
+ }
+}
+
+
+void bidir_sorted_map_tests_bidir_sub_map_tests_test_bidir_iterators (BidirSortedMapTestsBidirSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ GeeBidirSortedMap* _tmp0_;
+ GeeBidirMapIterator* _tmp1_ = NULL;
+ GeeBidirMapIterator* _map_iter;
+ GeeBidirMapIterator* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeBidirMapIterator* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeBidirMapIterator* _tmp6_;
+ gboolean _tmp7_ = FALSE;
+ GeeBidirMapIterator* _tmp8_;
+ gboolean _tmp9_ = FALSE;
+ gchar** _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ gchar** _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ gint i;
+ GeeBidirSortedMap* _tmp14_;
+ GeeBidirMapIterator* _tmp15_ = NULL;
+ gint _tmp31_;
+ gchar** _tmp32_;
+ gint _tmp32__length1;
+ gint _tmp47_;
+ gchar** _tmp48_;
+ gint _tmp48__length1;
+ gint _tmp67_;
+ gchar** _tmp68_;
+ gint _tmp68__length1;
+ GeeBidirSortedMap* _tmp69_;
+ GeeSortedSet* _tmp70_;
+ GeeSortedSet* _tmp71_;
+ GeeBidirSortedSet* _tmp72_;
+ GeeBidirIterator* _tmp73_ = NULL;
+ GeeBidirIterator* _tmp74_;
+ GeeBidirIterator* keys_iter;
+ GeeBidirSortedMap* _tmp75_;
+ GeeSortedSet* _tmp76_;
+ GeeSortedSet* _tmp77_;
+ GeeBidirSortedSet* _tmp78_;
+ GeeBidirIterator* _tmp79_ = NULL;
+ GeeBidirIterator* _tmp80_;
+ GeeBidirIterator* entries_iter;
+ GeeBidirSortedMap* _tmp81_;
+ GeeBidirMapIterator* _tmp82_ = NULL;
+ GeeBidirMapIterator* map_iter;
+ GeeSortedMapTestsSubMapTestsType _tmp83_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_bidir_sorted_map_bidir_map_iterator (_tmp0_);
+ _map_iter = _tmp1_;
+ _tmp2_ = _map_iter;
+ _tmp3_ = gee_map_iterator_has_next ((GeeMapIterator*) _tmp2_);
+ _vala_assert (!_tmp3_, "!_map_iter.has_next ()");
+ _tmp4_ = _map_iter;
+ _tmp5_ = gee_map_iterator_next ((GeeMapIterator*) _tmp4_);
+ _vala_assert (!_tmp5_, "!_map_iter.next ()");
+ _tmp6_ = _map_iter;
+ _tmp7_ = gee_bidir_map_iterator_has_previous (_tmp6_);
+ _vala_assert (!_tmp7_, "!_map_iter.has_previous ()");
+ _tmp8_ = _map_iter;
+ _tmp9_ = gee_bidir_map_iterator_previous (_tmp8_);
+ _vala_assert (!_tmp9_, "!_map_iter.previous ()");
+ bidir_sorted_map_tests_bidir_sub_map_tests_set_default_values (self, &_tmp10_, &_tmp11_, &_tmp12_, &_tmp13_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp10_;
+ contains_length1 = _tmp11_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp12_;
+ not_contains_length1 = _tmp13_;
+ _not_contains_size_ = not_contains_length1;
+ i = 0;
+ _tmp14_ = self->priv->submap;
+ _tmp15_ = gee_bidir_sorted_map_bidir_map_iterator (_tmp14_);
+ _g_object_unref0 (_map_iter);
+ _map_iter = _tmp15_;
+ while (TRUE) {
+ GeeBidirMapIterator* _tmp16_;
+ gboolean _tmp17_ = FALSE;
+ GeeBidirMapIterator* _tmp18_;
+ gpointer _tmp19_ = NULL;
+ gchar* _tmp20_;
+ gchar** _tmp21_;
+ gint _tmp21__length1;
+ gint _tmp22_;
+ const gchar* _tmp23_;
+ GeeBidirMapIterator* _tmp24_;
+ gpointer _tmp25_ = NULL;
+ gchar* _tmp26_;
+ gchar** _tmp27_;
+ gint _tmp27__length1;
+ gint _tmp28_;
+ const gchar* _tmp29_;
+ gint _tmp30_;
+ _tmp16_ = _map_iter;
+ _tmp17_ = gee_map_iterator_next ((GeeMapIterator*) _tmp16_);
+ if (!_tmp17_) {
+ break;
+ }
+ _tmp18_ = _map_iter;
+ _tmp19_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp18_);
+ _tmp20_ = (gchar*) _tmp19_;
+ _tmp21_ = contains;
+ _tmp21__length1 = contains_length1;
+ _tmp22_ = i;
+ _tmp23_ = _tmp21_[_tmp22_];
+ _vala_assert (g_strcmp0 (_tmp20_, _tmp23_) == 0, "_map_iter.get_key () == contains[i]");
+ _g_free0 (_tmp20_);
+ _tmp24_ = _map_iter;
+ _tmp25_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp24_);
+ _tmp26_ = (gchar*) _tmp25_;
+ _tmp27_ = contains;
+ _tmp27__length1 = contains_length1;
+ _tmp28_ = i;
+ _tmp29_ = _tmp27_[_tmp28_];
+ _vala_assert (g_strcmp0 (_tmp26_, _tmp29_) == 0, "_map_iter.get_value () == contains[i]");
+ _g_free0 (_tmp26_);
+ _tmp30_ = i;
+ i = _tmp30_ + 1;
+ }
+ _tmp31_ = i;
+ _tmp32_ = contains;
+ _tmp32__length1 = contains_length1;
+ _vala_assert (_tmp31_ == _tmp32__length1, "i == contains.length");
+ i = 0;
+ {
+ GeeBidirSortedMap* _tmp33_;
+ GeeSet* _tmp34_;
+ GeeSet* _tmp35_;
+ GeeSet* _tmp36_;
+ GeeIterator* _tmp37_ = NULL;
+ GeeIterator* _tmp38_;
+ GeeIterator* _k_it;
+ _tmp33_ = self->priv->submap;
+ _tmp34_ = gee_map_get_keys ((GeeMap*) _tmp33_);
+ _tmp35_ = _tmp34_;
+ _tmp36_ = _tmp35_;
+ _tmp37_ = gee_iterable_iterator ((GeeIterable*) _tmp36_);
+ _tmp38_ = _tmp37_;
+ _g_object_unref0 (_tmp36_);
+ _k_it = _tmp38_;
+ while (TRUE) {
+ GeeIterator* _tmp39_;
+ gboolean _tmp40_ = FALSE;
+ GeeIterator* _tmp41_;
+ gpointer _tmp42_ = NULL;
+ gchar* k;
+ const gchar* _tmp43_;
+ gchar** _tmp44_;
+ gint _tmp44__length1;
+ gint _tmp45_;
+ const gchar* _tmp46_;
+ _tmp39_ = _k_it;
+ _tmp40_ = gee_iterator_next (_tmp39_);
+ if (!_tmp40_) {
+ break;
+ }
+ _tmp41_ = _k_it;
+ _tmp42_ = gee_iterator_get (_tmp41_);
+ k = (gchar*) _tmp42_;
+ _tmp43_ = k;
+ _tmp44_ = contains;
+ _tmp44__length1 = contains_length1;
+ _tmp45_ = i;
+ i = _tmp45_ + 1;
+ _tmp46_ = _tmp44_[_tmp45_];
+ _vala_assert (g_strcmp0 (_tmp43_, _tmp46_) == 0, "k == contains[i++]");
+ _g_free0 (k);
+ }
+ _g_object_unref0 (_k_it);
+ }
+ _tmp47_ = i;
+ _tmp48_ = contains;
+ _tmp48__length1 = contains_length1;
+ _vala_assert (_tmp47_ == _tmp48__length1, "i == contains.length");
+ i = 0;
+ {
+ GeeBidirSortedMap* _tmp49_;
+ GeeSet* _tmp50_;
+ GeeSet* _tmp51_;
+ GeeSet* _tmp52_;
+ GeeIterator* _tmp53_ = NULL;
+ GeeIterator* _tmp54_;
+ GeeIterator* _e_it;
+ _tmp49_ = self->priv->submap;
+ _tmp50_ = gee_map_get_entries ((GeeMap*) _tmp49_);
+ _tmp51_ = _tmp50_;
+ _tmp52_ = _tmp51_;
+ _tmp53_ = gee_iterable_iterator ((GeeIterable*) _tmp52_);
+ _tmp54_ = _tmp53_;
+ _g_object_unref0 (_tmp52_);
+ _e_it = _tmp54_;
+ while (TRUE) {
+ GeeIterator* _tmp55_;
+ gboolean _tmp56_ = FALSE;
+ GeeIterator* _tmp57_;
+ gpointer _tmp58_ = NULL;
+ GeeMapEntry* e;
+ GeeMapEntry* _tmp59_;
+ gchar** _tmp60_;
+ gint _tmp60__length1;
+ gint _tmp61_;
+ const gchar* _tmp62_;
+ gchar** _tmp63_;
+ gint _tmp63__length1;
+ gint _tmp64_;
+ const gchar* _tmp65_;
+ gint _tmp66_;
+ _tmp55_ = _e_it;
+ _tmp56_ = gee_iterator_next (_tmp55_);
+ if (!_tmp56_) {
+ break;
+ }
+ _tmp57_ = _e_it;
+ _tmp58_ = gee_iterator_get (_tmp57_);
+ e = (GeeMapEntry*) _tmp58_;
+ _tmp59_ = e;
+ _tmp60_ = contains;
+ _tmp60__length1 = contains_length1;
+ _tmp61_ = i;
+ _tmp62_ = _tmp60_[_tmp61_];
+ _tmp63_ = contains;
+ _tmp63__length1 = contains_length1;
+ _tmp64_ = i;
+ _tmp65_ = _tmp63_[_tmp64_];
+ map_tests_assert_entry (_tmp59_, _tmp62_, _tmp65_);
+ _tmp66_ = i;
+ i = _tmp66_ + 1;
+ _g_object_unref0 (e);
+ }
+ _g_object_unref0 (_e_it);
+ }
+ _tmp67_ = i;
+ _tmp68_ = contains;
+ _tmp68__length1 = contains_length1;
+ _vala_assert (_tmp67_ == _tmp68__length1, "i == contains.length");
+ _tmp69_ = self->priv->submap;
+ _tmp70_ = gee_sorted_map_get_ascending_keys ((GeeSortedMap*) _tmp69_);
+ _tmp71_ = _tmp70_;
+ _tmp72_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp71_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp71_) : NULL;
+ _tmp73_ = gee_bidir_sorted_set_bidir_iterator (_tmp72_);
+ _tmp74_ = _tmp73_;
+ _g_object_unref0 (_tmp72_);
+ keys_iter = _tmp74_;
+ _tmp75_ = self->priv->submap;
+ _tmp76_ = gee_sorted_map_get_ascending_entries ((GeeSortedMap*) _tmp75_);
+ _tmp77_ = _tmp76_;
+ _tmp78_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp77_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp77_) : NULL;
+ _tmp79_ = gee_bidir_sorted_set_bidir_iterator (_tmp78_);
+ _tmp80_ = _tmp79_;
+ _g_object_unref0 (_tmp78_);
+ entries_iter = _tmp80_;
+ _tmp81_ = self->priv->submap;
+ _tmp82_ = gee_bidir_sorted_map_bidir_map_iterator (_tmp81_);
+ map_iter = _tmp82_;
+ _tmp83_ = self->priv->type;
+ if (_tmp83_ != GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY) {
+ GeeBidirMapIterator* _tmp84_;
+ gboolean _tmp85_ = FALSE;
+ GeeBidirMapIterator* _tmp86_;
+ gpointer _tmp87_ = NULL;
+ gchar* _tmp88_;
+ gchar** _tmp89_;
+ gint _tmp89__length1;
+ gchar** _tmp90_;
+ gint _tmp90__length1;
+ const gchar* _tmp91_;
+ GeeBidirMapIterator* _tmp92_;
+ gpointer _tmp93_ = NULL;
+ gchar* _tmp94_;
+ gchar** _tmp95_;
+ gint _tmp95__length1;
+ gchar** _tmp96_;
+ gint _tmp96__length1;
+ const gchar* _tmp97_;
+ GeeBidirSortedMap* _tmp98_;
+ GeeBidirMapIterator* _tmp99_ = NULL;
+ GeeBidirMapIterator* _tmp100_;
+ gboolean _tmp101_ = FALSE;
+ GeeBidirMapIterator* _tmp102_;
+ gpointer _tmp103_ = NULL;
+ gchar* _tmp104_;
+ gchar** _tmp105_;
+ gint _tmp105__length1;
+ const gchar* _tmp106_;
+ GeeBidirMapIterator* _tmp107_;
+ gpointer _tmp108_ = NULL;
+ gchar* _tmp109_;
+ gchar** _tmp110_;
+ gint _tmp110__length1;
+ const gchar* _tmp111_;
+ GeeBidirMapIterator* _tmp112_;
+ gboolean _tmp113_ = FALSE;
+ GeeBidirMapIterator* _tmp114_;
+ gboolean _tmp115_ = FALSE;
+ GeeBidirMapIterator* _tmp116_;
+ gpointer _tmp117_ = NULL;
+ gchar* _tmp118_;
+ gchar** _tmp119_;
+ gint _tmp119__length1;
+ const gchar* _tmp120_;
+ GeeBidirMapIterator* _tmp121_;
+ gpointer _tmp122_ = NULL;
+ gchar* _tmp123_;
+ gchar** _tmp124_;
+ gint _tmp124__length1;
+ const gchar* _tmp125_;
+ GeeBidirMapIterator* _tmp126_;
+ gboolean _tmp127_ = FALSE;
+ GeeBidirMapIterator* _tmp128_;
+ GeeBidirMapIterator* _tmp129_;
+ gboolean _tmp130_ = FALSE;
+ GeeSortedMapTestsSubMapTestsType _tmp131_;
+ GeeBidirMapIterator* _tmp136_;
+ gboolean _tmp137_ = FALSE;
+ GeeBidirMapIterator* _tmp138_;
+ gpointer _tmp139_ = NULL;
+ gchar* _tmp140_;
+ gchar** _tmp141_;
+ gint _tmp141__length1;
+ const gchar* _tmp142_;
+ GeeBidirMapIterator* _tmp143_;
+ gpointer _tmp144_ = NULL;
+ gchar* _tmp145_;
+ gchar** _tmp146_;
+ gint _tmp146__length1;
+ const gchar* _tmp147_;
+ GeeBidirSortedMap* _tmp148_;
+ gchar** _tmp149_ = NULL;
+ gint _tmp150_ = 0;
+ gchar** _tmp151_ = NULL;
+ gint _tmp152_ = 0;
+ GeeBidirIterator* _tmp153_;
+ gboolean _tmp154_ = FALSE;
+ GeeBidirIterator* _tmp155_;
+ gpointer _tmp156_ = NULL;
+ gchar* _tmp157_;
+ gchar** _tmp158_;
+ gint _tmp158__length1;
+ gchar** _tmp159_;
+ gint _tmp159__length1;
+ const gchar* _tmp160_;
+ GeeBidirIterator* _tmp161_;
+ gboolean _tmp162_ = FALSE;
+ GeeBidirIterator* _tmp163_;
+ gpointer _tmp164_ = NULL;
+ gchar* _tmp165_;
+ gchar** _tmp166_;
+ gint _tmp166__length1;
+ const gchar* _tmp167_;
+ GeeBidirIterator* _tmp168_;
+ gboolean _tmp169_ = FALSE;
+ GeeBidirIterator* _tmp170_;
+ gboolean _tmp171_ = FALSE;
+ GeeBidirIterator* _tmp172_;
+ gpointer _tmp173_ = NULL;
+ gchar* _tmp174_;
+ gchar** _tmp175_;
+ gint _tmp175__length1;
+ const gchar* _tmp176_;
+ GeeBidirIterator* _tmp177_;
+ gboolean _tmp178_ = FALSE;
+ gboolean _tmp179_ = FALSE;
+ GeeBidirIterator* _tmp181_;
+ gboolean _tmp182_ = FALSE;
+ GeeSortedMapTestsSubMapTestsType _tmp183_;
+ GeeBidirIterator* _tmp188_;
+ gboolean _tmp189_ = FALSE;
+ GeeBidirIterator* _tmp190_;
+ gpointer _tmp191_ = NULL;
+ gchar* _tmp192_;
+ gchar** _tmp193_;
+ gint _tmp193__length1;
+ const gchar* _tmp194_;
+ GeeBidirSortedMap* _tmp195_;
+ gchar** _tmp196_ = NULL;
+ gint _tmp197_ = 0;
+ gchar** _tmp198_ = NULL;
+ gint _tmp199_ = 0;
+ GeeBidirIterator* _tmp200_;
+ gboolean _tmp201_ = FALSE;
+ GeeBidirIterator* _tmp202_;
+ gpointer _tmp203_ = NULL;
+ GeeMapEntry* _tmp204_;
+ gchar** _tmp205_;
+ gint _tmp205__length1;
+ gchar** _tmp206_;
+ gint _tmp206__length1;
+ const gchar* _tmp207_;
+ gchar** _tmp208_;
+ gint _tmp208__length1;
+ gchar** _tmp209_;
+ gint _tmp209__length1;
+ const gchar* _tmp210_;
+ GeeBidirIterator* _tmp211_;
+ gboolean _tmp212_ = FALSE;
+ GeeBidirIterator* _tmp213_;
+ gpointer _tmp214_ = NULL;
+ GeeMapEntry* _tmp215_;
+ gchar** _tmp216_;
+ gint _tmp216__length1;
+ const gchar* _tmp217_;
+ gchar** _tmp218_;
+ gint _tmp218__length1;
+ const gchar* _tmp219_;
+ GeeBidirIterator* _tmp220_;
+ gboolean _tmp221_ = FALSE;
+ GeeBidirIterator* _tmp222_;
+ gboolean _tmp223_ = FALSE;
+ GeeBidirIterator* _tmp224_;
+ gpointer _tmp225_ = NULL;
+ GeeMapEntry* _tmp226_;
+ gchar** _tmp227_;
+ gint _tmp227__length1;
+ const gchar* _tmp228_;
+ gchar** _tmp229_;
+ gint _tmp229__length1;
+ const gchar* _tmp230_;
+ GeeBidirIterator* _tmp231_;
+ gboolean _tmp232_ = FALSE;
+ GeeBidirIterator* _tmp233_;
+ GeeBidirIterator* _tmp234_;
+ gboolean _tmp235_ = FALSE;
+ GeeSortedMapTestsSubMapTestsType _tmp236_;
+ GeeBidirIterator* _tmp241_;
+ gboolean _tmp242_ = FALSE;
+ GeeBidirIterator* _tmp243_;
+ gpointer _tmp244_ = NULL;
+ GeeMapEntry* _tmp245_;
+ gchar** _tmp246_;
+ gint _tmp246__length1;
+ const gchar* _tmp247_;
+ gchar** _tmp248_;
+ gint _tmp248__length1;
+ const gchar* _tmp249_;
+ _tmp84_ = map_iter;
+ _tmp85_ = gee_bidir_map_iterator_last (_tmp84_);
+ _vala_assert (_tmp85_, "map_iter.last ()");
+ _tmp86_ = map_iter;
+ _tmp87_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp86_);
+ _tmp88_ = (gchar*) _tmp87_;
+ _tmp89_ = contains;
+ _tmp89__length1 = contains_length1;
+ _tmp90_ = contains;
+ _tmp90__length1 = contains_length1;
+ _tmp91_ = _tmp89_[_tmp90__length1 - 1];
+ _vala_assert (g_strcmp0 (_tmp88_, _tmp91_) == 0, "map_iter.get_key () == contains[contains.length - 1]");
+ _g_free0 (_tmp88_);
+ _tmp92_ = map_iter;
+ _tmp93_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp92_);
+ _tmp94_ = (gchar*) _tmp93_;
+ _tmp95_ = contains;
+ _tmp95__length1 = contains_length1;
+ _tmp96_ = contains;
+ _tmp96__length1 = contains_length1;
+ _tmp97_ = _tmp95_[_tmp96__length1 - 1];
+ _vala_assert (g_strcmp0 (_tmp94_, _tmp97_) == 0, "map_iter.get_value () == contains[contains.length - 1]");
+ _g_free0 (_tmp94_);
+ _tmp98_ = self->priv->submap;
+ _tmp99_ = gee_bidir_sorted_map_bidir_map_iterator (_tmp98_);
+ _g_object_unref0 (map_iter);
+ map_iter = _tmp99_;
+ _tmp100_ = map_iter;
+ _tmp101_ = gee_map_iterator_next ((GeeMapIterator*) _tmp100_);
+ _vala_assert (_tmp101_, "map_iter.next ()");
+ _tmp102_ = map_iter;
+ _tmp103_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp102_);
+ _tmp104_ = (gchar*) _tmp103_;
+ _tmp105_ = contains;
+ _tmp105__length1 = contains_length1;
+ _tmp106_ = _tmp105_[0];
+ _vala_assert (g_strcmp0 (_tmp104_, _tmp106_) == 0, "map_iter.get_key () == contains[0]");
+ _g_free0 (_tmp104_);
+ _tmp107_ = map_iter;
+ _tmp108_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp107_);
+ _tmp109_ = (gchar*) _tmp108_;
+ _tmp110_ = contains;
+ _tmp110__length1 = contains_length1;
+ _tmp111_ = _tmp110_[0];
+ _vala_assert (g_strcmp0 (_tmp109_, _tmp111_) == 0, "map_iter.get_value () == contains[0]");
+ _g_free0 (_tmp109_);
+ _tmp112_ = map_iter;
+ _tmp113_ = gee_map_iterator_has_next ((GeeMapIterator*) _tmp112_);
+ _vala_assert (_tmp113_, "map_iter.has_next ()");
+ _tmp114_ = map_iter;
+ _tmp115_ = gee_map_iterator_next ((GeeMapIterator*) _tmp114_);
+ _vala_assert (_tmp115_, "map_iter.next ()");
+ _tmp116_ = map_iter;
+ _tmp117_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp116_);
+ _tmp118_ = (gchar*) _tmp117_;
+ _tmp119_ = contains;
+ _tmp119__length1 = contains_length1;
+ _tmp120_ = _tmp119_[1];
+ _vala_assert (g_strcmp0 (_tmp118_, _tmp120_) == 0, "map_iter.get_key () == contains[1]");
+ _g_free0 (_tmp118_);
+ _tmp121_ = map_iter;
+ _tmp122_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp121_);
+ _tmp123_ = (gchar*) _tmp122_;
+ _tmp124_ = contains;
+ _tmp124__length1 = contains_length1;
+ _tmp125_ = _tmp124_[1];
+ _vala_assert (g_strcmp0 (_tmp123_, _tmp125_) == 0, "map_iter.get_value () == contains[1]");
+ _g_free0 (_tmp123_);
+ _tmp126_ = map_iter;
+ _tmp127_ = gee_bidir_map_iterator_has_previous (_tmp126_);
+ _vala_assert (_tmp127_, "map_iter.has_previous ()");
+ _tmp128_ = map_iter;
+ gee_map_iterator_unset ((GeeMapIterator*) _tmp128_);
+ _tmp129_ = map_iter;
+ _tmp130_ = gee_bidir_map_iterator_has_previous (_tmp129_);
+ _vala_assert (_tmp130_, "map_iter.has_previous ()");
+ _tmp131_ = self->priv->type;
+ if (_tmp131_ != GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD) {
+ GeeBidirMapIterator* _tmp132_;
+ gboolean _tmp133_ = FALSE;
+ _tmp132_ = map_iter;
+ _tmp133_ = gee_map_iterator_has_next ((GeeMapIterator*) _tmp132_);
+ _vala_assert (_tmp133_, "map_iter.has_next ()");
+ } else {
+ GeeBidirMapIterator* _tmp134_;
+ gboolean _tmp135_ = FALSE;
+ _tmp134_ = map_iter;
+ _tmp135_ = gee_map_iterator_has_next ((GeeMapIterator*) _tmp134_);
+ _vala_assert (!_tmp135_, "!map_iter.has_next ()");
+ }
+ _tmp136_ = map_iter;
+ _tmp137_ = gee_bidir_map_iterator_previous (_tmp136_);
+ _vala_assert (_tmp137_, "map_iter.previous ()");
+ _tmp138_ = map_iter;
+ _tmp139_ = gee_map_iterator_get_key ((GeeMapIterator*) _tmp138_);
+ _tmp140_ = (gchar*) _tmp139_;
+ _tmp141_ = contains;
+ _tmp141__length1 = contains_length1;
+ _tmp142_ = _tmp141_[0];
+ _vala_assert (g_strcmp0 (_tmp140_, _tmp142_) == 0, "map_iter.get_key () == contains[0]");
+ _g_free0 (_tmp140_);
+ _tmp143_ = map_iter;
+ _tmp144_ = gee_map_iterator_get_value ((GeeMapIterator*) _tmp143_);
+ _tmp145_ = (gchar*) _tmp144_;
+ _tmp146_ = contains;
+ _tmp146__length1 = contains_length1;
+ _tmp147_ = _tmp146_[0];
+ _vala_assert (g_strcmp0 (_tmp145_, _tmp147_) == 0, "map_iter.get_value () == contains[0]");
+ _g_free0 (_tmp145_);
+ _tmp148_ = self->priv->master;
+ gee_map_clear ((GeeMap*) _tmp148_);
+ bidir_sorted_map_tests_bidir_sub_map_tests_set_default_values (self, &_tmp149_, &_tmp150_, &_tmp151_, &_tmp152_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp149_;
+ contains_length1 = _tmp150_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp151_;
+ not_contains_length1 = _tmp152_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp153_ = keys_iter;
+ _tmp154_ = gee_bidir_iterator_last (_tmp153_);
+ _vala_assert (_tmp154_, "keys_iter.last ()");
+ _tmp155_ = keys_iter;
+ _tmp156_ = gee_iterator_get ((GeeIterator*) _tmp155_);
+ _tmp157_ = (gchar*) _tmp156_;
+ _tmp158_ = contains;
+ _tmp158__length1 = contains_length1;
+ _tmp159_ = contains;
+ _tmp159__length1 = contains_length1;
+ _tmp160_ = _tmp158_[_tmp159__length1 - 1];
+ _vala_assert (g_strcmp0 (_tmp157_, _tmp160_) == 0, "keys_iter.get () == contains[contains.length - 1]");
+ _g_free0 (_tmp157_);
+ _tmp161_ = keys_iter;
+ _tmp162_ = gee_bidir_iterator_first (_tmp161_);
+ _vala_assert (_tmp162_, "keys_iter.first ()");
+ _tmp163_ = keys_iter;
+ _tmp164_ = gee_iterator_get ((GeeIterator*) _tmp163_);
+ _tmp165_ = (gchar*) _tmp164_;
+ _tmp166_ = contains;
+ _tmp166__length1 = contains_length1;
+ _tmp167_ = _tmp166_[0];
+ _vala_assert (g_strcmp0 (_tmp165_, _tmp167_) == 0, "keys_iter.get () == contains[0]");
+ _g_free0 (_tmp165_);
+ _tmp168_ = keys_iter;
+ _tmp169_ = gee_iterator_has_next ((GeeIterator*) _tmp168_);
+ _vala_assert (_tmp169_, "keys_iter.has_next ()");
+ _tmp170_ = keys_iter;
+ _tmp171_ = gee_iterator_next ((GeeIterator*) _tmp170_);
+ _vala_assert (_tmp171_, "keys_iter.next ()");
+ _tmp172_ = keys_iter;
+ _tmp173_ = gee_iterator_get ((GeeIterator*) _tmp172_);
+ _tmp174_ = (gchar*) _tmp173_;
+ _tmp175_ = contains;
+ _tmp175__length1 = contains_length1;
+ _tmp176_ = _tmp175_[1];
+ _vala_assert (g_strcmp0 (_tmp174_, _tmp176_) == 0, "keys_iter.get () == contains[1]");
+ _g_free0 (_tmp174_);
+ _tmp177_ = keys_iter;
+ _tmp178_ = gee_bidir_iterator_has_previous (_tmp177_);
+ _vala_assert (_tmp178_, "keys_iter.has_previous ()");
+ _tmp179_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp179_) {
+ GeeBidirIterator* _tmp180_;
+ _tmp180_ = keys_iter;
+ gee_iterator_remove ((GeeIterator*) _tmp180_);
+ exit (0);
+ }
+ _tmp181_ = keys_iter;
+ _tmp182_ = gee_bidir_iterator_has_previous (_tmp181_);
+ _vala_assert (_tmp182_, "keys_iter.has_previous ()");
+ _tmp183_ = self->priv->type;
+ if (_tmp183_ != GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD) {
+ GeeBidirIterator* _tmp184_;
+ gboolean _tmp185_ = FALSE;
+ _tmp184_ = keys_iter;
+ _tmp185_ = gee_iterator_has_next ((GeeIterator*) _tmp184_);
+ _vala_assert (_tmp185_, "keys_iter.has_next ()");
+ } else {
+ GeeBidirIterator* _tmp186_;
+ gboolean _tmp187_ = FALSE;
+ _tmp186_ = keys_iter;
+ _tmp187_ = gee_iterator_has_next ((GeeIterator*) _tmp186_);
+ _vala_assert (!_tmp187_, "!keys_iter.has_next ()");
+ }
+ _tmp188_ = keys_iter;
+ _tmp189_ = gee_bidir_iterator_previous (_tmp188_);
+ _vala_assert (_tmp189_, "keys_iter.previous ()");
+ _tmp190_ = keys_iter;
+ _tmp191_ = gee_iterator_get ((GeeIterator*) _tmp190_);
+ _tmp192_ = (gchar*) _tmp191_;
+ _tmp193_ = contains;
+ _tmp193__length1 = contains_length1;
+ _tmp194_ = _tmp193_[0];
+ _vala_assert (g_strcmp0 (_tmp192_, _tmp194_) == 0, "keys_iter.get () == contains[0]");
+ _g_free0 (_tmp192_);
+ _tmp195_ = self->priv->master;
+ gee_map_clear ((GeeMap*) _tmp195_);
+ bidir_sorted_map_tests_bidir_sub_map_tests_set_default_values (self, &_tmp196_, &_tmp197_, &_tmp198_, &_tmp199_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp196_;
+ contains_length1 = _tmp197_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp198_;
+ not_contains_length1 = _tmp199_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp200_ = entries_iter;
+ _tmp201_ = gee_bidir_iterator_last (_tmp200_);
+ _vala_assert (_tmp201_, "entries_iter.last ()");
+ _tmp202_ = entries_iter;
+ _tmp203_ = gee_iterator_get ((GeeIterator*) _tmp202_);
+ _tmp204_ = (GeeMapEntry*) _tmp203_;
+ _tmp205_ = contains;
+ _tmp205__length1 = contains_length1;
+ _tmp206_ = contains;
+ _tmp206__length1 = contains_length1;
+ _tmp207_ = _tmp205_[_tmp206__length1 - 1];
+ _tmp208_ = contains;
+ _tmp208__length1 = contains_length1;
+ _tmp209_ = contains;
+ _tmp209__length1 = contains_length1;
+ _tmp210_ = _tmp208_[_tmp209__length1 - 1];
+ map_tests_assert_entry (_tmp204_, _tmp207_, _tmp210_);
+ _g_object_unref0 (_tmp204_);
+ _tmp211_ = entries_iter;
+ _tmp212_ = gee_bidir_iterator_first (_tmp211_);
+ _vala_assert (_tmp212_, "entries_iter.first ()");
+ _tmp213_ = entries_iter;
+ _tmp214_ = gee_iterator_get ((GeeIterator*) _tmp213_);
+ _tmp215_ = (GeeMapEntry*) _tmp214_;
+ _tmp216_ = contains;
+ _tmp216__length1 = contains_length1;
+ _tmp217_ = _tmp216_[0];
+ _tmp218_ = contains;
+ _tmp218__length1 = contains_length1;
+ _tmp219_ = _tmp218_[0];
+ map_tests_assert_entry (_tmp215_, _tmp217_, _tmp219_);
+ _g_object_unref0 (_tmp215_);
+ _tmp220_ = entries_iter;
+ _tmp221_ = gee_iterator_has_next ((GeeIterator*) _tmp220_);
+ _vala_assert (_tmp221_, "entries_iter.has_next ()");
+ _tmp222_ = entries_iter;
+ _tmp223_ = gee_iterator_next ((GeeIterator*) _tmp222_);
+ _vala_assert (_tmp223_, "entries_iter.next ()");
+ _tmp224_ = entries_iter;
+ _tmp225_ = gee_iterator_get ((GeeIterator*) _tmp224_);
+ _tmp226_ = (GeeMapEntry*) _tmp225_;
+ _tmp227_ = contains;
+ _tmp227__length1 = contains_length1;
+ _tmp228_ = _tmp227_[1];
+ _tmp229_ = contains;
+ _tmp229__length1 = contains_length1;
+ _tmp230_ = _tmp229_[1];
+ map_tests_assert_entry (_tmp226_, _tmp228_, _tmp230_);
+ _g_object_unref0 (_tmp226_);
+ _tmp231_ = entries_iter;
+ _tmp232_ = gee_bidir_iterator_has_previous (_tmp231_);
+ _vala_assert (_tmp232_, "entries_iter.has_previous ()");
+ _tmp233_ = entries_iter;
+ gee_iterator_remove ((GeeIterator*) _tmp233_);
+ _tmp234_ = entries_iter;
+ _tmp235_ = gee_bidir_iterator_has_previous (_tmp234_);
+ _vala_assert (_tmp235_, "entries_iter.has_previous ()");
+ _tmp236_ = self->priv->type;
+ if (_tmp236_ != GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD) {
+ GeeBidirIterator* _tmp237_;
+ gboolean _tmp238_ = FALSE;
+ _tmp237_ = entries_iter;
+ _tmp238_ = gee_iterator_has_next ((GeeIterator*) _tmp237_);
+ _vala_assert (_tmp238_, "entries_iter.has_next ()");
+ } else {
+ GeeBidirIterator* _tmp239_;
+ gboolean _tmp240_ = FALSE;
+ _tmp239_ = entries_iter;
+ _tmp240_ = gee_iterator_has_next ((GeeIterator*) _tmp239_);
+ _vala_assert (!_tmp240_, "!entries_iter.has_next ()");
+ }
+ _tmp241_ = entries_iter;
+ _tmp242_ = gee_bidir_iterator_previous (_tmp241_);
+ _vala_assert (_tmp242_, "entries_iter.previous ()");
+ _tmp243_ = entries_iter;
+ _tmp244_ = gee_iterator_get ((GeeIterator*) _tmp243_);
+ _tmp245_ = (GeeMapEntry*) _tmp244_;
+ _tmp246_ = contains;
+ _tmp246__length1 = contains_length1;
+ _tmp247_ = _tmp246_[0];
+ _tmp248_ = contains;
+ _tmp248__length1 = contains_length1;
+ _tmp249_ = _tmp248_[0];
+ map_tests_assert_entry (_tmp245_, _tmp247_, _tmp249_);
+ _g_object_unref0 (_tmp245_);
+ } else {
+ GeeBidirIterator* _tmp250_;
+ gboolean _tmp251_ = FALSE;
+ GeeBidirIterator* _tmp252_;
+ gboolean _tmp253_ = FALSE;
+ gboolean _tmp254_ = FALSE;
+ GeeBidirIterator* _tmp256_;
+ gboolean _tmp257_ = FALSE;
+ gboolean _tmp258_ = FALSE;
+ _tmp250_ = keys_iter;
+ _tmp251_ = gee_bidir_iterator_first (_tmp250_);
+ _vala_assert (!_tmp251_, "!keys_iter.first ()");
+ _tmp252_ = keys_iter;
+ _tmp253_ = gee_bidir_iterator_last (_tmp252_);
+ _vala_assert (!_tmp253_, "!keys_iter.last ()");
+ _tmp254_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp254_) {
+ GeeBidirIterator* _tmp255_;
+ _tmp255_ = keys_iter;
+ gee_iterator_remove ((GeeIterator*) _tmp255_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp256_ = entries_iter;
+ _tmp257_ = gee_bidir_iterator_first (_tmp256_);
+ _vala_assert (!_tmp257_, "!entries_iter.first ()");
+ _tmp258_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp258_) {
+ GeeBidirIterator* _tmp259_;
+ _tmp259_ = entries_iter;
+ gee_iterator_remove ((GeeIterator*) _tmp259_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ }
+ _g_object_unref0 (map_iter);
+ _g_object_unref0 (entries_iter);
+ _g_object_unref0 (keys_iter);
+ _g_object_unref0 (_map_iter);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+static void bidir_sorted_map_tests_bidir_sub_map_tests_class_init (BidirSortedMapTestsBidirSubMapTestsClass * klass) {
+ bidir_sorted_map_tests_bidir_sub_map_tests_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (BidirSortedMapTestsBidirSubMapTestsPrivate));
+ GEE_TEST_CASE_CLASS (klass)->set_up = bidir_sorted_map_tests_bidir_sub_map_tests_real_set_up;
+ GEE_TEST_CASE_CLASS (klass)->tear_down = bidir_sorted_map_tests_bidir_sub_map_tests_real_tear_down;
+ G_OBJECT_CLASS (klass)->finalize = bidir_sorted_map_tests_bidir_sub_map_tests_finalize;
+}
+
+
+static void bidir_sorted_map_tests_bidir_sub_map_tests_instance_init (BidirSortedMapTestsBidirSubMapTests * self) {
+ self->priv = BIDIR_SORTED_MAP_TESTS_BIDIR_SUB_MAP_TESTS_GET_PRIVATE (self);
+}
+
+
+static void bidir_sorted_map_tests_bidir_sub_map_tests_finalize (GObject* obj) {
+ BidirSortedMapTestsBidirSubMapTests * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIDIR_SORTED_MAP_TESTS_TYPE_BIDIR_SUB_MAP_TESTS, BidirSortedMapTestsBidirSubMapTests);
+ _g_object_unref0 (self->priv->master);
+ _g_object_unref0 (self->priv->submap);
+ _g_object_unref0 (self->priv->test);
+ G_OBJECT_CLASS (bidir_sorted_map_tests_bidir_sub_map_tests_parent_class)->finalize (obj);
+}
+
+
+GType bidir_sorted_map_tests_bidir_sub_map_tests_get_type (void) {
+ static volatile gsize bidir_sorted_map_tests_bidir_sub_map_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&bidir_sorted_map_tests_bidir_sub_map_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (BidirSortedMapTestsBidirSubMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bidir_sorted_map_tests_bidir_sub_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BidirSortedMapTestsBidirSubMapTests), 0, (GInstanceInitFunc) bidir_sorted_map_tests_bidir_sub_map_tests_instance_init, NULL };
+ GType bidir_sorted_map_tests_bidir_sub_map_tests_type_id;
+ bidir_sorted_map_tests_bidir_sub_map_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "BidirSortedMapTestsBidirSubMapTests", &g_define_type_info, 0);
+ g_once_init_leave (&bidir_sorted_map_tests_bidir_sub_map_tests_type_id__volatile, bidir_sorted_map_tests_bidir_sub_map_tests_type_id);
+ }
+ return bidir_sorted_map_tests_bidir_sub_map_tests_type_id__volatile;
+}
+
+
+static void bidir_sorted_map_tests_class_init (BidirSortedMapTestsClass * klass) {
+ bidir_sorted_map_tests_parent_class = g_type_class_peek_parent (klass);
+}
+
+
+static void bidir_sorted_map_tests_instance_init (BidirSortedMapTests * self) {
+}
+
+
+GType bidir_sorted_map_tests_get_type (void) {
+ static volatile gsize bidir_sorted_map_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&bidir_sorted_map_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (BidirSortedMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bidir_sorted_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BidirSortedMapTests), 0, (GInstanceInitFunc) bidir_sorted_map_tests_instance_init, NULL };
+ GType bidir_sorted_map_tests_type_id;
+ bidir_sorted_map_tests_type_id = g_type_register_static (GEE_TYPE_SORTED_MAP_TESTS, "BidirSortedMapTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&bidir_sorted_map_tests_type_id__volatile, bidir_sorted_map_tests_type_id);
+ }
+ return bidir_sorted_map_tests_type_id__volatile;
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/tests/testbidirsortedmap.vala b/tests/testbidirsortedmap.vala
new file mode 100644
index 0000000..385d715
--- /dev/null
+++ b/tests/testbidirsortedmap.vala
@@ -0,0 +1,430 @@
+/* testbidirsortedmap.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+using GLib;
+using Gee;
+
+public abstract class BidirSortedMapTests : SortedMapTests {
+ public BidirSortedMapTests(string name) {
+ base (name);
+ add_test ("[SortedMap] bi-directional iterators can go backward",
+ test_bidir_iterator_can_go_backward);
+ add_test ("[SortedSet] bi-directional iterators can to end",
+ test_bidir_iterator_last);
+ get_suite ().add_suite (new BidirSubMapTests (this, SortedMapTests.SubMapTests.Type.HEAD).get_suite ());
+ get_suite ().add_suite (new BidirSubMapTests (this, SortedMapTests.SubMapTests.Type.TAIL).get_suite ());
+ get_suite ().add_suite (new BidirSubMapTests (this, SortedMapTests.SubMapTests.Type.SUB).get_suite ());
+ get_suite ().add_suite (new BidirSubMapTests (this, SortedMapTests.SubMapTests.Type.EMPTY).get_suite ());
+ }
+
+ public void test_bidir_iterator_can_go_backward () {
+ var test_sorted_map = test_map as BidirSortedMap<string,string>;
+ var keys = (test_sorted_map.ascending_keys) as BidirSortedSet<string>;
+ var entries = (test_sorted_map.ascending_entries) as BidirSortedSet<Map.Entry<string,string>>;
+
+ var keys_iterator = keys.bidir_iterator ();
+ var entries_iterator = entries.bidir_iterator ();
+ var map_iterator = test_sorted_map.bidir_map_iterator ();
+
+ assert (!keys_iterator.has_previous ());
+ assert (!entries_iterator.has_previous ());
+
+ assert (!map_iterator.has_previous ());
+ assert (!keys_iterator.previous ());
+ assert (!entries_iterator.has_previous ());
+
+ assert (!map_iterator.previous ());
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+
+ keys_iterator = keys.bidir_iterator ();
+ entries_iterator = entries.bidir_iterator ();
+ map_iterator = test_sorted_map.bidir_map_iterator ();
+
+ assert (keys_iterator.next ());
+ assert (entries_iterator.next ());
+
+ assert (map_iterator.next ());
+ assert (keys_iterator.get () == "five");
+ assert_entry (entries_iterator.get (), "five", "five");
+
+ assert (map_iterator.get_key () == "five");
+ assert (map_iterator.get_value () == "five");
+
+ assert (!keys_iterator.has_previous ());
+ assert (!entries_iterator.has_previous ());
+
+ assert (!map_iterator.has_previous ());
+ assert (keys_iterator.next ());
+ assert (entries_iterator.next ());
+
+ assert (map_iterator.next ());
+ assert (keys_iterator.get () == "four");
+ assert_entry (entries_iterator.get (), "four", "four");
+
+ assert (map_iterator.get_key () == "four");
+ assert (map_iterator.get_value () == "four");
+
+ assert (keys_iterator.has_previous ());
+ assert (entries_iterator.has_previous ());
+
+ assert (map_iterator.has_previous ());
+ assert (keys_iterator.next ());
+ assert (entries_iterator.next ());
+
+ assert (map_iterator.next ());
+ assert (keys_iterator.get () == "one");
+ assert_entry (entries_iterator.get (), "one", "one");
+
+ assert (map_iterator.get_key () == "one");
+ assert (map_iterator.get_value () == "one");
+
+ assert (keys_iterator.has_previous ());
+ assert (entries_iterator.has_previous ());
+
+ assert (map_iterator.has_previous ());
+ assert (keys_iterator.next ());
+ assert (entries_iterator.next ());
+
+ assert (map_iterator.next ());
+ assert (keys_iterator.get () == "six");
+ assert_entry (entries_iterator.get (), "six", "six");
+
+ assert (map_iterator.get_key () == "six");
+ assert (map_iterator.get_value () == "six");
+ assert (keys_iterator.has_previous ());
+
+ assert (entries_iterator.has_previous ());
+ assert (map_iterator.has_previous ());
+ assert (keys_iterator.next ());
+
+ assert (entries_iterator.next ());
+ assert (map_iterator.next ());
+ assert (keys_iterator.get () == "three");
+
+ assert_entry (entries_iterator.get (), "three", "three");
+ assert (map_iterator.get_key () == "three");
+ assert (map_iterator.get_value () == "three");
+
+ assert (keys_iterator.has_previous ());
+ assert (entries_iterator.has_previous ());
+ assert (map_iterator.has_previous ());
+
+ assert (keys_iterator.next ());
+ assert (entries_iterator.next ());
+ assert (map_iterator.next ());
+
+ assert (keys_iterator.get () == "two");
+ assert_entry (entries_iterator.get (), "two", "two");
+ assert (map_iterator.get_key () == "two");
+ assert (map_iterator.get_value () == "two");
+
+ assert (keys_iterator.has_previous ());
+ assert (entries_iterator.has_previous ());
+ assert (map_iterator.has_previous ());
+
+ assert (!keys_iterator.next ());
+ assert (!entries_iterator.next ());
+ assert (!map_iterator.next ());
+
+ assert (keys_iterator.previous ());
+ assert (entries_iterator.previous ());
+ assert (map_iterator.previous ());
+
+ assert (keys_iterator.get () == "three");
+ assert_entry (entries_iterator.get (), "three", "three");
+ assert (map_iterator.get_key () == "three");
+ assert (map_iterator.get_value () == "three");
+
+ assert (keys_iterator.previous ());
+ assert (entries_iterator.previous ());
+ assert (map_iterator.previous ());
+
+ assert (keys_iterator.get () == "six");
+ assert_entry (entries_iterator.get (), "six", "six");
+ assert (map_iterator.get_key () == "six");
+ assert (map_iterator.get_value () == "six");
+
+ assert (keys_iterator.previous ());
+ assert (entries_iterator.previous ());
+ assert (map_iterator.previous ());
+
+ assert (keys_iterator.get () == "one");
+ assert_entry (entries_iterator.get (), "one", "one");
+ assert (map_iterator.get_key () == "one");
+ assert (map_iterator.get_value () == "one");
+
+ assert (keys_iterator.previous ());
+ assert (entries_iterator.previous ());
+ assert (map_iterator.previous ());
+
+ assert (keys_iterator.get () == "four");
+ assert_entry (entries_iterator.get (), "four", "four");
+ assert (map_iterator.get_key () == "four");
+ assert (map_iterator.get_value () == "four");
+
+ assert (keys_iterator.previous ());
+ assert (entries_iterator.previous ());
+ assert (map_iterator.previous ());
+
+ assert (keys_iterator.get () == "five");
+ assert_entry (entries_iterator.get (), "five", "five");
+ assert (map_iterator.get_key () == "five");
+ assert (map_iterator.get_value () == "five");
+
+ assert (!keys_iterator.previous ());
+ assert (!entries_iterator.previous ());
+ assert (!map_iterator.previous ());
+
+ assert (keys_iterator.get () == "five");
+ assert_entry (entries_iterator.get (), "five", "five");
+ assert (map_iterator.get_key () == "five");
+ assert (map_iterator.get_value () == "five");
+ }
+
+ public void test_bidir_iterator_last () {
+ var test_sorted_map = test_map as BidirSortedMap<string,string>;
+ var keys = (test_sorted_map.ascending_keys) as BidirSortedSet<string>;
+ var entries = (test_sorted_map.ascending_entries) as BidirSortedSet<Map.Entry<string,string>>;
+
+ var keys_iterator = keys.bidir_iterator ();
+ var entries_iterator = entries.bidir_iterator ();
+
+ assert (!keys_iterator.last ());
+ assert (!entries_iterator.last ());
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+
+ keys_iterator = keys.bidir_iterator ();
+ entries_iterator = entries.bidir_iterator ();
+
+ assert (keys_iterator.last ());
+ assert (entries_iterator.last ());
+
+ assert (keys_iterator.get () == "two");
+ assert_entry (entries_iterator.get (), "two", "two");
+ }
+
+
+ public class BidirSubMapTests : Gee.TestCase {
+ private BidirSortedMap<string,string> master;
+ private BidirSortedMap<string,string> submap;
+ private BidirSortedMapTests test;
+ private SortedMapTests.SubMapTests.Type type;
+
+ public BidirSubMapTests (BidirSortedMapTests test, SortedMapTests.SubMapTests.Type type) {
+ base ("%s Subset".printf (type.to_string ()));
+ this.test = test;
+ this.type = type;
+ add_test ("[BidirSortedSet] bi-directional iterator", test_bidir_iterators);
+ }
+
+ public override void set_up () {
+ test.set_up ();
+ master = test.test_map as BidirSortedMap<string,string>;
+ switch (type) {
+ case SortedMapTests.SubMapTests.Type.HEAD:
+ submap = master.head_map ("one") as BidirSortedMap<string,string>; break;
+ case SortedMapTests.SubMapTests.Type.TAIL:
+ submap = master.tail_map ("six") as BidirSortedMap<string,string>; break;
+ case SortedMapTests.SubMapTests.Type.SUB:
+ submap = master.sub_map ("four", "three") as BidirSortedMap<string,string>; break;
+ case SortedMapTests.SubMapTests.Type.EMPTY:
+ submap = master.sub_map ("three", "four") as BidirSortedMap<string,string>; break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public override void tear_down () {
+ test.tear_down ();
+ }
+
+ protected void set_default_values (out string[] contains = null, out string[] not_contains = null) {
+ master.set ("one", "one");
+ master.set ("two", "two");
+ master.set ("three", "three");
+ master.set ("four", "four");
+ master.set ("five", "five");
+ master.set ("six", "six");
+ switch (type) {
+ case SortedMapTests.SubMapTests.Type.HEAD:
+ contains = {"five", "four"};
+ not_contains = {"one", "two", "three", "six"};
+ break;
+ case SortedMapTests.SubMapTests.Type.TAIL:
+ contains = {"six", "three", "two"};
+ not_contains = {"one", "four", "five"};
+ break;
+ case SortedMapTests.SubMapTests.Type.SUB:
+ contains = {"four", "one", "six"};
+ not_contains = {"two", "three", "five"};
+ break;
+ case SortedMapTests.SubMapTests.Type.EMPTY:
+ contains = {};
+ not_contains = {"one", "two", "three", "four", "five", "six"};
+ break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public void test_bidir_iterators () {
+ string[] contains, not_contains;
+
+ var _map_iter = submap.bidir_map_iterator ();
+
+ assert (!_map_iter.has_next ());
+ assert (!_map_iter.next ());
+ assert (!_map_iter.has_previous ());
+ assert (!_map_iter.previous ());
+
+ set_default_values (out contains, out not_contains);
+
+ var i = 0;
+ _map_iter = submap.bidir_map_iterator ();
+ while (_map_iter.next ()) {
+ assert (_map_iter.get_key () == contains[i]);
+ assert (_map_iter.get_value () == contains[i]);
+ i++;
+ }
+ assert (i == contains.length);
+
+ i = 0;
+ foreach (var k in submap.keys)
+ assert (k == contains[i++]);
+ assert (i == contains.length);
+
+ i = 0;
+ foreach (var e in submap.entries) {
+ MapTests.assert_entry (e, contains[i], contains[i]);
+ i++;
+ }
+ assert (i == contains.length);
+
+ var keys_iter = ((submap.ascending_keys) as BidirSortedSet<string>).bidir_iterator ();
+ var entries_iter = ((submap.ascending_entries) as BidirSortedSet<Map.Entry<string,string>>).bidir_iterator ();
+ var map_iter = submap.bidir_map_iterator ();
+ if (type != SortedMapTests.SubMapTests.Type.EMPTY) {
+ assert (map_iter.last ());
+ assert (map_iter.get_key () == contains[contains.length - 1]);
+ assert (map_iter.get_value () == contains[contains.length - 1]);
+
+ map_iter = submap.bidir_map_iterator ();
+ assert (map_iter.next ());
+
+ assert (map_iter.get_key () == contains[0]);
+ assert (map_iter.get_value () == contains[0]);
+
+ assert (map_iter.has_next ());
+ assert (map_iter.next ());
+ assert (map_iter.get_key () == contains[1]);
+ assert (map_iter.get_value () == contains[1]);
+
+ assert (map_iter.has_previous ());
+ map_iter.unset ();
+ assert (map_iter.has_previous ());
+ if (type != SortedMapTests.SubMapTests.Type.HEAD)
+ assert (map_iter.has_next ());
+ else
+ assert (!map_iter.has_next ());
+ assert (map_iter.previous ());
+ assert (map_iter.get_key () == contains[0]);
+ assert (map_iter.get_value () == contains[0]);
+
+ // Repeat for keys
+ master.clear ();
+ set_default_values (out contains, out not_contains);
+
+ assert (keys_iter.last ());
+ assert (keys_iter.get () == contains[contains.length - 1]);
+ assert (keys_iter.first ());
+
+ assert (keys_iter.get () == contains[0]);
+ assert (keys_iter.has_next ());
+ assert (keys_iter.next ());
+ assert (keys_iter.get () == contains[1]);
+ assert (keys_iter.has_previous ());
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys_iter.remove ();
+ Posix.exit (0);
+ }
+ assert (keys_iter.has_previous ());
+ if (type != SortedMapTests.SubMapTests.Type.HEAD)
+ assert (keys_iter.has_next ());
+ else
+ assert (!keys_iter.has_next ());
+ assert (keys_iter.previous ());
+ assert (keys_iter.get () == contains[0]);
+
+ // Repeat for entries
+ master.clear ();
+ set_default_values (out contains, out not_contains);
+
+ assert (entries_iter.last ());
+ MapTests.assert_entry (entries_iter.get (), contains[contains.length - 1], contains[contains.length - 1]);
+ assert (entries_iter.first ());
+
+ MapTests.assert_entry (entries_iter.get (), contains[0], contains[0]);
+ assert (entries_iter.has_next ());
+ assert (entries_iter.next ());
+ MapTests.assert_entry (entries_iter.get (), contains[1], contains[1]);
+ assert (entries_iter.has_previous ());
+ entries_iter.remove ();
+ assert (entries_iter.has_previous ());
+ if (type != SortedMapTests.SubMapTests.Type.HEAD)
+ assert (entries_iter.has_next ());
+ else
+ assert (!entries_iter.has_next ());
+ assert (entries_iter.previous ());
+ MapTests.assert_entry (entries_iter.get (), contains[0], contains[0]);
+ } else {
+ assert (!keys_iter.first ());
+ assert (!keys_iter.last ());
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys_iter.remove ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ assert (!entries_iter.first ());
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ entries_iter.remove ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ }
+ }
+ }
+}
+
diff --git a/tests/testbidirsortedset.c b/tests/testbidirsortedset.c
new file mode 100644
index 0000000..659f62c
--- /dev/null
+++ b/tests/testbidirsortedset.c
@@ -0,0 +1,1326 @@
+/* testbidirsortedset.c generated by valac 0.18.0, the Vala compiler
+ * generated from testbidirsortedset.vala, do not modify */
+
+/* testbidirsortedset.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_COLLECTION_TESTS (collection_tests_get_type ())
+#define COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_TESTS, CollectionTests))
+#define COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+#define IS_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_TESTS))
+#define IS_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_TESTS))
+#define COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+
+typedef struct _CollectionTests CollectionTests;
+typedef struct _CollectionTestsClass CollectionTestsClass;
+typedef struct _CollectionTestsPrivate CollectionTestsPrivate;
+
+#define TYPE_SET_TESTS (set_tests_get_type ())
+#define SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_TESTS, SetTests))
+#define SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_TESTS, SetTestsClass))
+#define IS_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_TESTS))
+#define IS_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_TESTS))
+#define SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_TESTS, SetTestsClass))
+
+typedef struct _SetTests SetTests;
+typedef struct _SetTestsClass SetTestsClass;
+typedef struct _SetTestsPrivate SetTestsPrivate;
+
+#define TYPE_SORTED_SET_TESTS (sorted_set_tests_get_type ())
+#define SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SORTED_SET_TESTS, SortedSetTests))
+#define SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
+#define IS_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SORTED_SET_TESTS))
+#define IS_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SORTED_SET_TESTS))
+#define SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
+
+typedef struct _SortedSetTests SortedSetTests;
+typedef struct _SortedSetTestsClass SortedSetTestsClass;
+typedef struct _SortedSetTestsPrivate SortedSetTestsPrivate;
+
+#define TYPE_BIDIR_SORTED_SET_TESTS (bidir_sorted_set_tests_get_type ())
+#define BIDIR_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTests))
+#define BIDIR_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTestsClass))
+#define IS_BIDIR_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_SORTED_SET_TESTS))
+#define IS_BIDIR_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_SORTED_SET_TESTS))
+#define BIDIR_SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTestsClass))
+
+typedef struct _BidirSortedSetTests BidirSortedSetTests;
+typedef struct _BidirSortedSetTestsClass BidirSortedSetTestsClass;
+typedef struct _BidirSortedSetTestsPrivate BidirSortedSetTestsPrivate;
+
+#define SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TYPE (sorted_set_tests_sub_set_tests_type_get_type ())
+
+#define BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS (bidir_sorted_set_tests_bidir_sub_set_tests_get_type ())
+#define BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTests))
+#define BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTestsClass))
+#define BIDIR_SORTED_SET_TESTS_IS_BIDIR_SUB_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS))
+#define BIDIR_SORTED_SET_TESTS_IS_BIDIR_SUB_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS))
+#define BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTestsClass))
+
+typedef struct _BidirSortedSetTestsBidirSubSetTests BidirSortedSetTestsBidirSubSetTests;
+typedef struct _BidirSortedSetTestsBidirSubSetTestsClass BidirSortedSetTestsBidirSubSetTestsClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _BidirSortedSetTestsBidirSubSetTestsPrivate BidirSortedSetTestsBidirSubSetTestsPrivate;
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _CollectionTests {
+ GeeTestCase parent_instance;
+ CollectionTestsPrivate * priv;
+ GeeCollection* test_collection;
+};
+
+struct _CollectionTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _SetTests {
+ CollectionTests parent_instance;
+ SetTestsPrivate * priv;
+};
+
+struct _SetTestsClass {
+ CollectionTestsClass parent_class;
+ void (*test_duplicates_are_ignored) (SetTests* self);
+};
+
+struct _SortedSetTests {
+ SetTests parent_instance;
+ SortedSetTestsPrivate * priv;
+};
+
+struct _SortedSetTestsClass {
+ SetTestsClass parent_class;
+};
+
+struct _BidirSortedSetTests {
+ SortedSetTests parent_instance;
+ BidirSortedSetTestsPrivate * priv;
+};
+
+struct _BidirSortedSetTestsClass {
+ SortedSetTestsClass parent_class;
+};
+
+typedef void (*GeeTestCaseTestMethod) (void* user_data);
+typedef enum {
+ SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD,
+ SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL,
+ SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB,
+ SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY
+} SortedSetTestsSubSetTestsType;
+
+struct _BidirSortedSetTestsBidirSubSetTests {
+ GeeTestCase parent_instance;
+ BidirSortedSetTestsBidirSubSetTestsPrivate * priv;
+};
+
+struct _BidirSortedSetTestsBidirSubSetTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _BidirSortedSetTestsBidirSubSetTestsPrivate {
+ GeeBidirSortedSet* master;
+ GeeBidirSortedSet* subset;
+ BidirSortedSetTests* test;
+ SortedSetTestsSubSetTestsType type;
+};
+
+
+static gpointer bidir_sorted_set_tests_parent_class = NULL;
+static gpointer bidir_sorted_set_tests_bidir_sub_set_tests_parent_class = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType collection_tests_get_type (void) G_GNUC_CONST;
+GType set_tests_get_type (void) G_GNUC_CONST;
+GType sorted_set_tests_get_type (void) G_GNUC_CONST;
+GType bidir_sorted_set_tests_get_type (void) G_GNUC_CONST;
+enum {
+ BIDIR_SORTED_SET_TESTS_DUMMY_PROPERTY
+};
+BidirSortedSetTests* bidir_sorted_set_tests_construct (GType object_type, const gchar* name);
+SortedSetTests* sorted_set_tests_construct (GType object_type, const gchar* name, gboolean strict);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
+void bidir_sorted_set_tests_test_bidir_iterator_can_go_backward (BidirSortedSetTests* self);
+static void _bidir_sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method (gpointer self);
+void bidir_sorted_set_tests_test_mutable_bidir_iterator (BidirSortedSetTests* self);
+static void _bidir_sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method (gpointer self);
+void bidir_sorted_set_tests_test_bidir_iterator_first (BidirSortedSetTests* self);
+static void _bidir_sorted_set_tests_test_bidir_iterator_first_gee_test_case_test_method (gpointer self);
+void bidir_sorted_set_tests_test_bidir_iterator_last (BidirSortedSetTests* self);
+static void _bidir_sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method (gpointer self);
+GTestSuite* gee_test_case_get_suite (GeeTestCase* self);
+GType sorted_set_tests_sub_set_tests_type_get_type (void) G_GNUC_CONST;
+BidirSortedSetTestsBidirSubSetTests* bidir_sorted_set_tests_bidir_sub_set_tests_new (BidirSortedSetTests* test, SortedSetTestsSubSetTestsType type);
+BidirSortedSetTestsBidirSubSetTests* bidir_sorted_set_tests_bidir_sub_set_tests_construct (GType object_type, BidirSortedSetTests* test, SortedSetTestsSubSetTestsType type);
+GType bidir_sorted_set_tests_bidir_sub_set_tests_get_type (void) G_GNUC_CONST;
+#define BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTestsPrivate))
+enum {
+ BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_DUMMY_PROPERTY
+};
+const gchar* sorted_set_tests_sub_set_tests_type_to_string (SortedSetTestsSubSetTestsType self);
+GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
+void bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator (BidirSortedSetTestsBidirSubSetTests* self);
+static void _bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator_gee_test_case_test_method (gpointer self);
+static void bidir_sorted_set_tests_bidir_sub_set_tests_real_set_up (GeeTestCase* base);
+void gee_test_case_set_up (GeeTestCase* self);
+static void bidir_sorted_set_tests_bidir_sub_set_tests_real_tear_down (GeeTestCase* base);
+void gee_test_case_tear_down (GeeTestCase* self);
+static void bidir_sorted_set_tests_bidir_sub_set_tests_finalize (GObject* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+
+static void _bidir_sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method (gpointer self) {
+ bidir_sorted_set_tests_test_bidir_iterator_can_go_backward (self);
+}
+
+
+static void _bidir_sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method (gpointer self) {
+ bidir_sorted_set_tests_test_mutable_bidir_iterator (self);
+}
+
+
+static void _bidir_sorted_set_tests_test_bidir_iterator_first_gee_test_case_test_method (gpointer self) {
+ bidir_sorted_set_tests_test_bidir_iterator_first (self);
+}
+
+
+static void _bidir_sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method (gpointer self) {
+ bidir_sorted_set_tests_test_bidir_iterator_last (self);
+}
+
+
+BidirSortedSetTests* bidir_sorted_set_tests_construct (GType object_type, const gchar* name) {
+ BidirSortedSetTests * self = NULL;
+ const gchar* _tmp0_;
+ GTestSuite* _tmp1_ = NULL;
+ BidirSortedSetTestsBidirSubSetTests* _tmp2_;
+ BidirSortedSetTestsBidirSubSetTests* _tmp3_;
+ GTestSuite* _tmp4_ = NULL;
+ GTestSuite* _tmp5_ = NULL;
+ BidirSortedSetTestsBidirSubSetTests* _tmp6_;
+ BidirSortedSetTestsBidirSubSetTests* _tmp7_;
+ GTestSuite* _tmp8_ = NULL;
+ GTestSuite* _tmp9_ = NULL;
+ BidirSortedSetTestsBidirSubSetTests* _tmp10_;
+ BidirSortedSetTestsBidirSubSetTests* _tmp11_;
+ GTestSuite* _tmp12_ = NULL;
+ GTestSuite* _tmp13_ = NULL;
+ BidirSortedSetTestsBidirSubSetTests* _tmp14_;
+ BidirSortedSetTestsBidirSubSetTests* _tmp15_;
+ GTestSuite* _tmp16_ = NULL;
+ g_return_val_if_fail (name != NULL, NULL);
+ _tmp0_ = name;
+ self = (BidirSortedSetTests*) sorted_set_tests_construct (object_type, _tmp0_, TRUE);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can go backward", _bidir_sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators are mutable", _bidir_sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can to beginning", _bidir_sorted_set_tests_test_bidir_iterator_first_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can to end", _bidir_sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ _tmp1_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp2_ = bidir_sorted_set_tests_bidir_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD);
+ _tmp3_ = _tmp2_;
+ _tmp4_ = gee_test_case_get_suite ((GeeTestCase*) _tmp3_);
+ g_test_suite_add_suite (_tmp1_, _tmp4_);
+ _g_object_unref0 (_tmp3_);
+ _tmp5_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp6_ = bidir_sorted_set_tests_bidir_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL);
+ _tmp7_ = _tmp6_;
+ _tmp8_ = gee_test_case_get_suite ((GeeTestCase*) _tmp7_);
+ g_test_suite_add_suite (_tmp5_, _tmp8_);
+ _g_object_unref0 (_tmp7_);
+ _tmp9_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp10_ = bidir_sorted_set_tests_bidir_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB);
+ _tmp11_ = _tmp10_;
+ _tmp12_ = gee_test_case_get_suite ((GeeTestCase*) _tmp11_);
+ g_test_suite_add_suite (_tmp9_, _tmp12_);
+ _g_object_unref0 (_tmp11_);
+ _tmp13_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp14_ = bidir_sorted_set_tests_bidir_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY);
+ _tmp15_ = _tmp14_;
+ _tmp16_ = gee_test_case_get_suite ((GeeTestCase*) _tmp15_);
+ g_test_suite_add_suite (_tmp13_, _tmp16_);
+ _g_object_unref0 (_tmp15_);
+ return self;
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+ return self ? g_object_ref (self) : NULL;
+}
+
+
+void bidir_sorted_set_tests_test_bidir_iterator_can_go_backward (BidirSortedSetTests* self) {
+ GeeCollection* _tmp0_;
+ GeeBidirSortedSet* _tmp1_;
+ GeeBidirSortedSet* test_set;
+ GeeBidirIterator* _tmp2_ = NULL;
+ GeeBidirIterator* iterator;
+ GeeBidirIterator* _tmp3_;
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+ gboolean _tmp8_ = FALSE;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp10_ = FALSE;
+ GeeBidirIterator* _tmp11_ = NULL;
+ GeeBidirIterator* _tmp12_;
+ gboolean _tmp13_ = FALSE;
+ GeeBidirIterator* _tmp14_;
+ gpointer _tmp15_ = NULL;
+ gchar* _tmp16_;
+ GeeBidirIterator* _tmp17_;
+ gboolean _tmp18_ = FALSE;
+ GeeBidirIterator* _tmp19_;
+ gboolean _tmp20_ = FALSE;
+ GeeBidirIterator* _tmp21_;
+ gpointer _tmp22_ = NULL;
+ gchar* _tmp23_;
+ GeeBidirIterator* _tmp24_;
+ gboolean _tmp25_ = FALSE;
+ GeeBidirIterator* _tmp26_;
+ gboolean _tmp27_ = FALSE;
+ GeeBidirIterator* _tmp28_;
+ gpointer _tmp29_ = NULL;
+ gchar* _tmp30_;
+ GeeBidirIterator* _tmp31_;
+ gboolean _tmp32_ = FALSE;
+ GeeBidirIterator* _tmp33_;
+ gboolean _tmp34_ = FALSE;
+ GeeBidirIterator* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ gchar* _tmp37_;
+ GeeBidirIterator* _tmp38_;
+ gboolean _tmp39_ = FALSE;
+ GeeBidirIterator* _tmp40_;
+ gboolean _tmp41_ = FALSE;
+ GeeBidirIterator* _tmp42_;
+ gpointer _tmp43_ = NULL;
+ gchar* _tmp44_;
+ GeeBidirIterator* _tmp45_;
+ gboolean _tmp46_ = FALSE;
+ GeeBidirIterator* _tmp47_;
+ gboolean _tmp48_ = FALSE;
+ GeeBidirIterator* _tmp49_;
+ gpointer _tmp50_ = NULL;
+ gchar* _tmp51_;
+ GeeBidirIterator* _tmp52_;
+ gboolean _tmp53_ = FALSE;
+ GeeBidirIterator* _tmp54_;
+ gboolean _tmp55_ = FALSE;
+ GeeBidirIterator* _tmp56_;
+ gboolean _tmp57_ = FALSE;
+ GeeBidirIterator* _tmp58_;
+ gpointer _tmp59_ = NULL;
+ gchar* _tmp60_;
+ GeeBidirIterator* _tmp61_;
+ gboolean _tmp62_ = FALSE;
+ GeeBidirIterator* _tmp63_;
+ gpointer _tmp64_ = NULL;
+ gchar* _tmp65_;
+ GeeBidirIterator* _tmp66_;
+ gboolean _tmp67_ = FALSE;
+ GeeBidirIterator* _tmp68_;
+ gpointer _tmp69_ = NULL;
+ gchar* _tmp70_;
+ GeeBidirIterator* _tmp71_;
+ gboolean _tmp72_ = FALSE;
+ GeeBidirIterator* _tmp73_;
+ gpointer _tmp74_ = NULL;
+ gchar* _tmp75_;
+ GeeBidirIterator* _tmp76_;
+ gboolean _tmp77_ = FALSE;
+ GeeBidirIterator* _tmp78_;
+ gpointer _tmp79_ = NULL;
+ gchar* _tmp80_;
+ GeeBidirIterator* _tmp81_;
+ gboolean _tmp82_ = FALSE;
+ GeeBidirIterator* _tmp83_;
+ gpointer _tmp84_ = NULL;
+ gchar* _tmp85_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((CollectionTests*) self)->test_collection;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp0_) : NULL);
+ test_set = _tmp1_;
+ _tmp2_ = gee_bidir_sorted_set_bidir_iterator (test_set);
+ iterator = _tmp2_;
+ _tmp3_ = iterator;
+ _tmp4_ = gee_bidir_iterator_has_previous (_tmp3_);
+ _vala_assert (!_tmp4_, "!iterator.has_previous ()");
+ _tmp5_ = gee_collection_add ((GeeCollection*) test_set, "one");
+ _vala_assert (_tmp5_, "test_set.add (\"one\")");
+ _tmp6_ = gee_collection_add ((GeeCollection*) test_set, "two");
+ _vala_assert (_tmp6_, "test_set.add (\"two\")");
+ _tmp7_ = gee_collection_add ((GeeCollection*) test_set, "three");
+ _vala_assert (_tmp7_, "test_set.add (\"three\")");
+ _tmp8_ = gee_collection_add ((GeeCollection*) test_set, "four");
+ _vala_assert (_tmp8_, "test_set.add (\"four\")");
+ _tmp9_ = gee_collection_add ((GeeCollection*) test_set, "five");
+ _vala_assert (_tmp9_, "test_set.add (\"five\")");
+ _tmp10_ = gee_collection_add ((GeeCollection*) test_set, "six");
+ _vala_assert (_tmp10_, "test_set.add (\"six\")");
+ _tmp11_ = gee_bidir_sorted_set_bidir_iterator (test_set);
+ _g_object_unref0 (iterator);
+ iterator = _tmp11_;
+ _tmp12_ = iterator;
+ _tmp13_ = gee_iterator_next ((GeeIterator*) _tmp12_);
+ _vala_assert (_tmp13_, "iterator.next ()");
+ _tmp14_ = iterator;
+ _tmp15_ = gee_iterator_get ((GeeIterator*) _tmp14_);
+ _tmp16_ = (gchar*) _tmp15_;
+ _vala_assert (g_strcmp0 (_tmp16_, "five") == 0, "iterator.get () == \"five\"");
+ _g_free0 (_tmp16_);
+ _tmp17_ = iterator;
+ _tmp18_ = gee_bidir_iterator_has_previous (_tmp17_);
+ _vala_assert (!_tmp18_, "!iterator.has_previous ()");
+ _tmp19_ = iterator;
+ _tmp20_ = gee_iterator_next ((GeeIterator*) _tmp19_);
+ _vala_assert (_tmp20_, "iterator.next ()");
+ _tmp21_ = iterator;
+ _tmp22_ = gee_iterator_get ((GeeIterator*) _tmp21_);
+ _tmp23_ = (gchar*) _tmp22_;
+ _vala_assert (g_strcmp0 (_tmp23_, "four") == 0, "iterator.get () == \"four\"");
+ _g_free0 (_tmp23_);
+ _tmp24_ = iterator;
+ _tmp25_ = gee_bidir_iterator_has_previous (_tmp24_);
+ _vala_assert (_tmp25_, "iterator.has_previous ()");
+ _tmp26_ = iterator;
+ _tmp27_ = gee_iterator_next ((GeeIterator*) _tmp26_);
+ _vala_assert (_tmp27_, "iterator.next ()");
+ _tmp28_ = iterator;
+ _tmp29_ = gee_iterator_get ((GeeIterator*) _tmp28_);
+ _tmp30_ = (gchar*) _tmp29_;
+ _vala_assert (g_strcmp0 (_tmp30_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp30_);
+ _tmp31_ = iterator;
+ _tmp32_ = gee_bidir_iterator_has_previous (_tmp31_);
+ _vala_assert (_tmp32_, "iterator.has_previous ()");
+ _tmp33_ = iterator;
+ _tmp34_ = gee_iterator_next ((GeeIterator*) _tmp33_);
+ _vala_assert (_tmp34_, "iterator.next ()");
+ _tmp35_ = iterator;
+ _tmp36_ = gee_iterator_get ((GeeIterator*) _tmp35_);
+ _tmp37_ = (gchar*) _tmp36_;
+ _vala_assert (g_strcmp0 (_tmp37_, "six") == 0, "iterator.get () == \"six\"");
+ _g_free0 (_tmp37_);
+ _tmp38_ = iterator;
+ _tmp39_ = gee_bidir_iterator_has_previous (_tmp38_);
+ _vala_assert (_tmp39_, "iterator.has_previous ()");
+ _tmp40_ = iterator;
+ _tmp41_ = gee_iterator_next ((GeeIterator*) _tmp40_);
+ _vala_assert (_tmp41_, "iterator.next ()");
+ _tmp42_ = iterator;
+ _tmp43_ = gee_iterator_get ((GeeIterator*) _tmp42_);
+ _tmp44_ = (gchar*) _tmp43_;
+ _vala_assert (g_strcmp0 (_tmp44_, "three") == 0, "iterator.get () == \"three\"");
+ _g_free0 (_tmp44_);
+ _tmp45_ = iterator;
+ _tmp46_ = gee_bidir_iterator_has_previous (_tmp45_);
+ _vala_assert (_tmp46_, "iterator.has_previous ()");
+ _tmp47_ = iterator;
+ _tmp48_ = gee_iterator_next ((GeeIterator*) _tmp47_);
+ _vala_assert (_tmp48_, "iterator.next ()");
+ _tmp49_ = iterator;
+ _tmp50_ = gee_iterator_get ((GeeIterator*) _tmp49_);
+ _tmp51_ = (gchar*) _tmp50_;
+ _vala_assert (g_strcmp0 (_tmp51_, "two") == 0, "iterator.get () == \"two\"");
+ _g_free0 (_tmp51_);
+ _tmp52_ = iterator;
+ _tmp53_ = gee_bidir_iterator_has_previous (_tmp52_);
+ _vala_assert (_tmp53_, "iterator.has_previous ()");
+ _tmp54_ = iterator;
+ _tmp55_ = gee_iterator_next ((GeeIterator*) _tmp54_);
+ _vala_assert (!_tmp55_, "!iterator.next ()");
+ _tmp56_ = iterator;
+ _tmp57_ = gee_bidir_iterator_previous (_tmp56_);
+ _vala_assert (_tmp57_, "iterator.previous ()");
+ _tmp58_ = iterator;
+ _tmp59_ = gee_iterator_get ((GeeIterator*) _tmp58_);
+ _tmp60_ = (gchar*) _tmp59_;
+ _vala_assert (g_strcmp0 (_tmp60_, "three") == 0, "iterator.get () == \"three\"");
+ _g_free0 (_tmp60_);
+ _tmp61_ = iterator;
+ _tmp62_ = gee_bidir_iterator_previous (_tmp61_);
+ _vala_assert (_tmp62_, "iterator.previous ()");
+ _tmp63_ = iterator;
+ _tmp64_ = gee_iterator_get ((GeeIterator*) _tmp63_);
+ _tmp65_ = (gchar*) _tmp64_;
+ _vala_assert (g_strcmp0 (_tmp65_, "six") == 0, "iterator.get () == \"six\"");
+ _g_free0 (_tmp65_);
+ _tmp66_ = iterator;
+ _tmp67_ = gee_bidir_iterator_previous (_tmp66_);
+ _vala_assert (_tmp67_, "iterator.previous ()");
+ _tmp68_ = iterator;
+ _tmp69_ = gee_iterator_get ((GeeIterator*) _tmp68_);
+ _tmp70_ = (gchar*) _tmp69_;
+ _vala_assert (g_strcmp0 (_tmp70_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp70_);
+ _tmp71_ = iterator;
+ _tmp72_ = gee_bidir_iterator_previous (_tmp71_);
+ _vala_assert (_tmp72_, "iterator.previous ()");
+ _tmp73_ = iterator;
+ _tmp74_ = gee_iterator_get ((GeeIterator*) _tmp73_);
+ _tmp75_ = (gchar*) _tmp74_;
+ _vala_assert (g_strcmp0 (_tmp75_, "four") == 0, "iterator.get () == \"four\"");
+ _g_free0 (_tmp75_);
+ _tmp76_ = iterator;
+ _tmp77_ = gee_bidir_iterator_previous (_tmp76_);
+ _vala_assert (_tmp77_, "iterator.previous ()");
+ _tmp78_ = iterator;
+ _tmp79_ = gee_iterator_get ((GeeIterator*) _tmp78_);
+ _tmp80_ = (gchar*) _tmp79_;
+ _vala_assert (g_strcmp0 (_tmp80_, "five") == 0, "iterator.get () == \"five\"");
+ _g_free0 (_tmp80_);
+ _tmp81_ = iterator;
+ _tmp82_ = gee_bidir_iterator_previous (_tmp81_);
+ _vala_assert (!_tmp82_, "!iterator.previous ()");
+ _tmp83_ = iterator;
+ _tmp84_ = gee_iterator_get ((GeeIterator*) _tmp83_);
+ _tmp85_ = (gchar*) _tmp84_;
+ _vala_assert (g_strcmp0 (_tmp85_, "five") == 0, "iterator.get () == \"five\"");
+ _g_free0 (_tmp85_);
+ _g_object_unref0 (iterator);
+ _g_object_unref0 (test_set);
+}
+
+
+void bidir_sorted_set_tests_test_bidir_iterator_first (BidirSortedSetTests* self) {
+ GeeCollection* _tmp0_;
+ GeeBidirSortedSet* _tmp1_;
+ GeeBidirSortedSet* test_set;
+ GeeBidirIterator* _tmp2_ = NULL;
+ GeeBidirIterator* iterator;
+ GeeBidirIterator* _tmp3_;
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+ gboolean _tmp8_ = FALSE;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp10_ = FALSE;
+ GeeBidirIterator* _tmp11_ = NULL;
+ GeeBidirIterator* _tmp12_;
+ gboolean _tmp13_ = FALSE;
+ GeeBidirIterator* _tmp14_;
+ gpointer _tmp15_ = NULL;
+ gchar* _tmp16_;
+ GeeBidirIterator* _tmp17_;
+ gboolean _tmp18_ = FALSE;
+ GeeBidirIterator* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((CollectionTests*) self)->test_collection;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp0_) : NULL);
+ test_set = _tmp1_;
+ _tmp2_ = gee_bidir_sorted_set_bidir_iterator (test_set);
+ iterator = _tmp2_;
+ _tmp3_ = iterator;
+ _tmp4_ = gee_bidir_iterator_first (_tmp3_);
+ _vala_assert (!_tmp4_, "!iterator.first ()");
+ _tmp5_ = gee_collection_add ((GeeCollection*) test_set, "one");
+ _vala_assert (_tmp5_, "test_set.add (\"one\")");
+ _tmp6_ = gee_collection_add ((GeeCollection*) test_set, "two");
+ _vala_assert (_tmp6_, "test_set.add (\"two\")");
+ _tmp7_ = gee_collection_add ((GeeCollection*) test_set, "three");
+ _vala_assert (_tmp7_, "test_set.add (\"three\")");
+ _tmp8_ = gee_collection_add ((GeeCollection*) test_set, "four");
+ _vala_assert (_tmp8_, "test_set.add (\"four\")");
+ _tmp9_ = gee_collection_add ((GeeCollection*) test_set, "five");
+ _vala_assert (_tmp9_, "test_set.add (\"five\")");
+ _tmp10_ = gee_collection_add ((GeeCollection*) test_set, "six");
+ _vala_assert (_tmp10_, "test_set.add (\"six\")");
+ _tmp11_ = gee_bidir_sorted_set_bidir_iterator (test_set);
+ _g_object_unref0 (iterator);
+ iterator = _tmp11_;
+ _tmp12_ = iterator;
+ _tmp13_ = gee_bidir_iterator_last (_tmp12_);
+ _vala_assert (_tmp13_, "iterator.last ()");
+ _tmp14_ = iterator;
+ _tmp15_ = gee_iterator_get ((GeeIterator*) _tmp14_);
+ _tmp16_ = (gchar*) _tmp15_;
+ _vala_assert (g_strcmp0 (_tmp16_, "two") == 0, "iterator.get () == \"two\"");
+ _g_free0 (_tmp16_);
+ _tmp17_ = iterator;
+ _tmp18_ = gee_bidir_iterator_first (_tmp17_);
+ _vala_assert (_tmp18_, "iterator.first ()");
+ _tmp19_ = iterator;
+ _tmp20_ = gee_iterator_get ((GeeIterator*) _tmp19_);
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "five") == 0, "iterator.get () == \"five\"");
+ _g_free0 (_tmp21_);
+ _g_object_unref0 (iterator);
+ _g_object_unref0 (test_set);
+}
+
+
+void bidir_sorted_set_tests_test_bidir_iterator_last (BidirSortedSetTests* self) {
+ GeeCollection* _tmp0_;
+ GeeBidirSortedSet* _tmp1_;
+ GeeBidirSortedSet* test_set;
+ GeeBidirIterator* _tmp2_ = NULL;
+ GeeBidirIterator* iterator;
+ GeeBidirIterator* _tmp3_;
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+ gboolean _tmp8_ = FALSE;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp10_ = FALSE;
+ GeeBidirIterator* _tmp11_ = NULL;
+ GeeBidirIterator* _tmp12_;
+ gboolean _tmp13_ = FALSE;
+ GeeBidirIterator* _tmp14_;
+ gpointer _tmp15_ = NULL;
+ gchar* _tmp16_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((CollectionTests*) self)->test_collection;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp0_) : NULL);
+ test_set = _tmp1_;
+ _tmp2_ = gee_bidir_sorted_set_bidir_iterator (test_set);
+ iterator = _tmp2_;
+ _tmp3_ = iterator;
+ _tmp4_ = gee_bidir_iterator_last (_tmp3_);
+ _vala_assert (!_tmp4_, "!iterator.last ()");
+ _tmp5_ = gee_collection_add ((GeeCollection*) test_set, "one");
+ _vala_assert (_tmp5_, "test_set.add (\"one\")");
+ _tmp6_ = gee_collection_add ((GeeCollection*) test_set, "two");
+ _vala_assert (_tmp6_, "test_set.add (\"two\")");
+ _tmp7_ = gee_collection_add ((GeeCollection*) test_set, "three");
+ _vala_assert (_tmp7_, "test_set.add (\"three\")");
+ _tmp8_ = gee_collection_add ((GeeCollection*) test_set, "four");
+ _vala_assert (_tmp8_, "test_set.add (\"four\")");
+ _tmp9_ = gee_collection_add ((GeeCollection*) test_set, "five");
+ _vala_assert (_tmp9_, "test_set.add (\"five\")");
+ _tmp10_ = gee_collection_add ((GeeCollection*) test_set, "six");
+ _vala_assert (_tmp10_, "test_set.add (\"six\")");
+ _tmp11_ = gee_bidir_sorted_set_bidir_iterator (test_set);
+ _g_object_unref0 (iterator);
+ iterator = _tmp11_;
+ _tmp12_ = iterator;
+ _tmp13_ = gee_bidir_iterator_last (_tmp12_);
+ _vala_assert (_tmp13_, "iterator.last ()");
+ _tmp14_ = iterator;
+ _tmp15_ = gee_iterator_get ((GeeIterator*) _tmp14_);
+ _tmp16_ = (gchar*) _tmp15_;
+ _vala_assert (g_strcmp0 (_tmp16_, "two") == 0, "iterator.get () == \"two\"");
+ _g_free0 (_tmp16_);
+ _g_object_unref0 (iterator);
+ _g_object_unref0 (test_set);
+}
+
+
+void bidir_sorted_set_tests_test_mutable_bidir_iterator (BidirSortedSetTests* self) {
+ GeeCollection* _tmp0_;
+ GeeBidirSortedSet* _tmp1_;
+ GeeBidirSortedSet* test_set;
+ GeeBidirSortedSet* _tmp2_;
+ GeeBidirIterator* _tmp3_ = NULL;
+ GeeBidirIterator* iterator;
+ GeeBidirIterator* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeBidirSortedSet* _tmp6_;
+ gboolean _tmp7_ = FALSE;
+ GeeBidirSortedSet* _tmp8_;
+ gboolean _tmp9_ = FALSE;
+ GeeBidirSortedSet* _tmp10_;
+ gboolean _tmp11_ = FALSE;
+ GeeBidirSortedSet* _tmp12_;
+ gboolean _tmp13_ = FALSE;
+ GeeBidirSortedSet* _tmp14_;
+ gboolean _tmp15_ = FALSE;
+ GeeBidirSortedSet* _tmp16_;
+ gboolean _tmp17_ = FALSE;
+ GeeBidirSortedSet* _tmp18_;
+ GeeBidirIterator* _tmp19_ = NULL;
+ gboolean _tmp20_ = FALSE;
+ GeeBidirIterator* _tmp22_;
+ gboolean _tmp23_ = FALSE;
+ GeeBidirIterator* _tmp24_;
+ gpointer _tmp25_ = NULL;
+ gchar* _tmp26_;
+ GeeBidirIterator* _tmp27_;
+ GeeBidirSortedSet* _tmp28_;
+ gboolean _tmp29_ = FALSE;
+ GeeBidirIterator* _tmp30_;
+ gboolean _tmp31_ = FALSE;
+ GeeBidirIterator* _tmp32_;
+ gboolean _tmp33_ = FALSE;
+ gboolean _tmp34_ = FALSE;
+ GeeBidirIterator* _tmp38_;
+ gboolean _tmp39_ = FALSE;
+ GeeBidirIterator* _tmp40_;
+ gboolean _tmp41_ = FALSE;
+ GeeBidirIterator* _tmp42_;
+ gpointer _tmp43_ = NULL;
+ gchar* _tmp44_;
+ GeeBidirIterator* _tmp45_;
+ gboolean _tmp46_ = FALSE;
+ GeeBidirIterator* _tmp47_;
+ gpointer _tmp48_ = NULL;
+ gchar* _tmp49_;
+ GeeBidirIterator* _tmp50_;
+ GeeBidirSortedSet* _tmp51_;
+ gboolean _tmp52_ = FALSE;
+ GeeBidirIterator* _tmp53_;
+ gboolean _tmp54_ = FALSE;
+ GeeBidirIterator* _tmp55_;
+ gboolean _tmp56_ = FALSE;
+ GeeBidirIterator* _tmp57_;
+ gboolean _tmp58_ = FALSE;
+ GeeBidirIterator* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ gchar* _tmp61_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((CollectionTests*) self)->test_collection;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp0_) : NULL);
+ test_set = _tmp1_;
+ _tmp2_ = test_set;
+ _tmp3_ = gee_bidir_sorted_set_bidir_iterator (_tmp2_);
+ iterator = _tmp3_;
+ _tmp4_ = iterator;
+ _tmp5_ = gee_bidir_iterator_has_previous (_tmp4_);
+ _vala_assert (!_tmp5_, "!iterator.has_previous ()");
+ _tmp6_ = test_set;
+ _tmp7_ = gee_collection_add ((GeeCollection*) _tmp6_, "one");
+ _vala_assert (_tmp7_, "test_set.add (\"one\")");
+ _tmp8_ = test_set;
+ _tmp9_ = gee_collection_add ((GeeCollection*) _tmp8_, "two");
+ _vala_assert (_tmp9_, "test_set.add (\"two\")");
+ _tmp10_ = test_set;
+ _tmp11_ = gee_collection_add ((GeeCollection*) _tmp10_, "three");
+ _vala_assert (_tmp11_, "test_set.add (\"three\")");
+ _tmp12_ = test_set;
+ _tmp13_ = gee_collection_add ((GeeCollection*) _tmp12_, "four");
+ _vala_assert (_tmp13_, "test_set.add (\"four\")");
+ _tmp14_ = test_set;
+ _tmp15_ = gee_collection_add ((GeeCollection*) _tmp14_, "five");
+ _vala_assert (_tmp15_, "test_set.add (\"five\")");
+ _tmp16_ = test_set;
+ _tmp17_ = gee_collection_add ((GeeCollection*) _tmp16_, "six");
+ _vala_assert (_tmp17_, "test_set.add (\"six\")");
+ _tmp18_ = test_set;
+ _tmp19_ = gee_bidir_sorted_set_bidir_iterator (_tmp18_);
+ _g_object_unref0 (iterator);
+ iterator = _tmp19_;
+ _tmp20_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp20_) {
+ GeeBidirIterator* _tmp21_;
+ _tmp21_ = iterator;
+ gee_iterator_remove ((GeeIterator*) _tmp21_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp22_ = iterator;
+ _tmp23_ = gee_iterator_next ((GeeIterator*) _tmp22_);
+ _vala_assert (_tmp23_, "iterator.next ()");
+ _tmp24_ = iterator;
+ _tmp25_ = gee_iterator_get ((GeeIterator*) _tmp24_);
+ _tmp26_ = (gchar*) _tmp25_;
+ _vala_assert (g_strcmp0 (_tmp26_, "five") == 0, "iterator.get () == \"five\"");
+ _g_free0 (_tmp26_);
+ _tmp27_ = iterator;
+ gee_iterator_remove ((GeeIterator*) _tmp27_);
+ _tmp28_ = test_set;
+ _tmp29_ = gee_collection_contains ((GeeCollection*) _tmp28_, "five");
+ _vala_assert (!_tmp29_, "!test_set.contains (\"five\")");
+ _tmp30_ = iterator;
+ _tmp31_ = gee_iterator_has_next ((GeeIterator*) _tmp30_);
+ _vala_assert (_tmp31_, "iterator.has_next ()");
+ _tmp32_ = iterator;
+ _tmp33_ = gee_bidir_iterator_has_previous (_tmp32_);
+ _vala_assert (!_tmp33_, "!iterator.has_previous ()");
+ _tmp34_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp34_) {
+ GeeBidirIterator* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ gchar* _tmp37_;
+ _tmp35_ = iterator;
+ _tmp36_ = gee_iterator_get ((GeeIterator*) _tmp35_);
+ _tmp37_ = (gchar*) _tmp36_;
+ _g_free0 (_tmp37_);
+ exit (0);
+ }
+ _tmp38_ = iterator;
+ _tmp39_ = gee_bidir_iterator_previous (_tmp38_);
+ _vala_assert (!_tmp39_, "!iterator.previous ()");
+ _tmp40_ = iterator;
+ _tmp41_ = gee_iterator_next ((GeeIterator*) _tmp40_);
+ _vala_assert (_tmp41_, "iterator.next ()");
+ _tmp42_ = iterator;
+ _tmp43_ = gee_iterator_get ((GeeIterator*) _tmp42_);
+ _tmp44_ = (gchar*) _tmp43_;
+ _vala_assert (g_strcmp0 (_tmp44_, "four") == 0, "iterator.get () == \"four\"");
+ _g_free0 (_tmp44_);
+ _tmp45_ = iterator;
+ _tmp46_ = gee_iterator_next ((GeeIterator*) _tmp45_);
+ _vala_assert (_tmp46_, "iterator.next ()");
+ _tmp47_ = iterator;
+ _tmp48_ = gee_iterator_get ((GeeIterator*) _tmp47_);
+ _tmp49_ = (gchar*) _tmp48_;
+ _vala_assert (g_strcmp0 (_tmp49_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp49_);
+ _tmp50_ = iterator;
+ gee_iterator_remove ((GeeIterator*) _tmp50_);
+ _tmp51_ = test_set;
+ _tmp52_ = gee_collection_contains ((GeeCollection*) _tmp51_, "one");
+ _vala_assert (!_tmp52_, "!test_set.contains (\"one\")");
+ _tmp53_ = iterator;
+ _tmp54_ = gee_iterator_has_next ((GeeIterator*) _tmp53_);
+ _vala_assert (_tmp54_, "iterator.has_next ()");
+ _tmp55_ = iterator;
+ _tmp56_ = gee_bidir_iterator_has_previous (_tmp55_);
+ _vala_assert (_tmp56_, "iterator.has_previous ()");
+ _tmp57_ = iterator;
+ _tmp58_ = gee_bidir_iterator_previous (_tmp57_);
+ _vala_assert (_tmp58_, "iterator.previous ()");
+ _tmp59_ = iterator;
+ _tmp60_ = gee_iterator_get ((GeeIterator*) _tmp59_);
+ _tmp61_ = (gchar*) _tmp60_;
+ _vala_assert (g_strcmp0 (_tmp61_, "four") == 0, "iterator.get () == \"four\"");
+ _g_free0 (_tmp61_);
+ _g_object_unref0 (iterator);
+ _g_object_unref0 (test_set);
+}
+
+
+static void _bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator_gee_test_case_test_method (gpointer self) {
+ bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator (self);
+}
+
+
+BidirSortedSetTestsBidirSubSetTests* bidir_sorted_set_tests_bidir_sub_set_tests_construct (GType object_type, BidirSortedSetTests* test, SortedSetTestsSubSetTestsType type) {
+ BidirSortedSetTestsBidirSubSetTests * self = NULL;
+ SortedSetTestsSubSetTestsType _tmp0_;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_;
+ BidirSortedSetTests* _tmp4_;
+ BidirSortedSetTests* _tmp5_;
+ SortedSetTestsSubSetTestsType _tmp6_;
+ g_return_val_if_fail (test != NULL, NULL);
+ _tmp0_ = type;
+ _tmp1_ = sorted_set_tests_sub_set_tests_type_to_string (_tmp0_);
+ _tmp2_ = g_strdup_printf ("%s Subset", _tmp1_);
+ _tmp3_ = _tmp2_;
+ self = (BidirSortedSetTestsBidirSubSetTests*) gee_test_case_construct (object_type, _tmp3_);
+ _g_free0 (_tmp3_);
+ _tmp4_ = test;
+ _tmp5_ = _g_object_ref0 (_tmp4_);
+ _g_object_unref0 (self->priv->test);
+ self->priv->test = _tmp5_;
+ _tmp6_ = type;
+ self->priv->type = _tmp6_;
+ gee_test_case_add_test ((GeeTestCase*) self, "[BidirSortedSet] bi-directional iterator", _bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ return self;
+}
+
+
+BidirSortedSetTestsBidirSubSetTests* bidir_sorted_set_tests_bidir_sub_set_tests_new (BidirSortedSetTests* test, SortedSetTestsSubSetTestsType type) {
+ return bidir_sorted_set_tests_bidir_sub_set_tests_construct (BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, test, type);
+}
+
+
+static void bidir_sorted_set_tests_bidir_sub_set_tests_real_set_up (GeeTestCase* base) {
+ BidirSortedSetTestsBidirSubSetTests * self;
+ BidirSortedSetTests* _tmp0_;
+ BidirSortedSetTests* _tmp1_;
+ GeeCollection* _tmp2_;
+ GeeBidirSortedSet* _tmp3_;
+ SortedSetTestsSubSetTestsType _tmp4_;
+ self = (BidirSortedSetTestsBidirSubSetTests*) base;
+ _tmp0_ = self->priv->test;
+ gee_test_case_set_up ((GeeTestCase*) _tmp0_);
+ _tmp1_ = self->priv->test;
+ _tmp2_ = ((CollectionTests*) _tmp1_)->test_collection;
+ _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp2_) : NULL);
+ _g_object_unref0 (self->priv->master);
+ self->priv->master = _tmp3_;
+ _tmp4_ = self->priv->type;
+ switch (_tmp4_) {
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
+ {
+ GeeBidirSortedSet* _tmp5_;
+ GeeSortedSet* _tmp6_ = NULL;
+ _tmp5_ = self->priv->master;
+ _tmp6_ = gee_sorted_set_head_set ((GeeSortedSet*) _tmp5_, "one");
+ _g_object_unref0 (self->priv->subset);
+ self->priv->subset = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp6_) : NULL;
+ break;
+ }
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
+ {
+ GeeBidirSortedSet* _tmp7_;
+ GeeSortedSet* _tmp8_ = NULL;
+ _tmp7_ = self->priv->master;
+ _tmp8_ = gee_sorted_set_tail_set ((GeeSortedSet*) _tmp7_, "six");
+ _g_object_unref0 (self->priv->subset);
+ self->priv->subset = G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp8_) : NULL;
+ break;
+ }
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
+ {
+ GeeBidirSortedSet* _tmp9_;
+ GeeSortedSet* _tmp10_ = NULL;
+ _tmp9_ = self->priv->master;
+ _tmp10_ = gee_sorted_set_sub_set ((GeeSortedSet*) _tmp9_, "four", "three");
+ _g_object_unref0 (self->priv->subset);
+ self->priv->subset = G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp10_) : NULL;
+ break;
+ }
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
+ {
+ GeeBidirSortedSet* _tmp11_;
+ GeeSortedSet* _tmp12_ = NULL;
+ _tmp11_ = self->priv->master;
+ _tmp12_ = gee_sorted_set_sub_set ((GeeSortedSet*) _tmp11_, "three", "four");
+ _g_object_unref0 (self->priv->subset);
+ self->priv->subset = G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, GEE_TYPE_BIDIR_SORTED_SET) ? ((GeeBidirSortedSet*) _tmp12_) : NULL;
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+}
+
+
+static void bidir_sorted_set_tests_bidir_sub_set_tests_real_tear_down (GeeTestCase* base) {
+ BidirSortedSetTestsBidirSubSetTests * self;
+ BidirSortedSetTests* _tmp0_;
+ self = (BidirSortedSetTestsBidirSubSetTests*) base;
+ _tmp0_ = self->priv->test;
+ gee_test_case_tear_down ((GeeTestCase*) _tmp0_);
+}
+
+
+void bidir_sorted_set_tests_bidir_sub_set_tests_test_bidir_iterator (BidirSortedSetTestsBidirSubSetTests* self) {
+ GeeBidirSortedSet* _tmp0_;
+ gboolean _tmp1_ = FALSE;
+ GeeBidirSortedSet* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeBidirSortedSet* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeBidirSortedSet* _tmp6_;
+ gboolean _tmp7_ = FALSE;
+ GeeBidirSortedSet* _tmp8_;
+ gboolean _tmp9_ = FALSE;
+ GeeBidirSortedSet* _tmp10_;
+ gboolean _tmp11_ = FALSE;
+ GeeBidirSortedSet* _tmp12_;
+ gint _tmp13_;
+ gint _tmp14_;
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ SortedSetTestsSubSetTestsType _tmp15_;
+ guint i;
+ guint _tmp38_;
+ gchar** _tmp39_;
+ gint _tmp39__length1;
+ GeeBidirSortedSet* _tmp40_;
+ GeeBidirIterator* _tmp41_ = NULL;
+ GeeBidirIterator* iter;
+ SortedSetTestsSubSetTestsType _tmp42_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->master;
+ _tmp1_ = gee_collection_add ((GeeCollection*) _tmp0_, "one");
+ _vala_assert (_tmp1_, "master.add (\"one\")");
+ _tmp2_ = self->priv->master;
+ _tmp3_ = gee_collection_add ((GeeCollection*) _tmp2_, "two");
+ _vala_assert (_tmp3_, "master.add (\"two\")");
+ _tmp4_ = self->priv->master;
+ _tmp5_ = gee_collection_add ((GeeCollection*) _tmp4_, "three");
+ _vala_assert (_tmp5_, "master.add (\"three\")");
+ _tmp6_ = self->priv->master;
+ _tmp7_ = gee_collection_add ((GeeCollection*) _tmp6_, "four");
+ _vala_assert (_tmp7_, "master.add (\"four\")");
+ _tmp8_ = self->priv->master;
+ _tmp9_ = gee_collection_add ((GeeCollection*) _tmp8_, "five");
+ _vala_assert (_tmp9_, "master.add (\"five\")");
+ _tmp10_ = self->priv->master;
+ _tmp11_ = gee_collection_add ((GeeCollection*) _tmp10_, "six");
+ _vala_assert (_tmp11_, "master.add (\"six\")");
+ _tmp12_ = self->priv->master;
+ _tmp13_ = gee_collection_get_size ((GeeCollection*) _tmp12_);
+ _tmp14_ = _tmp13_;
+ _vala_assert (_tmp14_ == 6, "master.size == 6");
+ _tmp15_ = self->priv->type;
+ switch (_tmp15_) {
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
+ {
+ gchar* _tmp16_;
+ gchar* _tmp17_;
+ gchar** _tmp18_ = NULL;
+ _tmp16_ = g_strdup ("five");
+ _tmp17_ = g_strdup ("four");
+ _tmp18_ = g_new0 (gchar*, 2 + 1);
+ _tmp18_[0] = _tmp16_;
+ _tmp18_[1] = _tmp17_;
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp18_;
+ contains_length1 = 2;
+ _contains_size_ = contains_length1;
+ break;
+ }
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
+ {
+ gchar* _tmp19_;
+ gchar* _tmp20_;
+ gchar* _tmp21_;
+ gchar** _tmp22_ = NULL;
+ _tmp19_ = g_strdup ("six");
+ _tmp20_ = g_strdup ("three");
+ _tmp21_ = g_strdup ("two");
+ _tmp22_ = g_new0 (gchar*, 3 + 1);
+ _tmp22_[0] = _tmp19_;
+ _tmp22_[1] = _tmp20_;
+ _tmp22_[2] = _tmp21_;
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp22_;
+ contains_length1 = 3;
+ _contains_size_ = contains_length1;
+ break;
+ }
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
+ {
+ gchar* _tmp23_;
+ gchar* _tmp24_;
+ gchar* _tmp25_;
+ gchar** _tmp26_ = NULL;
+ _tmp23_ = g_strdup ("four");
+ _tmp24_ = g_strdup ("one");
+ _tmp25_ = g_strdup ("six");
+ _tmp26_ = g_new0 (gchar*, 3 + 1);
+ _tmp26_[0] = _tmp23_;
+ _tmp26_[1] = _tmp24_;
+ _tmp26_[2] = _tmp25_;
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp26_;
+ contains_length1 = 3;
+ _contains_size_ = contains_length1;
+ break;
+ }
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
+ {
+ gchar** _tmp27_ = NULL;
+ _tmp27_ = g_new0 (gchar*, 0 + 1);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp27_;
+ contains_length1 = 0;
+ _contains_size_ = contains_length1;
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ i = (guint) 0;
+ {
+ GeeBidirSortedSet* _tmp28_;
+ GeeIterator* _tmp29_ = NULL;
+ GeeIterator* _e_it;
+ _tmp28_ = self->priv->subset;
+ _tmp29_ = gee_iterable_iterator ((GeeIterable*) _tmp28_);
+ _e_it = _tmp29_;
+ while (TRUE) {
+ GeeIterator* _tmp30_;
+ gboolean _tmp31_ = FALSE;
+ GeeIterator* _tmp32_;
+ gpointer _tmp33_ = NULL;
+ gchar* e;
+ const gchar* _tmp34_;
+ gchar** _tmp35_;
+ gint _tmp35__length1;
+ guint _tmp36_;
+ const gchar* _tmp37_;
+ _tmp30_ = _e_it;
+ _tmp31_ = gee_iterator_next (_tmp30_);
+ if (!_tmp31_) {
+ break;
+ }
+ _tmp32_ = _e_it;
+ _tmp33_ = gee_iterator_get (_tmp32_);
+ e = (gchar*) _tmp33_;
+ _tmp34_ = e;
+ _tmp35_ = contains;
+ _tmp35__length1 = contains_length1;
+ _tmp36_ = i;
+ i = _tmp36_ + 1;
+ _tmp37_ = _tmp35_[_tmp36_];
+ _vala_assert (g_strcmp0 (_tmp34_, _tmp37_) == 0, "e == contains[i++]");
+ _g_free0 (e);
+ }
+ _g_object_unref0 (_e_it);
+ }
+ _tmp38_ = i;
+ _tmp39_ = contains;
+ _tmp39__length1 = contains_length1;
+ _vala_assert (_tmp38_ == ((guint) _tmp39__length1), "i == contains.length");
+ _tmp40_ = self->priv->subset;
+ _tmp41_ = gee_bidir_sorted_set_bidir_iterator (_tmp40_);
+ iter = _tmp41_;
+ _tmp42_ = self->priv->type;
+ if (_tmp42_ != SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY) {
+ GeeBidirIterator* _tmp43_;
+ gboolean _tmp44_ = FALSE;
+ GeeBidirIterator* _tmp45_;
+ gpointer _tmp46_ = NULL;
+ gchar* _tmp47_;
+ gchar** _tmp48_;
+ gint _tmp48__length1;
+ gchar** _tmp49_;
+ gint _tmp49__length1;
+ const gchar* _tmp50_;
+ GeeBidirIterator* _tmp51_;
+ gboolean _tmp52_ = FALSE;
+ GeeBidirIterator* _tmp53_;
+ gpointer _tmp54_ = NULL;
+ gchar* _tmp55_;
+ gchar** _tmp56_;
+ gint _tmp56__length1;
+ const gchar* _tmp57_;
+ GeeBidirIterator* _tmp58_;
+ gboolean _tmp59_ = FALSE;
+ GeeBidirIterator* _tmp60_;
+ gboolean _tmp61_ = FALSE;
+ GeeBidirIterator* _tmp62_;
+ gpointer _tmp63_ = NULL;
+ gchar* _tmp64_;
+ gchar** _tmp65_;
+ gint _tmp65__length1;
+ const gchar* _tmp66_;
+ GeeBidirIterator* _tmp67_;
+ gboolean _tmp68_ = FALSE;
+ GeeBidirIterator* _tmp69_;
+ GeeBidirIterator* _tmp70_;
+ gboolean _tmp71_ = FALSE;
+ SortedSetTestsSubSetTestsType _tmp72_;
+ GeeBidirIterator* _tmp77_;
+ gboolean _tmp78_ = FALSE;
+ GeeBidirIterator* _tmp79_;
+ gpointer _tmp80_ = NULL;
+ gchar* _tmp81_;
+ gchar** _tmp82_;
+ gint _tmp82__length1;
+ const gchar* _tmp83_;
+ _tmp43_ = iter;
+ _tmp44_ = gee_bidir_iterator_last (_tmp43_);
+ _vala_assert (_tmp44_, "iter.last ()");
+ _tmp45_ = iter;
+ _tmp46_ = gee_iterator_get ((GeeIterator*) _tmp45_);
+ _tmp47_ = (gchar*) _tmp46_;
+ _tmp48_ = contains;
+ _tmp48__length1 = contains_length1;
+ _tmp49_ = contains;
+ _tmp49__length1 = contains_length1;
+ _tmp50_ = _tmp48_[_tmp49__length1 - 1];
+ _vala_assert (g_strcmp0 (_tmp47_, _tmp50_) == 0, "iter.get () == contains[contains.length - 1]");
+ _g_free0 (_tmp47_);
+ _tmp51_ = iter;
+ _tmp52_ = gee_bidir_iterator_first (_tmp51_);
+ _vala_assert (_tmp52_, "iter.first ()");
+ _tmp53_ = iter;
+ _tmp54_ = gee_iterator_get ((GeeIterator*) _tmp53_);
+ _tmp55_ = (gchar*) _tmp54_;
+ _tmp56_ = contains;
+ _tmp56__length1 = contains_length1;
+ _tmp57_ = _tmp56_[0];
+ _vala_assert (g_strcmp0 (_tmp55_, _tmp57_) == 0, "iter.get () == contains[0]");
+ _g_free0 (_tmp55_);
+ _tmp58_ = iter;
+ _tmp59_ = gee_iterator_has_next ((GeeIterator*) _tmp58_);
+ _vala_assert (_tmp59_, "iter.has_next ()");
+ _tmp60_ = iter;
+ _tmp61_ = gee_iterator_next ((GeeIterator*) _tmp60_);
+ _vala_assert (_tmp61_, "iter.next ()");
+ _tmp62_ = iter;
+ _tmp63_ = gee_iterator_get ((GeeIterator*) _tmp62_);
+ _tmp64_ = (gchar*) _tmp63_;
+ _tmp65_ = contains;
+ _tmp65__length1 = contains_length1;
+ _tmp66_ = _tmp65_[1];
+ _vala_assert (g_strcmp0 (_tmp64_, _tmp66_) == 0, "iter.get () == contains[1]");
+ _g_free0 (_tmp64_);
+ _tmp67_ = iter;
+ _tmp68_ = gee_bidir_iterator_has_previous (_tmp67_);
+ _vala_assert (_tmp68_, "iter.has_previous ()");
+ _tmp69_ = iter;
+ gee_iterator_remove ((GeeIterator*) _tmp69_);
+ _tmp70_ = iter;
+ _tmp71_ = gee_bidir_iterator_has_previous (_tmp70_);
+ _vala_assert (_tmp71_, "iter.has_previous ()");
+ _tmp72_ = self->priv->type;
+ if (_tmp72_ != SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD) {
+ GeeBidirIterator* _tmp73_;
+ gboolean _tmp74_ = FALSE;
+ _tmp73_ = iter;
+ _tmp74_ = gee_iterator_has_next ((GeeIterator*) _tmp73_);
+ _vala_assert (_tmp74_, "iter.has_next ()");
+ } else {
+ GeeBidirIterator* _tmp75_;
+ gboolean _tmp76_ = FALSE;
+ _tmp75_ = iter;
+ _tmp76_ = gee_iterator_has_next ((GeeIterator*) _tmp75_);
+ _vala_assert (!_tmp76_, "!iter.has_next ()");
+ }
+ _tmp77_ = iter;
+ _tmp78_ = gee_bidir_iterator_previous (_tmp77_);
+ _vala_assert (_tmp78_, "iter.previous ()");
+ _tmp79_ = iter;
+ _tmp80_ = gee_iterator_get ((GeeIterator*) _tmp79_);
+ _tmp81_ = (gchar*) _tmp80_;
+ _tmp82_ = contains;
+ _tmp82__length1 = contains_length1;
+ _tmp83_ = _tmp82_[0];
+ _vala_assert (g_strcmp0 (_tmp81_, _tmp83_) == 0, "iter.get () == contains[0]");
+ _g_free0 (_tmp81_);
+ } else {
+ GeeBidirIterator* _tmp84_;
+ gboolean _tmp85_ = FALSE;
+ gboolean _tmp86_ = FALSE;
+ _tmp84_ = iter;
+ _tmp85_ = gee_bidir_iterator_first (_tmp84_);
+ _vala_assert (!_tmp85_, "!iter.first ()");
+ _tmp86_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp86_) {
+ GeeBidirIterator* _tmp87_;
+ _tmp87_ = iter;
+ gee_iterator_remove ((GeeIterator*) _tmp87_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ }
+ _g_object_unref0 (iter);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+static void bidir_sorted_set_tests_bidir_sub_set_tests_class_init (BidirSortedSetTestsBidirSubSetTestsClass * klass) {
+ bidir_sorted_set_tests_bidir_sub_set_tests_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (BidirSortedSetTestsBidirSubSetTestsPrivate));
+ GEE_TEST_CASE_CLASS (klass)->set_up = bidir_sorted_set_tests_bidir_sub_set_tests_real_set_up;
+ GEE_TEST_CASE_CLASS (klass)->tear_down = bidir_sorted_set_tests_bidir_sub_set_tests_real_tear_down;
+ G_OBJECT_CLASS (klass)->finalize = bidir_sorted_set_tests_bidir_sub_set_tests_finalize;
+}
+
+
+static void bidir_sorted_set_tests_bidir_sub_set_tests_instance_init (BidirSortedSetTestsBidirSubSetTests * self) {
+ self->priv = BIDIR_SORTED_SET_TESTS_BIDIR_SUB_SET_TESTS_GET_PRIVATE (self);
+}
+
+
+static void bidir_sorted_set_tests_bidir_sub_set_tests_finalize (GObject* obj) {
+ BidirSortedSetTestsBidirSubSetTests * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIDIR_SORTED_SET_TESTS_TYPE_BIDIR_SUB_SET_TESTS, BidirSortedSetTestsBidirSubSetTests);
+ _g_object_unref0 (self->priv->master);
+ _g_object_unref0 (self->priv->subset);
+ _g_object_unref0 (self->priv->test);
+ G_OBJECT_CLASS (bidir_sorted_set_tests_bidir_sub_set_tests_parent_class)->finalize (obj);
+}
+
+
+GType bidir_sorted_set_tests_bidir_sub_set_tests_get_type (void) {
+ static volatile gsize bidir_sorted_set_tests_bidir_sub_set_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&bidir_sorted_set_tests_bidir_sub_set_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (BidirSortedSetTestsBidirSubSetTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bidir_sorted_set_tests_bidir_sub_set_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BidirSortedSetTestsBidirSubSetTests), 0, (GInstanceInitFunc) bidir_sorted_set_tests_bidir_sub_set_tests_instance_init, NULL };
+ GType bidir_sorted_set_tests_bidir_sub_set_tests_type_id;
+ bidir_sorted_set_tests_bidir_sub_set_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "BidirSortedSetTestsBidirSubSetTests", &g_define_type_info, 0);
+ g_once_init_leave (&bidir_sorted_set_tests_bidir_sub_set_tests_type_id__volatile, bidir_sorted_set_tests_bidir_sub_set_tests_type_id);
+ }
+ return bidir_sorted_set_tests_bidir_sub_set_tests_type_id__volatile;
+}
+
+
+static void bidir_sorted_set_tests_class_init (BidirSortedSetTestsClass * klass) {
+ bidir_sorted_set_tests_parent_class = g_type_class_peek_parent (klass);
+}
+
+
+static void bidir_sorted_set_tests_instance_init (BidirSortedSetTests * self) {
+}
+
+
+GType bidir_sorted_set_tests_get_type (void) {
+ static volatile gsize bidir_sorted_set_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&bidir_sorted_set_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (BidirSortedSetTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bidir_sorted_set_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BidirSortedSetTests), 0, (GInstanceInitFunc) bidir_sorted_set_tests_instance_init, NULL };
+ GType bidir_sorted_set_tests_type_id;
+ bidir_sorted_set_tests_type_id = g_type_register_static (TYPE_SORTED_SET_TESTS, "BidirSortedSetTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&bidir_sorted_set_tests_type_id__volatile, bidir_sorted_set_tests_type_id);
+ }
+ return bidir_sorted_set_tests_type_id__volatile;
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/tests/testbidirsortedset.vala b/tests/testbidirsortedset.vala
new file mode 100644
index 0000000..df5da60
--- /dev/null
+++ b/tests/testbidirsortedset.vala
@@ -0,0 +1,275 @@
+/* testbidirsortedset.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+using GLib;
+using Gee;
+
+public abstract class BidirSortedSetTests : SortedSetTests {
+ public BidirSortedSetTests(string name) {
+ base (name);
+ add_test ("[SortedSet] bi-directional iterators can go backward",
+ test_bidir_iterator_can_go_backward);
+ add_test ("[SortedSet] bi-directional iterators are mutable",
+ test_mutable_bidir_iterator);
+ add_test ("[SortedSet] bi-directional iterators can to beginning",
+ test_bidir_iterator_first);
+ add_test ("[SortedSet] bi-directional iterators can to end",
+ test_bidir_iterator_last);
+ get_suite ().add_suite (new BidirSubSetTests (this, SortedSetTests.SubSetTests.Type.HEAD).get_suite ());
+ get_suite ().add_suite (new BidirSubSetTests (this, SortedSetTests.SubSetTests.Type.TAIL).get_suite ());
+ get_suite ().add_suite (new BidirSubSetTests (this, SortedSetTests.SubSetTests.Type.SUB).get_suite ());
+ get_suite ().add_suite (new BidirSubSetTests (this, SortedSetTests.SubSetTests.Type.EMPTY).get_suite ());
+ }
+
+ public void test_bidir_iterator_can_go_backward () {
+ var test_set = test_collection as BidirSortedSet<string>;
+
+ var iterator = test_set.bidir_iterator ();
+ assert (!iterator.has_previous ());
+
+ assert (test_set.add ("one"));
+ assert (test_set.add ("two"));
+ assert (test_set.add ("three"));
+ assert (test_set.add ("four"));
+ assert (test_set.add ("five"));
+ assert (test_set.add ("six"));
+
+ iterator = test_set.bidir_iterator ();
+ assert (iterator.next ());
+ assert (iterator.get () == "five");
+ assert (!iterator.has_previous ());
+ assert (iterator.next ());
+ assert (iterator.get () == "four");
+ assert (iterator.has_previous ());
+ assert (iterator.next ());
+ assert (iterator.get () == "one");
+ assert (iterator.has_previous ());
+ assert (iterator.next ());
+ assert (iterator.get () == "six");
+ assert (iterator.has_previous ());
+ assert (iterator.next ());
+ assert (iterator.get () == "three");
+ assert (iterator.has_previous ());
+ assert (iterator.next ());
+ assert (iterator.get () == "two");
+ assert (iterator.has_previous ());
+ assert (!iterator.next ());
+ assert (iterator.previous ());
+ assert (iterator.get () == "three");
+ assert (iterator.previous ());
+ assert (iterator.get () == "six");
+ assert (iterator.previous ());
+ assert (iterator.get () == "one");
+ assert (iterator.previous ());
+ assert (iterator.get () == "four");
+ assert (iterator.previous ());
+ assert (iterator.get () == "five");
+ assert (!iterator.previous ());
+ assert (iterator.get () == "five");
+ }
+
+ public void test_bidir_iterator_first () {
+ var test_set = test_collection as BidirSortedSet<string>;
+
+ var iterator = test_set.bidir_iterator ();
+
+ assert (!iterator.first ());
+
+ assert (test_set.add ("one"));
+ assert (test_set.add ("two"));
+ assert (test_set.add ("three"));
+ assert (test_set.add ("four"));
+ assert (test_set.add ("five"));
+ assert (test_set.add ("six"));
+
+ iterator = test_set.bidir_iterator ();
+ assert (iterator.last ());
+ assert (iterator.get () == "two");
+ assert (iterator.first ());
+ assert (iterator.get () == "five");
+ }
+
+ public void test_bidir_iterator_last () {
+ var test_set = test_collection as BidirSortedSet<string>;
+
+ var iterator = test_set.bidir_iterator ();
+
+ assert (!iterator.last ());
+
+ assert (test_set.add ("one"));
+ assert (test_set.add ("two"));
+ assert (test_set.add ("three"));
+ assert (test_set.add ("four"));
+ assert (test_set.add ("five"));
+ assert (test_set.add ("six"));
+
+ iterator = test_set.bidir_iterator ();
+ assert (iterator.last ());
+ assert (iterator.get () == "two");
+ }
+
+ public void test_mutable_bidir_iterator () {
+ var test_set = test_collection as BidirSortedSet<string>;
+
+ var iterator = test_set.bidir_iterator ();
+ assert (!iterator.has_previous ());
+
+ assert (test_set.add ("one"));
+ assert (test_set.add ("two"));
+ assert (test_set.add ("three"));
+ assert (test_set.add ("four"));
+ assert (test_set.add ("five"));
+ assert (test_set.add ("six"));
+
+ iterator = test_set.bidir_iterator ();
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ iterator.remove ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+
+ assert (iterator.next ());
+ assert (iterator.get () == "five");
+ iterator.remove ();
+ assert (!test_set.contains ("five"));
+ assert (iterator.has_next ());
+ assert (!iterator.has_previous ());
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ iterator.get ();
+ Posix.exit (0);
+ }
+ assert (!iterator.previous ());
+
+ assert (iterator.next ());
+ assert (iterator.get () == "four");
+ assert (iterator.next ());
+ assert (iterator.get () == "one");
+ iterator.remove ();
+ assert (!test_set.contains ("one"));
+ assert (iterator.has_next ());
+ assert (iterator.has_previous ());
+ assert (iterator.previous ());
+ assert (iterator.get () == "four");
+ }
+
+ public class BidirSubSetTests : Gee.TestCase {
+ private BidirSortedSet<string> master;
+ private BidirSortedSet<string> subset;
+ private BidirSortedSetTests test;
+ private SortedSetTests.SubSetTests.Type type;
+
+ public BidirSubSetTests(BidirSortedSetTests test, SortedSetTests.SubSetTests.Type type) {
+ base ("%s Subset".printf (type.to_string ()));
+ this.test = test;
+ this.type = type;
+ add_test ("[BidirSortedSet] bi-directional iterator", test_bidir_iterator);
+ }
+
+ public override void set_up () {
+ test.set_up ();
+ master = test.test_collection as BidirSortedSet<string>;
+ switch (type) {
+ case SortedSetTests.SubSetTests.Type.HEAD:
+ subset = master.head_set ("one") as BidirSortedSet<string>; break;
+ case SortedSetTests.SubSetTests.Type.TAIL:
+ subset = master.tail_set ("six") as BidirSortedSet<string>; break;
+ case SortedSetTests.SubSetTests.Type.SUB:
+ subset = master.sub_set ("four", "three") as BidirSortedSet<string>; break;
+ case SortedSetTests.SubSetTests.Type.EMPTY:
+ subset = master.sub_set ("three", "four") as BidirSortedSet<string>; break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public override void tear_down () {
+ test.tear_down ();
+ }
+
+ public void test_bidir_iterator () {
+ assert (master.add ("one"));
+ assert (master.add ("two"));
+ assert (master.add ("three"));
+ assert (master.add ("four"));
+ assert (master.add ("five"));
+ assert (master.add ("six"));
+ assert (master.size == 6);
+
+ string[] contains;
+ switch (type) {
+ case SortedSetTests.SubSetTests.Type.HEAD:
+ contains = {"five", "four"};
+ break;
+ case SortedSetTests.SubSetTests.Type.TAIL:
+ contains = {"six", "three", "two"};
+ break;
+ case SortedSetTests.SubSetTests.Type.SUB:
+ contains = {"four", "one", "six"};
+ break;
+ case SortedSetTests.SubSetTests.Type.EMPTY:
+ contains = {};
+ break;
+ default:
+ assert_not_reached ();
+ }
+
+ uint i = 0;
+ foreach (var e in subset) {
+ assert (e == contains[i++]);
+ }
+ assert (i == contains.length);
+
+
+ var iter = subset.bidir_iterator ();
+ if (type != SortedSetTests.SubSetTests.Type.EMPTY) {
+ assert (iter.last ());
+ assert (iter.get () == contains[contains.length - 1]);
+ assert (iter.first ());
+
+ assert (iter.get () == contains[0]);
+ assert (iter.has_next ());
+ assert (iter.next ());
+ assert (iter.get () == contains[1]);
+ assert (iter.has_previous ());
+ iter.remove ();
+ assert (iter.has_previous ());
+ if (type != SortedSetTests.SubSetTests.Type.HEAD)
+ assert (iter.has_next ());
+ else
+ assert (!iter.has_next ());
+ assert (iter.previous ());
+ assert (iter.get () == contains[0]);
+ } else {
+ assert (!iter.first ());
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ iter.remove ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ }
+ }
+ }
+}
+
diff --git a/tests/testcase.c b/tests/testcase.c
index 2418301..b863a0b 100644
--- a/tests/testcase.c
+++ b/tests/testcase.c
@@ -115,17 +115,17 @@ enum {
GEE_TEST_CASE_DUMMY_PROPERTY
};
GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-static GeeTestCaseAdaptor* gee_test_case_adaptor_new (const gchar* name, GeeTestCaseTestMethod test, void* test_target, GeeTestCase* test_case);
-static GeeTestCaseAdaptor* gee_test_case_adaptor_construct (GType object_type, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GeeTestCase* test_case);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
+static GeeTestCaseAdaptor* gee_test_case_adaptor_new (const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify, GeeTestCase* test_case);
+static GeeTestCaseAdaptor* gee_test_case_adaptor_construct (GType object_type, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify, GeeTestCase* test_case);
static void _vala_array_add1 (GeeTestCaseAdaptor*** array, int* length, int* size, GeeTestCaseAdaptor* value);
static const gchar* gee_test_case_adaptor_get_name (GeeTestCaseAdaptor* self);
static void gee_test_case_adaptor_set_up (GeeTestCaseAdaptor* self, void* fixture);
-static void _gee_test_case_adaptor_set_up_gtest_func (void* fixture, gpointer self);
+static void _gee_test_case_adaptor_set_up_gtest_fixture_func (void* fixture, gpointer self);
static void gee_test_case_adaptor_run (GeeTestCaseAdaptor* self, void* fixture);
-static void _gee_test_case_adaptor_run_gtest_func (void* fixture, gpointer self);
+static void _gee_test_case_adaptor_run_gtest_fixture_func (void* fixture, gpointer self);
static void gee_test_case_adaptor_tear_down (GeeTestCaseAdaptor* self, void* fixture);
-static void _gee_test_case_adaptor_tear_down_gtest_func (void* fixture, gpointer self);
+static void _gee_test_case_adaptor_tear_down_gtest_fixture_func (void* fixture, gpointer self);
void gee_test_case_set_up (GeeTestCase* self);
static void gee_test_case_real_set_up (GeeTestCase* self);
void gee_test_case_tear_down (GeeTestCase* self);
@@ -170,25 +170,26 @@ static void _vala_array_add1 (GeeTestCaseAdaptor*** array, int* length, int* siz
}
-static void _gee_test_case_adaptor_set_up_gtest_func (void* fixture, gpointer self) {
+static void _gee_test_case_adaptor_set_up_gtest_fixture_func (void* fixture, gpointer self) {
gee_test_case_adaptor_set_up (self, fixture);
}
-static void _gee_test_case_adaptor_run_gtest_func (void* fixture, gpointer self) {
+static void _gee_test_case_adaptor_run_gtest_fixture_func (void* fixture, gpointer self) {
gee_test_case_adaptor_run (self, fixture);
}
-static void _gee_test_case_adaptor_tear_down_gtest_func (void* fixture, gpointer self) {
+static void _gee_test_case_adaptor_tear_down_gtest_fixture_func (void* fixture, gpointer self) {
gee_test_case_adaptor_tear_down (self, fixture);
}
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target) {
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify) {
const gchar* _tmp0_;
GeeTestCaseTestMethod _tmp1_;
void* _tmp1__target;
+ GDestroyNotify _tmp1__target_destroy_notify;
GeeTestCaseAdaptor* _tmp2_;
GeeTestCaseAdaptor* adaptor;
GeeTestCaseAdaptor** _tmp3_;
@@ -203,7 +204,9 @@ void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTe
_tmp0_ = name;
_tmp1_ = test;
_tmp1__target = test_target;
- _tmp2_ = gee_test_case_adaptor_new (_tmp0_, _tmp1_, _tmp1__target, self);
+ _tmp1__target_destroy_notify = test_target_destroy_notify;
+ test_target_destroy_notify = NULL;
+ _tmp2_ = gee_test_case_adaptor_new (_tmp0_, _tmp1_, _tmp1__target, _tmp1__target_destroy_notify, self);
adaptor = _tmp2_;
_tmp3_ = self->priv->adaptors;
_tmp3__length1 = self->priv->adaptors_length1;
@@ -212,9 +215,13 @@ void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTe
_tmp5_ = self->priv->suite;
_tmp6_ = gee_test_case_adaptor_get_name (adaptor);
_tmp7_ = _tmp6_;
- _tmp8_ = g_test_create_case (_tmp7_, (gsize) 0, adaptor, (void (*) (void)) _gee_test_case_adaptor_set_up_gtest_func, (void (*) (void)) _gee_test_case_adaptor_run_gtest_func, (void (*) (void)) _gee_test_case_adaptor_tear_down_gtest_func);
+ _tmp8_ = g_test_create_case (_tmp7_, (gsize) 0, adaptor, _gee_test_case_adaptor_set_up_gtest_fixture_func, _gee_test_case_adaptor_run_gtest_fixture_func, _gee_test_case_adaptor_tear_down_gtest_fixture_func);
g_test_suite_add (_tmp5_, _tmp8_);
_gee_test_case_adaptor_unref0 (adaptor);
+ (test_target_destroy_notify == NULL) ? NULL : (test_target_destroy_notify (test_target), NULL);
+ test = NULL;
+ test_target = NULL;
+ test_target_destroy_notify = NULL;
}
@@ -253,11 +260,12 @@ static gpointer _g_object_ref0 (gpointer self) {
}
-static GeeTestCaseAdaptor* gee_test_case_adaptor_construct (GType object_type, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GeeTestCase* test_case) {
+static GeeTestCaseAdaptor* gee_test_case_adaptor_construct (GType object_type, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify, GeeTestCase* test_case) {
GeeTestCaseAdaptor* self = NULL;
const gchar* _tmp0_;
GeeTestCaseTestMethod _tmp1_;
void* _tmp1__target;
+ GDestroyNotify _tmp1__target_destroy_notify;
GeeTestCase* _tmp2_;
GeeTestCase* _tmp3_;
g_return_val_if_fail (name != NULL, NULL);
@@ -267,23 +275,29 @@ static GeeTestCaseAdaptor* gee_test_case_adaptor_construct (GType object_type, c
gee_test_case_adaptor_set_name (self, _tmp0_);
_tmp1_ = test;
_tmp1__target = test_target;
+ _tmp1__target_destroy_notify = test_target_destroy_notify;
+ test_target_destroy_notify = NULL;
(self->priv->test_target_destroy_notify == NULL) ? NULL : (self->priv->test_target_destroy_notify (self->priv->test_target), NULL);
self->priv->test = NULL;
self->priv->test_target = NULL;
self->priv->test_target_destroy_notify = NULL;
self->priv->test = _tmp1_;
self->priv->test_target = _tmp1__target;
- self->priv->test_target_destroy_notify = NULL;
+ self->priv->test_target_destroy_notify = _tmp1__target_destroy_notify;
_tmp2_ = test_case;
_tmp3_ = _g_object_ref0 (_tmp2_);
_g_object_unref0 (self->priv->test_case);
self->priv->test_case = _tmp3_;
+ (test_target_destroy_notify == NULL) ? NULL : (test_target_destroy_notify (test_target), NULL);
+ test = NULL;
+ test_target = NULL;
+ test_target_destroy_notify = NULL;
return self;
}
-static GeeTestCaseAdaptor* gee_test_case_adaptor_new (const gchar* name, GeeTestCaseTestMethod test, void* test_target, GeeTestCase* test_case) {
- return gee_test_case_adaptor_construct (GEE_TEST_CASE_TYPE_ADAPTOR, name, test, test_target, test_case);
+static GeeTestCaseAdaptor* gee_test_case_adaptor_new (const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify, GeeTestCase* test_case) {
+ return gee_test_case_adaptor_construct (GEE_TEST_CASE_TYPE_ADAPTOR, name, test, test_target, test_target_destroy_notify, test_case);
}
diff --git a/tests/testcase.vala b/tests/testcase.vala
index edcbe04..83a37ae 100644
--- a/tests/testcase.vala
+++ b/tests/testcase.vala
@@ -31,8 +31,8 @@ public abstract class Gee.TestCase : Object {
this.suite = new GLib.TestSuite (name);
}
- public void add_test (string name, TestMethod test) {
- var adaptor = new Adaptor (name, test, this);
+ public void add_test (string name, owned TestMethod test) {
+ var adaptor = new Adaptor (name, (owned)test, this);
this.adaptors += adaptor;
this.suite.add (new GLib.TestCase (adaptor.name,
@@ -52,16 +52,16 @@ public abstract class Gee.TestCase : Object {
}
private class Adaptor {
-
+ [CCode (notify = false)]
public string name { get; private set; }
private TestMethod test;
private TestCase test_case;
public Adaptor (string name,
- TestMethod test,
+ owned TestMethod test,
TestCase test_case) {
this.name = name;
- this.test = test;
+ this.test = (owned)test;
this.test_case = test_case;
}
diff --git a/tests/testcollection.c b/tests/testcollection.c
index 80c1a98..bd9122c 100644
--- a/tests/testcollection.c
+++ b/tests/testcollection.c
@@ -5,6 +5,7 @@
*
* Copyright (C) 2008 Jürg Billeter
* Copyright (C) 2009 Didier Villevalois, Julien Peeters
+ * Copyright (C) 2011-2012 Maciej Piechotka
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -24,6 +25,7 @@
* Jürg Billeter <j@bitron.ch>
* Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
* Julien Peeters <contact@julienpeeters.fr>
+ * Maciej Piechotka <uzytkownik2@gmail.com>
*/
#include <glib.h>
@@ -56,6 +58,10 @@ typedef struct _CollectionTestsClass CollectionTestsClass;
typedef struct _CollectionTestsPrivate CollectionTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _Block1Data Block1Data;
+typedef struct _Block2Data Block2Data;
+typedef struct _Block3Data Block3Data;
+typedef struct _Block4Data Block4Data;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _GeeTestCase {
@@ -80,6 +86,37 @@ struct _CollectionTestsClass {
};
typedef void (*GeeTestCaseTestMethod) (void* user_data);
+struct _Block1Data {
+ int _ref_count_;
+ CollectionTests * self;
+ gint count;
+};
+
+struct _Block2Data {
+ int _ref_count_;
+ CollectionTests * self;
+ gboolean one;
+ gboolean two;
+ gboolean three;
+ gint i;
+};
+
+struct _Block3Data {
+ int _ref_count_;
+ CollectionTests * self;
+ gboolean one;
+ gboolean two;
+ gboolean three;
+};
+
+struct _Block4Data {
+ int _ref_count_;
+ CollectionTests * self;
+ gboolean one;
+ gboolean two;
+ gboolean three;
+};
+
static gpointer collection_tests_parent_class = NULL;
@@ -90,7 +127,7 @@ enum {
};
CollectionTests* collection_tests_construct (GType object_type, const gchar* name);
GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void collection_tests_test_type_correctness (CollectionTests* self);
static void _collection_tests_test_type_correctness_gee_test_case_test_method (gpointer self);
void collection_tests_test_iterator_returns_all_elements_once (CollectionTests* self);
@@ -115,6 +152,52 @@ void collection_tests_test_to_array (CollectionTests* self);
static void _collection_tests_test_to_array_gee_test_case_test_method (gpointer self);
void collection_tests_test_gobject_properties (CollectionTests* self);
static void _collection_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
+void collection_tests_test_fold (CollectionTests* self);
+static void _collection_tests_test_fold_gee_test_case_test_method (gpointer self);
+void collection_tests_test_foreach (CollectionTests* self);
+static void _collection_tests_test_foreach_gee_test_case_test_method (gpointer self);
+void collection_tests_test_map (CollectionTests* self);
+static void _collection_tests_test_map_gee_test_case_test_method (gpointer self);
+void collection_tests_test_scan (CollectionTests* self);
+static void _collection_tests_test_scan_gee_test_case_test_method (gpointer self);
+void collection_tests_test_filter (CollectionTests* self);
+static void _collection_tests_test_filter_gee_test_case_test_method (gpointer self);
+void collection_tests_test_chop (CollectionTests* self);
+static void _collection_tests_test_chop_gee_test_case_test_method (gpointer self);
+gchar** test_data_get_data (int* result_length1);
+guint* test_data_get_drawn_numbers (int* result_length1);
+static gint __lambda3_ (CollectionTests* self, gchar* x, gint y);
+static gpointer ___lambda3__gee_fold_func (gpointer g, gpointer a, gpointer self);
+static gint __lambda4_ (CollectionTests* self, gchar* x, gint y);
+static gpointer ___lambda4__gee_fold_func (gpointer g, gpointer a, gpointer self);
+static gint __lambda5_ (CollectionTests* self, gchar* x, gint y);
+static gpointer ___lambda5__gee_fold_func (gpointer g, gpointer a, gpointer self);
+static Block1Data* block1_data_ref (Block1Data* _data1_);
+static void block1_data_unref (void * _userdata_);
+static gboolean __lambda6_ (Block1Data* _data1_, gchar* x);
+static gboolean ___lambda6__gee_forall_func (gpointer g, gpointer self);
+static gboolean __lambda7_ (Block1Data* _data1_, gchar* x);
+static gboolean ___lambda7__gee_forall_func (gpointer g, gpointer self);
+static gboolean __lambda8_ (Block1Data* _data1_, gchar* x);
+static gboolean ___lambda8__gee_forall_func (gpointer g, gpointer self);
+static Block2Data* block2_data_ref (Block2Data* _data2_);
+static void block2_data_unref (void * _userdata_);
+static gint __lambda9_ (Block2Data* _data2_, gchar* str);
+static gpointer ___lambda9__gee_map_func (gpointer g, gpointer self);
+static gint __lambda10_ (Block2Data* _data2_, gchar* str);
+static gpointer ___lambda10__gee_map_func (gpointer g, gpointer self);
+static Block3Data* block3_data_ref (Block3Data* _data3_);
+static void block3_data_unref (void * _userdata_);
+static gint __lambda11_ (Block3Data* _data3_, gchar* str, gint cur);
+static gpointer ___lambda11__gee_fold_func (gpointer g, gpointer a, gpointer self);
+static gint __lambda12_ (Block3Data* _data3_, gchar* str, gint cur);
+static gpointer ___lambda12__gee_fold_func (gpointer g, gpointer a, gpointer self);
+static Block4Data* block4_data_ref (Block4Data* _data4_);
+static void block4_data_unref (void * _userdata_);
+static gboolean __lambda13_ (Block4Data* _data4_, const gchar* str);
+static gboolean ___lambda13__gee_predicate (gconstpointer g, gpointer self);
+static gboolean __lambda14_ (Block4Data* _data4_, const gchar* str);
+static gboolean ___lambda14__gee_predicate (gconstpointer g, gpointer self);
static void collection_tests_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
@@ -180,24 +263,60 @@ static void _collection_tests_test_gobject_properties_gee_test_case_test_method
}
+static void _collection_tests_test_fold_gee_test_case_test_method (gpointer self) {
+ collection_tests_test_fold (self);
+}
+
+
+static void _collection_tests_test_foreach_gee_test_case_test_method (gpointer self) {
+ collection_tests_test_foreach (self);
+}
+
+
+static void _collection_tests_test_map_gee_test_case_test_method (gpointer self) {
+ collection_tests_test_map (self);
+}
+
+
+static void _collection_tests_test_scan_gee_test_case_test_method (gpointer self) {
+ collection_tests_test_scan (self);
+}
+
+
+static void _collection_tests_test_filter_gee_test_case_test_method (gpointer self) {
+ collection_tests_test_filter (self);
+}
+
+
+static void _collection_tests_test_chop_gee_test_case_test_method (gpointer self) {
+ collection_tests_test_chop (self);
+}
+
+
CollectionTests* collection_tests_construct (GType object_type, const gchar* name) {
CollectionTests * self = NULL;
const gchar* _tmp0_;
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (CollectionTests*) gee_test_case_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] type correctness", _collection_tests_test_type_correctness_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] iterator returns all elements once", _collection_tests_test_iterator_returns_all_elements_once_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] mutable iterator", _collection_tests_test_mutable_iterator_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] contains, size and is_empty", _collection_tests_test_contains_size_and_is_empty_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] add and remove", _collection_tests_test_add_remove_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] clear", _collection_tests_test_clear_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] add_all", _collection_tests_test_add_all_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] contains_all", _collection_tests_test_contains_all_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] remove_all", _collection_tests_test_remove_all_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] retain_all", _collection_tests_test_retain_all_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] to_array", _collection_tests_test_to_array_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] GObject properties", _collection_tests_test_gobject_properties_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] type correctness", _collection_tests_test_type_correctness_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] iterator returns all elements once", _collection_tests_test_iterator_returns_all_elements_once_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] mutable iterator", _collection_tests_test_mutable_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] contains, size and is_empty", _collection_tests_test_contains_size_and_is_empty_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] add and remove", _collection_tests_test_add_remove_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] clear", _collection_tests_test_clear_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] add_all", _collection_tests_test_add_all_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] contains_all", _collection_tests_test_contains_all_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] remove_all", _collection_tests_test_remove_all_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] retain_all", _collection_tests_test_retain_all_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] to_array", _collection_tests_test_to_array_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] GObject properties", _collection_tests_test_gobject_properties_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] fold", _collection_tests_test_fold_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] foreach", _collection_tests_test_foreach_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] map", _collection_tests_test_map_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] scan", _collection_tests_test_scan_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] filter", _collection_tests_test_filter_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] chop", _collection_tests_test_chop_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -211,7 +330,7 @@ void collection_tests_test_type_correctness (CollectionTests* self) {
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
_tmp1_ = self->test_collection;
- _tmp2_ = gee_iterable_get_element_type ((GeeIterable*) _tmp1_);
+ _tmp2_ = gee_traversable_get_element_type ((GeeTraversable*) _tmp1_);
_tmp3_ = _tmp2_;
_vala_assert (_tmp3_ == G_TYPE_STRING, "test_collection.element_type == typeof (string)");
}
@@ -227,48 +346,19 @@ void collection_tests_test_iterator_returns_all_elements_once (CollectionTests*
gboolean _tmp4_ = FALSE;
GeeIterator* _tmp5_;
gboolean _tmp6_ = FALSE;
- GeeIterator* _tmp7_;
- gboolean _tmp8_ = FALSE;
- GeeCollection* _tmp9_;
- gboolean _tmp10_ = FALSE;
- GeeCollection* _tmp11_;
- gboolean _tmp12_ = FALSE;
- GeeCollection* _tmp13_;
- gboolean _tmp14_ = FALSE;
- gboolean one_found;
- gboolean two_found;
- gboolean three_found;
- gboolean one_found_once;
- gboolean two_found_once;
- gboolean three_found_once;
- GeeCollection* _tmp15_;
- GeeIterator* _tmp16_ = NULL;
- GeeIterator* _tmp31_;
- gboolean _tmp32_ = FALSE;
- gboolean _tmp33_;
- gboolean _tmp34_;
- GeeIterator* _tmp35_;
- gboolean _tmp36_ = FALSE;
- gboolean _tmp37_;
- gboolean _tmp38_;
- gboolean _tmp39_;
- gboolean _tmp40_;
- gboolean _tmp41_;
- gboolean _tmp42_;
- GeeIterator* _tmp43_;
- gboolean _tmp44_ = FALSE;
- GeeIterator* _tmp59_;
- gboolean _tmp60_ = FALSE;
- gboolean _tmp61_;
- gboolean _tmp62_;
- GeeIterator* _tmp63_;
- gboolean _tmp64_ = FALSE;
- gboolean _tmp65_;
- gboolean _tmp66_;
- gboolean _tmp67_;
- gboolean _tmp68_;
- gboolean _tmp69_;
- gboolean _tmp70_;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gchar** data;
+ gint data_length1;
+ gint _data_size_;
+ gchar** _tmp9_;
+ gint _tmp9__length1;
+ gchar** _tmp13_;
+ gint _tmp13__length1;
+ guint* _tmp14_ = NULL;
+ guint* found_times;
+ gint found_times_length1;
+ gint _found_times_size_;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
@@ -281,196 +371,265 @@ void collection_tests_test_iterator_returns_all_elements_once (CollectionTests*
_tmp5_ = iterator;
_tmp6_ = gee_iterator_next (_tmp5_);
_vala_assert (!_tmp6_, "! iterator.next ()");
- _tmp7_ = iterator;
- _tmp8_ = gee_iterator_first (_tmp7_);
- _vala_assert (!_tmp8_, "! iterator.first ()");
- _tmp9_ = self->test_collection;
- _tmp10_ = gee_collection_add (_tmp9_, "one");
- _vala_assert (_tmp10_, "test_collection.add (\"one\")");
- _tmp11_ = self->test_collection;
- _tmp12_ = gee_collection_add (_tmp11_, "two");
- _vala_assert (_tmp12_, "test_collection.add (\"two\")");
- _tmp13_ = self->test_collection;
- _tmp14_ = gee_collection_add (_tmp13_, "three");
- _vala_assert (_tmp14_, "test_collection.add (\"three\")");
- one_found = FALSE;
- two_found = FALSE;
- three_found = FALSE;
- one_found_once = TRUE;
- two_found_once = TRUE;
- three_found_once = TRUE;
- _tmp15_ = self->test_collection;
- _tmp16_ = gee_iterable_iterator ((GeeIterable*) _tmp15_);
- _g_object_unref0 (iterator);
- iterator = _tmp16_;
- while (TRUE) {
- GeeIterator* _tmp17_;
- gboolean _tmp18_ = FALSE;
- gboolean _tmp19_;
- GeeIterator* _tmp20_;
- gboolean _tmp21_ = FALSE;
- gboolean _tmp22_;
- GeeIterator* _tmp23_;
- gpointer _tmp24_ = NULL;
- gchar* element;
- const gchar* _tmp25_;
- _tmp17_ = iterator;
- _tmp18_ = gee_iterator_has_next (_tmp17_);
- has_next = _tmp18_;
- _tmp19_ = has_next;
- _tmp20_ = iterator;
- _tmp21_ = gee_iterator_next (_tmp20_);
- _vala_assert (_tmp19_ == _tmp21_, "has_next == iterator.next ()");
- _tmp22_ = has_next;
- if (!_tmp22_) {
- break;
- }
- _tmp23_ = iterator;
- _tmp24_ = gee_iterator_get (_tmp23_);
- element = (gchar*) _tmp24_;
- _tmp25_ = element;
- if (g_strcmp0 (_tmp25_, "one") == 0) {
- gboolean _tmp26_;
- _tmp26_ = one_found;
- if (_tmp26_) {
- one_found_once = FALSE;
+ _tmp8_ = test_data_get_data (&_tmp7_);
+ data = _tmp8_;
+ data_length1 = _tmp7_;
+ _data_size_ = data_length1;
+ _tmp9_ = data;
+ _tmp9__length1 = data_length1;
+ {
+ gchar** el_collection = NULL;
+ gint el_collection_length1 = 0;
+ gint _el_collection_size_ = 0;
+ gint el_it = 0;
+ el_collection = _tmp9_;
+ el_collection_length1 = _tmp9__length1;
+ for (el_it = 0; el_it < _tmp9__length1; el_it = el_it + 1) {
+ const gchar* el = NULL;
+ el = el_collection[el_it];
+ {
+ GeeCollection* _tmp10_;
+ const gchar* _tmp11_;
+ gboolean _tmp12_ = FALSE;
+ _tmp10_ = self->test_collection;
+ _tmp11_ = el;
+ _tmp12_ = gee_collection_add (_tmp10_, _tmp11_);
+ _vala_assert (_tmp12_, "test_collection.add (el)");
}
- one_found = TRUE;
- } else {
- const gchar* _tmp27_;
- _tmp27_ = element;
- if (g_strcmp0 (_tmp27_, "two") == 0) {
- gboolean _tmp28_;
- _tmp28_ = two_found;
- if (_tmp28_) {
- two_found_once = FALSE;
+ }
+ }
+ _tmp13_ = data;
+ _tmp13__length1 = data_length1;
+ _tmp14_ = g_new0 (guint, _tmp13__length1);
+ found_times = _tmp14_;
+ found_times_length1 = _tmp13__length1;
+ _found_times_size_ = found_times_length1;
+ {
+ guint i;
+ i = (guint) 0;
+ {
+ gboolean _tmp15_;
+ _tmp15_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp16_;
+ guint _tmp18_;
+ GeeCollection* _tmp27_;
+ GeeIterator* _tmp28_ = NULL;
+ GeeIterator* _tmp29_;
+ gboolean _tmp30_;
+ gboolean _tmp31_;
+ gboolean valid;
+ gboolean _tmp32_;
+ GeeIterator* _tmp64_;
+ gboolean _tmp65_ = FALSE;
+ gboolean _tmp66_;
+ GeeIterator* _tmp67_;
+ gboolean _tmp68_;
+ gboolean _tmp69_;
+ gboolean _tmp70_;
+ GeeIterator* _tmp71_;
+ gboolean _tmp72_ = FALSE;
+ GeeIterator* _tmp73_;
+ gboolean _tmp74_;
+ gboolean _tmp75_;
+ guint* _tmp76_;
+ gint _tmp76__length1;
+ _tmp16_ = _tmp15_;
+ if (!_tmp16_) {
+ guint _tmp17_;
+ _tmp17_ = i;
+ i = _tmp17_ + 1;
}
- two_found = TRUE;
- } else {
- const gchar* _tmp29_;
- _tmp29_ = element;
- if (g_strcmp0 (_tmp29_, "three") == 0) {
- gboolean _tmp30_;
- _tmp30_ = three_found;
- if (_tmp30_) {
- three_found_once = FALSE;
+ _tmp15_ = FALSE;
+ _tmp18_ = i;
+ if (!(_tmp18_ < ((guint) 2))) {
+ break;
+ }
+ {
+ guint j;
+ j = (guint) 0;
+ {
+ gboolean _tmp19_;
+ _tmp19_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp20_;
+ guint _tmp22_;
+ guint* _tmp23_;
+ gint _tmp23__length1;
+ guint* _tmp24_;
+ gint _tmp24__length1;
+ guint _tmp25_;
+ guint _tmp26_;
+ _tmp20_ = _tmp19_;
+ if (!_tmp20_) {
+ guint _tmp21_;
+ _tmp21_ = j;
+ j = _tmp21_ + 1;
+ }
+ _tmp19_ = FALSE;
+ _tmp22_ = j;
+ _tmp23_ = found_times;
+ _tmp23__length1 = found_times_length1;
+ if (!(_tmp22_ < ((guint) _tmp23__length1))) {
+ break;
+ }
+ _tmp24_ = found_times;
+ _tmp24__length1 = found_times_length1;
+ _tmp25_ = j;
+ _tmp24_[_tmp25_] = (guint) 0;
+ _tmp26_ = _tmp24_[_tmp25_];
+ }
}
- three_found = TRUE;
}
- }
- }
- _g_free0 (element);
- }
- _tmp31_ = iterator;
- _tmp32_ = gee_iterator_has_next (_tmp31_);
- has_next = _tmp32_;
- _tmp33_ = has_next;
- _vala_assert (!_tmp33_, "! has_next");
- _tmp34_ = has_next;
- _tmp35_ = iterator;
- _tmp36_ = gee_iterator_next (_tmp35_);
- _vala_assert (_tmp34_ == _tmp36_, "has_next == iterator.next ()");
- _tmp37_ = one_found;
- _vala_assert (_tmp37_, "one_found");
- _tmp38_ = one_found_once;
- _vala_assert (_tmp38_, "one_found_once");
- _tmp39_ = two_found;
- _vala_assert (_tmp39_, "two_found");
- _tmp40_ = two_found_once;
- _vala_assert (_tmp40_, "two_found_once");
- _tmp41_ = three_found;
- _vala_assert (_tmp41_, "three_found");
- _tmp42_ = three_found_once;
- _vala_assert (_tmp42_, "three_found_once");
- _tmp43_ = iterator;
- _tmp44_ = gee_iterator_first (_tmp43_);
- _vala_assert (_tmp44_, "iterator.first ()");
- one_found = FALSE;
- two_found = FALSE;
- three_found = FALSE;
- one_found_once = TRUE;
- two_found_once = TRUE;
- three_found_once = TRUE;
- while (TRUE) {
- GeeIterator* _tmp45_;
- gpointer _tmp46_ = NULL;
- gchar* element;
- const gchar* _tmp47_;
- GeeIterator* _tmp53_;
- gboolean _tmp54_ = FALSE;
- gboolean _tmp55_;
- GeeIterator* _tmp56_;
- gboolean _tmp57_ = FALSE;
- gboolean _tmp58_;
- _tmp45_ = iterator;
- _tmp46_ = gee_iterator_get (_tmp45_);
- element = (gchar*) _tmp46_;
- _tmp47_ = element;
- if (g_strcmp0 (_tmp47_, "one") == 0) {
- gboolean _tmp48_;
- _tmp48_ = one_found;
- if (_tmp48_) {
- one_found_once = FALSE;
- }
- one_found = TRUE;
- } else {
- const gchar* _tmp49_;
- _tmp49_ = element;
- if (g_strcmp0 (_tmp49_, "two") == 0) {
- gboolean _tmp50_;
- _tmp50_ = two_found;
- if (_tmp50_) {
- two_found_once = FALSE;
+ _tmp27_ = self->test_collection;
+ _tmp28_ = gee_iterable_iterator ((GeeIterable*) _tmp27_);
+ _g_object_unref0 (iterator);
+ iterator = _tmp28_;
+ _tmp29_ = iterator;
+ _tmp30_ = gee_iterator_get_valid (_tmp29_);
+ _tmp31_ = _tmp30_;
+ valid = _tmp31_;
+ _tmp32_ = valid;
+ _vala_assert (!_tmp32_, "! valid");
+ while (TRUE) {
+ GeeIterator* _tmp33_;
+ gboolean _tmp34_ = FALSE;
+ gboolean _tmp35_;
+ GeeIterator* _tmp36_;
+ gboolean _tmp37_;
+ gboolean _tmp38_;
+ gboolean _tmp39_;
+ GeeIterator* _tmp40_;
+ gboolean _tmp41_ = FALSE;
+ GeeIterator* _tmp42_;
+ gboolean _tmp43_;
+ gboolean _tmp44_;
+ gboolean _tmp45_;
+ gboolean _tmp46_;
+ GeeIterator* _tmp47_;
+ gpointer _tmp48_ = NULL;
+ gchar* element;
+ GeeIterator* _tmp49_;
+ gboolean _tmp50_;
+ gboolean _tmp51_;
+ _tmp33_ = iterator;
+ _tmp34_ = gee_iterator_has_next (_tmp33_);
+ has_next = _tmp34_;
+ _tmp35_ = valid;
+ _tmp36_ = iterator;
+ _tmp37_ = gee_iterator_get_valid (_tmp36_);
+ _tmp38_ = _tmp37_;
+ _vala_assert (_tmp35_ == _tmp38_, "valid == iterator.valid");
+ _tmp39_ = has_next;
+ _tmp40_ = iterator;
+ _tmp41_ = gee_iterator_next (_tmp40_);
+ _vala_assert (_tmp39_ == _tmp41_, "has_next == iterator.next ()");
+ _tmp42_ = iterator;
+ _tmp43_ = gee_iterator_get_valid (_tmp42_);
+ _tmp44_ = _tmp43_;
+ valid = _tmp44_;
+ _tmp45_ = valid;
+ _vala_assert (_tmp45_, "valid = iterator.valid");
+ _tmp46_ = has_next;
+ if (!_tmp46_) {
+ break;
+ }
+ _tmp47_ = iterator;
+ _tmp48_ = gee_iterator_get (_tmp47_);
+ element = (gchar*) _tmp48_;
+ _tmp49_ = iterator;
+ _tmp50_ = gee_iterator_get_valid (_tmp49_);
+ _tmp51_ = _tmp50_;
+ _vala_assert (_tmp51_, "iterator.valid");
+ {
+ guint element_idx;
+ element_idx = (guint) 0;
+ {
+ gboolean _tmp52_;
+ _tmp52_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp53_;
+ guint _tmp55_;
+ gchar** _tmp56_;
+ gint _tmp56__length1;
+ gchar** _tmp57_;
+ gint _tmp57__length1;
+ guint _tmp58_;
+ const gchar* _tmp59_;
+ const gchar* _tmp60_;
+ _tmp53_ = _tmp52_;
+ if (!_tmp53_) {
+ guint _tmp54_;
+ _tmp54_ = element_idx;
+ element_idx = _tmp54_ + 1;
+ }
+ _tmp52_ = FALSE;
+ _tmp55_ = element_idx;
+ _tmp56_ = data;
+ _tmp56__length1 = data_length1;
+ _vala_assert (_tmp55_ < ((guint) _tmp56__length1), "element_idx < data.length");
+ _tmp57_ = data;
+ _tmp57__length1 = data_length1;
+ _tmp58_ = element_idx;
+ _tmp59_ = _tmp57_[_tmp58_];
+ _tmp60_ = element;
+ if (g_strcmp0 (_tmp59_, _tmp60_) == 0) {
+ guint* _tmp61_;
+ gint _tmp61__length1;
+ guint _tmp62_;
+ guint _tmp63_;
+ _tmp61_ = found_times;
+ _tmp61__length1 = found_times_length1;
+ _tmp62_ = element_idx;
+ _tmp63_ = _tmp61_[_tmp62_];
+ _tmp61_[_tmp62_] = _tmp63_ + 1;
+ break;
+ }
+ }
+ }
+ }
+ _g_free0 (element);
}
- two_found = TRUE;
- } else {
- const gchar* _tmp51_;
- _tmp51_ = element;
- if (g_strcmp0 (_tmp51_, "three") == 0) {
- gboolean _tmp52_;
- _tmp52_ = three_found;
- if (_tmp52_) {
- three_found_once = FALSE;
+ _tmp64_ = iterator;
+ _tmp65_ = gee_iterator_has_next (_tmp64_);
+ has_next = _tmp65_;
+ _tmp66_ = has_next;
+ _vala_assert (!_tmp66_, "! has_next");
+ _tmp67_ = iterator;
+ _tmp68_ = gee_iterator_get_valid (_tmp67_);
+ _tmp69_ = _tmp68_;
+ _vala_assert (_tmp69_, "iterator.valid");
+ _tmp70_ = has_next;
+ _tmp71_ = iterator;
+ _tmp72_ = gee_iterator_next (_tmp71_);
+ _vala_assert (_tmp70_ == _tmp72_, "has_next == iterator.next ()");
+ _tmp73_ = iterator;
+ _tmp74_ = gee_iterator_get_valid (_tmp73_);
+ _tmp75_ = _tmp74_;
+ _vala_assert (_tmp75_, "iterator.valid");
+ _tmp76_ = found_times;
+ _tmp76__length1 = found_times_length1;
+ {
+ guint* ft_collection = NULL;
+ gint ft_collection_length1 = 0;
+ gint _ft_collection_size_ = 0;
+ gint ft_it = 0;
+ ft_collection = _tmp76_;
+ ft_collection_length1 = _tmp76__length1;
+ for (ft_it = 0; ft_it < _tmp76__length1; ft_it = ft_it + 1) {
+ guint ft = 0U;
+ ft = ft_collection[ft_it];
+ {
+ guint _tmp77_;
+ _tmp77_ = ft;
+ _vala_assert (_tmp77_ == ((guint) 1), "ft == 1");
+ }
}
- three_found = TRUE;
}
}
}
- _tmp53_ = iterator;
- _tmp54_ = gee_iterator_has_next (_tmp53_);
- has_next = _tmp54_;
- _tmp55_ = has_next;
- _tmp56_ = iterator;
- _tmp57_ = gee_iterator_next (_tmp56_);
- _vala_assert (_tmp55_ == _tmp57_, "has_next == iterator.next ()");
- _tmp58_ = has_next;
- if (!_tmp58_) {
- _g_free0 (element);
- break;
- }
- _g_free0 (element);
}
- _tmp59_ = iterator;
- _tmp60_ = gee_iterator_has_next (_tmp59_);
- has_next = _tmp60_;
- _tmp61_ = has_next;
- _vala_assert (!_tmp61_, "! has_next");
- _tmp62_ = has_next;
- _tmp63_ = iterator;
- _tmp64_ = gee_iterator_next (_tmp63_);
- _vala_assert (_tmp62_ == _tmp64_, "has_next == iterator.next ()");
- _tmp65_ = one_found;
- _vala_assert (_tmp65_, "one_found");
- _tmp66_ = one_found_once;
- _vala_assert (_tmp66_, "one_found_once");
- _tmp67_ = two_found;
- _vala_assert (_tmp67_, "two_found");
- _tmp68_ = two_found_once;
- _vala_assert (_tmp68_, "two_found_once");
- _tmp69_ = three_found;
- _vala_assert (_tmp69_, "three_found");
- _tmp70_ = three_found_once;
- _vala_assert (_tmp70_, "three_found_once");
+ found_times = (g_free (found_times), NULL);
_g_object_unref0 (iterator);
}
@@ -481,1048 +640,1296 @@ void collection_tests_test_mutable_iterator (CollectionTests* self) {
GeeCollection* _tmp1_;
GeeIterator* _tmp2_ = NULL;
GeeIterator* iterator;
- GeeCollection* _tmp3_;
- gboolean _tmp4_ = FALSE;
- GeeCollection* _tmp5_;
- gboolean _tmp6_ = FALSE;
- GeeCollection* _tmp7_;
- gboolean _tmp8_ = FALSE;
- gboolean one_found;
- gboolean two_found;
- gboolean three_found;
- gboolean one_found_once;
- gboolean two_found_once;
- gboolean three_found_once;
- GeeCollection* _tmp9_;
- GeeIterator* _tmp10_ = NULL;
- GeeIterator* _tmp26_;
- gboolean _tmp27_ = FALSE;
- gboolean _tmp28_;
- gboolean _tmp29_;
- GeeIterator* _tmp30_;
- gboolean _tmp31_ = FALSE;
- gboolean _tmp32_;
- gboolean _tmp33_;
- gboolean _tmp34_;
- gboolean _tmp35_;
- gboolean _tmp36_;
- gboolean _tmp37_;
- GeeIterator* _tmp38_;
- gboolean _tmp39_ = FALSE;
- GeeIterator* _tmp53_;
- gboolean _tmp54_ = FALSE;
- gboolean _tmp55_;
- gboolean _tmp56_;
- GeeIterator* _tmp57_;
- gboolean _tmp58_ = FALSE;
- gboolean _tmp59_;
- gboolean _tmp60_;
- gboolean _tmp61_;
- gboolean _tmp62_;
- gboolean _tmp63_;
+ gint _tmp3_ = 0;
+ gchar** _tmp4_ = NULL;
+ gchar** data;
+ gint data_length1;
+ gint _data_size_;
+ gint _tmp5_ = 0;
+ guint* _tmp6_ = NULL;
+ guint* idx;
+ gint idx_length1;
+ gint _idx_size_;
+ gchar** _tmp7_;
+ gint _tmp7__length1;
+ GeeCollection* _tmp11_;
+ GeeIterator* _tmp12_ = NULL;
+ gchar** _tmp13_;
+ gint _tmp13__length1;
+ guint* _tmp14_ = NULL;
+ guint* found_times;
+ gint found_times_length1;
+ gint _found_times_size_;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
_tmp1_ = self->test_collection;
_tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_);
iterator = _tmp2_;
- _tmp3_ = self->test_collection;
- _tmp4_ = gee_collection_add (_tmp3_, "one");
- _vala_assert (_tmp4_, "test_collection.add (\"one\")");
- _tmp5_ = self->test_collection;
- _tmp6_ = gee_collection_add (_tmp5_, "two");
- _vala_assert (_tmp6_, "test_collection.add (\"two\")");
- _tmp7_ = self->test_collection;
- _tmp8_ = gee_collection_add (_tmp7_, "three");
- _vala_assert (_tmp8_, "test_collection.add (\"three\")");
- one_found = FALSE;
- two_found = FALSE;
- three_found = FALSE;
- one_found_once = TRUE;
- two_found_once = TRUE;
- three_found_once = TRUE;
- _tmp9_ = self->test_collection;
- _tmp10_ = gee_iterable_iterator ((GeeIterable*) _tmp9_);
- _g_object_unref0 (iterator);
- iterator = _tmp10_;
- while (TRUE) {
- GeeIterator* _tmp11_;
- gboolean _tmp12_ = FALSE;
- gboolean _tmp13_;
- GeeIterator* _tmp14_;
- gboolean _tmp15_ = FALSE;
- gboolean _tmp16_;
- GeeIterator* _tmp17_;
- gpointer _tmp18_ = NULL;
- gchar* element;
- const gchar* _tmp19_;
- _tmp11_ = iterator;
- _tmp12_ = gee_iterator_has_next (_tmp11_);
- has_next = _tmp12_;
- _tmp13_ = has_next;
- _tmp14_ = iterator;
- _tmp15_ = gee_iterator_next (_tmp14_);
- _vala_assert (_tmp13_ == _tmp15_, "has_next == iterator.next ()");
- _tmp16_ = has_next;
- if (!_tmp16_) {
- break;
- }
- _tmp17_ = iterator;
- _tmp18_ = gee_iterator_get (_tmp17_);
- element = (gchar*) _tmp18_;
- _tmp19_ = element;
- if (g_strcmp0 (_tmp19_, "one") == 0) {
- gboolean _tmp20_;
- _tmp20_ = one_found;
- if (_tmp20_) {
- one_found_once = FALSE;
+ _tmp4_ = test_data_get_data (&_tmp3_);
+ data = _tmp4_;
+ data_length1 = _tmp3_;
+ _data_size_ = data_length1;
+ _tmp6_ = test_data_get_drawn_numbers (&_tmp5_);
+ idx = _tmp6_;
+ idx_length1 = _tmp5_;
+ _idx_size_ = idx_length1;
+ _tmp7_ = data;
+ _tmp7__length1 = data_length1;
+ {
+ gchar** el_collection = NULL;
+ gint el_collection_length1 = 0;
+ gint _el_collection_size_ = 0;
+ gint el_it = 0;
+ el_collection = _tmp7_;
+ el_collection_length1 = _tmp7__length1;
+ for (el_it = 0; el_it < _tmp7__length1; el_it = el_it + 1) {
+ const gchar* el = NULL;
+ el = el_collection[el_it];
+ {
+ GeeCollection* _tmp8_;
+ const gchar* _tmp9_;
+ gboolean _tmp10_ = FALSE;
+ _tmp8_ = self->test_collection;
+ _tmp9_ = el;
+ _tmp10_ = gee_collection_add (_tmp8_, _tmp9_);
+ _vala_assert (_tmp10_, "test_collection.add (el)");
}
- one_found = TRUE;
- } else {
- const gchar* _tmp21_;
- _tmp21_ = element;
- if (g_strcmp0 (_tmp21_, "two") == 0) {
- gboolean _tmp22_;
- GeeIterator* _tmp23_;
- _tmp22_ = two_found;
- if (_tmp22_) {
- two_found_once = FALSE;
+ }
+ }
+ _tmp11_ = self->test_collection;
+ _tmp12_ = gee_iterable_iterator ((GeeIterable*) _tmp11_);
+ _g_object_unref0 (iterator);
+ iterator = _tmp12_;
+ _tmp13_ = data;
+ _tmp13__length1 = data_length1;
+ _tmp14_ = g_new0 (guint, _tmp13__length1);
+ found_times = _tmp14_;
+ found_times_length1 = _tmp13__length1;
+ _found_times_size_ = found_times_length1;
+ {
+ guint i;
+ i = (guint) 0;
+ {
+ gboolean _tmp15_;
+ _tmp15_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp16_;
+ guint _tmp18_;
+ guint* _tmp19_;
+ gint _tmp19__length1;
+ GeeCollection* _tmp28_;
+ GeeIterator* _tmp29_ = NULL;
+ GeeIterator* _tmp30_;
+ gboolean _tmp31_;
+ gboolean _tmp32_;
+ gboolean last_removed;
+ GeeIterator* _tmp72_;
+ gboolean _tmp73_ = FALSE;
+ gboolean _tmp74_;
+ GeeIterator* _tmp75_;
+ gboolean _tmp76_;
+ gboolean _tmp77_;
+ gboolean _tmp78_;
+ gboolean _tmp79_;
+ GeeIterator* _tmp80_;
+ gboolean _tmp81_ = FALSE;
+ GeeIterator* _tmp82_;
+ gboolean _tmp83_;
+ gboolean _tmp84_;
+ gboolean _tmp85_;
+ _tmp16_ = _tmp15_;
+ if (!_tmp16_) {
+ guint _tmp17_;
+ _tmp17_ = i;
+ i = _tmp17_ + 1;
}
- two_found = TRUE;
- _tmp23_ = iterator;
- gee_iterator_remove (_tmp23_);
- } else {
- const gchar* _tmp24_;
- _tmp24_ = element;
- if (g_strcmp0 (_tmp24_, "three") == 0) {
- gboolean _tmp25_;
- _tmp25_ = three_found;
- if (_tmp25_) {
- three_found_once = FALSE;
+ _tmp15_ = FALSE;
+ _tmp18_ = i;
+ _tmp19_ = idx;
+ _tmp19__length1 = idx_length1;
+ if (!(_tmp18_ <= ((guint) _tmp19__length1))) {
+ break;
+ }
+ {
+ guint j;
+ j = (guint) 0;
+ {
+ gboolean _tmp20_;
+ _tmp20_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp21_;
+ guint _tmp23_;
+ guint* _tmp24_;
+ gint _tmp24__length1;
+ guint* _tmp25_;
+ gint _tmp25__length1;
+ guint _tmp26_;
+ guint _tmp27_;
+ _tmp21_ = _tmp20_;
+ if (!_tmp21_) {
+ guint _tmp22_;
+ _tmp22_ = j;
+ j = _tmp22_ + 1;
+ }
+ _tmp20_ = FALSE;
+ _tmp23_ = j;
+ _tmp24_ = found_times;
+ _tmp24__length1 = found_times_length1;
+ if (!(_tmp23_ < ((guint) _tmp24__length1))) {
+ break;
+ }
+ _tmp25_ = found_times;
+ _tmp25__length1 = found_times_length1;
+ _tmp26_ = j;
+ _tmp25_[_tmp26_] = (guint) 0;
+ _tmp27_ = _tmp25_[_tmp26_];
+ }
}
- three_found = TRUE;
}
- }
- }
- _g_free0 (element);
- }
- _tmp26_ = iterator;
- _tmp27_ = gee_iterator_has_next (_tmp26_);
- has_next = _tmp27_;
- _tmp28_ = has_next;
- _vala_assert (!_tmp28_, "! has_next");
- _tmp29_ = has_next;
- _tmp30_ = iterator;
- _tmp31_ = gee_iterator_next (_tmp30_);
- _vala_assert (_tmp29_ == _tmp31_, "has_next == iterator.next ()");
- _tmp32_ = one_found;
- _vala_assert (_tmp32_, "one_found");
- _tmp33_ = one_found_once;
- _vala_assert (_tmp33_, "one_found_once");
- _tmp34_ = two_found;
- _vala_assert (_tmp34_, "two_found");
- _tmp35_ = two_found_once;
- _vala_assert (_tmp35_, "two_found_once");
- _tmp36_ = three_found;
- _vala_assert (_tmp36_, "three_found");
- _tmp37_ = three_found_once;
- _vala_assert (_tmp37_, "three_found_once");
- _tmp38_ = iterator;
- _tmp39_ = gee_iterator_first (_tmp38_);
- _vala_assert (_tmp39_, "iterator.first ()");
- one_found = FALSE;
- two_found = FALSE;
- three_found = FALSE;
- one_found_once = TRUE;
- two_found_once = TRUE;
- three_found_once = TRUE;
- while (TRUE) {
- GeeIterator* _tmp40_;
- gpointer _tmp41_ = NULL;
- gchar* element;
- const gchar* _tmp42_;
- GeeIterator* _tmp47_;
- gboolean _tmp48_ = FALSE;
- gboolean _tmp49_;
- GeeIterator* _tmp50_;
- gboolean _tmp51_ = FALSE;
- gboolean _tmp52_;
- _tmp40_ = iterator;
- _tmp41_ = gee_iterator_get (_tmp40_);
- element = (gchar*) _tmp41_;
- _tmp42_ = element;
- if (g_strcmp0 (_tmp42_, "one") == 0) {
- gboolean _tmp43_;
- _tmp43_ = one_found;
- if (_tmp43_) {
- one_found_once = FALSE;
- }
- one_found = TRUE;
- } else {
- const gchar* _tmp44_;
- _tmp44_ = element;
- if (g_strcmp0 (_tmp44_, "two") == 0) {
- two_found = TRUE;
- } else {
- const gchar* _tmp45_;
- _tmp45_ = element;
- if (g_strcmp0 (_tmp45_, "three") == 0) {
- gboolean _tmp46_;
- _tmp46_ = three_found;
- if (_tmp46_) {
- three_found_once = FALSE;
+ _tmp28_ = self->test_collection;
+ _tmp29_ = gee_iterable_iterator ((GeeIterable*) _tmp28_);
+ _g_object_unref0 (iterator);
+ iterator = _tmp29_;
+ _tmp30_ = iterator;
+ _tmp31_ = gee_iterator_get_valid (_tmp30_);
+ _tmp32_ = _tmp31_;
+ _vala_assert (!_tmp32_, "! iterator.valid");
+ last_removed = FALSE;
+ while (TRUE) {
+ GeeIterator* _tmp33_;
+ gboolean _tmp34_ = FALSE;
+ gboolean _tmp35_;
+ GeeIterator* _tmp36_;
+ gboolean _tmp37_ = FALSE;
+ gboolean _tmp38_;
+ GeeIterator* _tmp39_;
+ gpointer _tmp40_ = NULL;
+ gchar* element;
+ GeeIterator* _tmp41_;
+ gboolean _tmp42_;
+ gboolean _tmp43_;
+ _tmp33_ = iterator;
+ _tmp34_ = gee_iterator_has_next (_tmp33_);
+ has_next = _tmp34_;
+ _tmp35_ = has_next;
+ _tmp36_ = iterator;
+ _tmp37_ = gee_iterator_next (_tmp36_);
+ _vala_assert (_tmp35_ == _tmp37_, "has_next == iterator.next ()");
+ _tmp38_ = has_next;
+ if (!_tmp38_) {
+ break;
+ }
+ _tmp39_ = iterator;
+ _tmp40_ = gee_iterator_get (_tmp39_);
+ element = (gchar*) _tmp40_;
+ _tmp41_ = iterator;
+ _tmp42_ = gee_iterator_get_valid (_tmp41_);
+ _tmp43_ = _tmp42_;
+ _vala_assert (_tmp43_, "iterator.valid");
+ {
+ guint element_idx;
+ element_idx = (guint) 0;
+ {
+ gboolean _tmp44_;
+ _tmp44_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp45_;
+ guint _tmp47_;
+ gchar** _tmp48_;
+ gint _tmp48__length1;
+ gchar** _tmp49_;
+ gint _tmp49__length1;
+ guint _tmp50_;
+ const gchar* _tmp51_;
+ const gchar* _tmp52_;
+ _tmp45_ = _tmp44_;
+ if (!_tmp45_) {
+ guint _tmp46_;
+ _tmp46_ = element_idx;
+ element_idx = _tmp46_ + 1;
+ }
+ _tmp44_ = FALSE;
+ _tmp47_ = element_idx;
+ _tmp48_ = data;
+ _tmp48__length1 = data_length1;
+ _vala_assert (_tmp47_ < ((guint) _tmp48__length1), "element_idx < data.length");
+ _tmp49_ = data;
+ _tmp49__length1 = data_length1;
+ _tmp50_ = element_idx;
+ _tmp51_ = _tmp49_[_tmp50_];
+ _tmp52_ = element;
+ if (g_strcmp0 (_tmp51_, _tmp52_) == 0) {
+ gboolean _tmp53_ = FALSE;
+ guint _tmp54_;
+ guint* _tmp55_;
+ gint _tmp55__length1;
+ gboolean _tmp64_;
+ guint* _tmp69_;
+ gint _tmp69__length1;
+ guint _tmp70_;
+ guint _tmp71_;
+ _tmp54_ = i;
+ _tmp55_ = idx;
+ _tmp55__length1 = idx_length1;
+ if (_tmp54_ != ((guint) _tmp55__length1)) {
+ gchar** _tmp56_;
+ gint _tmp56__length1;
+ guint _tmp57_;
+ const gchar* _tmp58_;
+ gchar** _tmp59_;
+ gint _tmp59__length1;
+ guint* _tmp60_;
+ gint _tmp60__length1;
+ guint _tmp61_;
+ guint _tmp62_;
+ const gchar* _tmp63_;
+ _tmp56_ = data;
+ _tmp56__length1 = data_length1;
+ _tmp57_ = element_idx;
+ _tmp58_ = _tmp56_[_tmp57_];
+ _tmp59_ = data;
+ _tmp59__length1 = data_length1;
+ _tmp60_ = idx;
+ _tmp60__length1 = idx_length1;
+ _tmp61_ = i;
+ _tmp62_ = _tmp60_[_tmp61_];
+ _tmp63_ = _tmp59_[_tmp62_];
+ _tmp53_ = g_strcmp0 (_tmp58_, _tmp63_) == 0;
+ } else {
+ _tmp53_ = FALSE;
+ }
+ _tmp64_ = _tmp53_;
+ if (_tmp64_) {
+ GeeIterator* _tmp65_;
+ GeeIterator* _tmp66_;
+ gboolean _tmp67_;
+ gboolean _tmp68_;
+ _tmp65_ = iterator;
+ gee_iterator_remove (_tmp65_);
+ _tmp66_ = iterator;
+ _tmp67_ = gee_iterator_get_valid (_tmp66_);
+ _tmp68_ = _tmp67_;
+ _vala_assert (!_tmp68_, "! iterator.valid");
+ last_removed = TRUE;
+ } else {
+ last_removed = FALSE;
+ }
+ _tmp69_ = found_times;
+ _tmp69__length1 = found_times_length1;
+ _tmp70_ = element_idx;
+ _tmp71_ = _tmp69_[_tmp70_];
+ _tmp69_[_tmp70_] = _tmp71_ + 1;
+ break;
+ }
+ }
+ }
+ }
+ _g_free0 (element);
+ }
+ _tmp72_ = iterator;
+ _tmp73_ = gee_iterator_has_next (_tmp72_);
+ has_next = _tmp73_;
+ _tmp74_ = has_next;
+ _vala_assert (!_tmp74_, "! has_next");
+ _tmp75_ = iterator;
+ _tmp76_ = gee_iterator_get_valid (_tmp75_);
+ _tmp77_ = _tmp76_;
+ _tmp78_ = last_removed;
+ _vala_assert (_tmp77_ == (!_tmp78_), "iterator.valid == !last_removed");
+ _tmp79_ = has_next;
+ _tmp80_ = iterator;
+ _tmp81_ = gee_iterator_next (_tmp80_);
+ _vala_assert (_tmp79_ == _tmp81_, "has_next == iterator.next ()");
+ _tmp82_ = iterator;
+ _tmp83_ = gee_iterator_get_valid (_tmp82_);
+ _tmp84_ = _tmp83_;
+ _tmp85_ = last_removed;
+ _vala_assert (_tmp84_ == (!_tmp85_), "iterator.valid == !last_removed");
+ {
+ guint j;
+ j = (guint) 0;
+ {
+ gboolean _tmp86_;
+ _tmp86_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp87_;
+ guint _tmp89_;
+ guint* _tmp90_;
+ gint _tmp90__length1;
+ gboolean removed;
+ gint _tmp100_ = 0;
+ gboolean _tmp101_;
+ guint* _tmp102_;
+ gint _tmp102__length1;
+ guint _tmp103_;
+ guint _tmp104_;
+ gint _tmp105_;
+ _tmp87_ = _tmp86_;
+ if (!_tmp87_) {
+ guint _tmp88_;
+ _tmp88_ = j;
+ j = _tmp88_ + 1;
+ }
+ _tmp86_ = FALSE;
+ _tmp89_ = j;
+ _tmp90_ = found_times;
+ _tmp90__length1 = found_times_length1;
+ if (!(_tmp89_ < ((guint) _tmp90__length1))) {
+ break;
+ }
+ removed = FALSE;
+ {
+ gint k;
+ k = 0;
+ {
+ gboolean _tmp91_;
+ _tmp91_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp92_;
+ gint _tmp94_;
+ guint _tmp95_;
+ guint* _tmp96_;
+ gint _tmp96__length1;
+ gint _tmp97_;
+ guint _tmp98_;
+ guint _tmp99_;
+ _tmp92_ = _tmp91_;
+ if (!_tmp92_) {
+ gint _tmp93_;
+ _tmp93_ = k;
+ k = _tmp93_ + 1;
+ }
+ _tmp91_ = FALSE;
+ _tmp94_ = k;
+ _tmp95_ = i;
+ if (!(((guint) _tmp94_) < _tmp95_)) {
+ break;
+ }
+ _tmp96_ = idx;
+ _tmp96__length1 = idx_length1;
+ _tmp97_ = k;
+ _tmp98_ = _tmp96_[_tmp97_];
+ _tmp99_ = j;
+ if (_tmp98_ == _tmp99_) {
+ removed = TRUE;
+ break;
+ }
+ }
+ }
+ }
+ _tmp101_ = removed;
+ if (_tmp101_) {
+ _tmp100_ = 0;
+ } else {
+ _tmp100_ = 1;
+ }
+ _tmp102_ = found_times;
+ _tmp102__length1 = found_times_length1;
+ _tmp103_ = j;
+ _tmp104_ = _tmp102_[_tmp103_];
+ _tmp105_ = _tmp100_;
+ _vala_assert (_tmp104_ == ((guint) _tmp105_), "found_times[j] == (removed ? 0 : 1)");
+ }
}
- three_found = TRUE;
}
}
}
- _tmp47_ = iterator;
- _tmp48_ = gee_iterator_has_next (_tmp47_);
- has_next = _tmp48_;
- _tmp49_ = has_next;
- _tmp50_ = iterator;
- _tmp51_ = gee_iterator_next (_tmp50_);
- _vala_assert (_tmp49_ == _tmp51_, "has_next == iterator.next ()");
- _tmp52_ = has_next;
- if (!_tmp52_) {
- _g_free0 (element);
- break;
- }
- _g_free0 (element);
}
- _tmp53_ = iterator;
- _tmp54_ = gee_iterator_has_next (_tmp53_);
- has_next = _tmp54_;
- _tmp55_ = has_next;
- _vala_assert (!_tmp55_, "! has_next");
- _tmp56_ = has_next;
- _tmp57_ = iterator;
- _tmp58_ = gee_iterator_next (_tmp57_);
- _vala_assert (_tmp56_ == _tmp58_, "has_next == iterator.next ()");
- _tmp59_ = one_found;
- _vala_assert (_tmp59_, "one_found");
- _tmp60_ = one_found_once;
- _vala_assert (_tmp60_, "one_found_once");
- _tmp61_ = two_found;
- _vala_assert (!_tmp61_, "!two_found");
- _tmp62_ = three_found;
- _vala_assert (_tmp62_, "three_found");
- _tmp63_ = three_found_once;
- _vala_assert (_tmp63_, "three_found_once");
+ found_times = (g_free (found_times), NULL);
_g_object_unref0 (iterator);
}
void collection_tests_test_contains_size_and_is_empty (CollectionTests* self) {
GeeCollection* _tmp0_;
- GeeCollection* _tmp1_;
- gboolean _tmp2_ = FALSE;
- GeeCollection* _tmp3_;
- gboolean _tmp4_ = FALSE;
- GeeCollection* _tmp5_;
- gboolean _tmp6_ = FALSE;
- GeeCollection* _tmp7_;
- gint _tmp8_;
- gint _tmp9_;
- GeeCollection* _tmp10_;
- gboolean _tmp11_;
- gboolean _tmp12_;
- GeeCollection* _tmp13_;
- gboolean _tmp14_ = FALSE;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
+ gchar** data;
+ gint data_length1;
+ gint _data_size_;
+ gint _tmp3_ = 0;
+ guint* _tmp4_ = NULL;
+ guint* idx;
+ gint idx_length1;
+ gint _idx_size_;
+ gchar** _tmp5_;
+ gint _tmp5__length1;
+ GeeCollection* _tmp9_;
+ gint _tmp10_;
+ gint _tmp11_;
+ GeeCollection* _tmp12_;
+ gboolean _tmp13_;
+ gboolean _tmp14_;
GeeCollection* _tmp15_;
- gboolean _tmp16_ = FALSE;
- GeeCollection* _tmp17_;
+ gchar** _tmp16_;
+ gint _tmp16__length1;
+ const gchar* _tmp17_;
gboolean _tmp18_ = FALSE;
GeeCollection* _tmp19_;
- gboolean _tmp20_ = FALSE;
- GeeCollection* _tmp21_;
- gint _tmp22_;
- gint _tmp23_;
- GeeCollection* _tmp24_;
- gboolean _tmp25_;
- gboolean _tmp26_;
- GeeCollection* _tmp27_;
- gboolean _tmp28_ = FALSE;
- GeeCollection* _tmp29_;
- gboolean _tmp30_ = FALSE;
- GeeCollection* _tmp31_;
- gboolean _tmp32_ = FALSE;
+ gchar** _tmp20_;
+ gint _tmp20__length1;
+ const gchar* _tmp21_;
+ gboolean _tmp22_ = FALSE;
GeeCollection* _tmp33_;
- gboolean _tmp34_ = FALSE;
- GeeCollection* _tmp35_;
- gint _tmp36_;
- gint _tmp37_;
- GeeCollection* _tmp38_;
- gboolean _tmp39_;
- gboolean _tmp40_;
- GeeCollection* _tmp41_;
- gboolean _tmp42_ = FALSE;
- GeeCollection* _tmp43_;
- gboolean _tmp44_ = FALSE;
+ gint _tmp34_;
+ gint _tmp35_;
+ GeeCollection* _tmp36_;
+ gboolean _tmp37_;
+ gboolean _tmp38_;
+ GeeCollection* _tmp39_;
+ gboolean _tmp40_ = FALSE;
+ gchar** _tmp41_;
+ gint _tmp41__length1;
GeeCollection* _tmp45_;
- gboolean _tmp46_ = FALSE;
- GeeCollection* _tmp47_;
- gboolean _tmp48_ = FALSE;
- GeeCollection* _tmp49_;
- gint _tmp50_;
- gint _tmp51_;
- GeeCollection* _tmp52_;
- gboolean _tmp53_;
- gboolean _tmp54_;
- GeeCollection* _tmp55_;
- gboolean _tmp56_ = FALSE;
- GeeCollection* _tmp57_;
- gboolean _tmp58_ = FALSE;
- GeeCollection* _tmp59_;
- gboolean _tmp60_ = FALSE;
- GeeCollection* _tmp61_;
- gboolean _tmp62_ = FALSE;
- GeeCollection* _tmp63_;
- gint _tmp64_;
- gint _tmp65_;
- GeeCollection* _tmp66_;
- gboolean _tmp67_;
- gboolean _tmp68_;
- GeeCollection* _tmp69_;
- gboolean _tmp70_ = FALSE;
- GeeCollection* _tmp71_;
- gboolean _tmp72_ = FALSE;
- GeeCollection* _tmp73_;
- gboolean _tmp74_ = FALSE;
- GeeCollection* _tmp75_;
- gboolean _tmp76_ = FALSE;
- GeeCollection* _tmp77_;
- gint _tmp78_;
- gint _tmp79_;
- GeeCollection* _tmp80_;
- gboolean _tmp81_;
- gboolean _tmp82_;
- GeeCollection* _tmp83_;
- gboolean _tmp84_ = FALSE;
- GeeCollection* _tmp85_;
- gboolean _tmp86_ = FALSE;
- GeeCollection* _tmp87_;
- gboolean _tmp88_ = FALSE;
- GeeCollection* _tmp89_;
- gboolean _tmp90_ = FALSE;
- GeeCollection* _tmp91_;
- gint _tmp92_;
- gint _tmp93_;
- GeeCollection* _tmp94_;
- gboolean _tmp95_;
- gboolean _tmp96_;
- GeeCollection* _tmp97_;
- gboolean _tmp98_ = FALSE;
- GeeCollection* _tmp99_;
- gboolean _tmp100_ = FALSE;
- GeeCollection* _tmp101_;
- gboolean _tmp102_ = FALSE;
- GeeCollection* _tmp103_;
- gboolean _tmp104_ = FALSE;
- GeeCollection* _tmp105_;
- gint _tmp106_;
- gint _tmp107_;
- GeeCollection* _tmp108_;
- gboolean _tmp109_;
- gboolean _tmp110_;
- GeeCollection* _tmp111_;
- GeeCollection* _tmp112_;
- gboolean _tmp113_ = FALSE;
- GeeCollection* _tmp114_;
- gboolean _tmp115_ = FALSE;
- GeeCollection* _tmp116_;
- gboolean _tmp117_ = FALSE;
- GeeCollection* _tmp118_;
- gint _tmp119_;
- gint _tmp120_;
- GeeCollection* _tmp121_;
- gboolean _tmp122_;
- gboolean _tmp123_;
+ gint _tmp46_;
+ gint _tmp47_;
+ GeeCollection* _tmp48_;
+ gboolean _tmp49_;
+ gboolean _tmp50_;
+ GeeCollection* _tmp158_;
+ gchar** _tmp159_;
+ gint _tmp159__length1;
+ GeeCollection* _tmp163_;
+ gint _tmp164_;
+ gint _tmp165_;
+ GeeCollection* _tmp166_;
+ gboolean _tmp167_;
+ gboolean _tmp168_;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
- _tmp1_ = self->test_collection;
- _tmp2_ = gee_collection_contains (_tmp1_, "one");
- _vala_assert (!_tmp2_, "! test_collection.contains (\"one\")");
- _tmp3_ = self->test_collection;
- _tmp4_ = gee_collection_contains (_tmp3_, "two");
- _vala_assert (!_tmp4_, "! test_collection.contains (\"two\")");
- _tmp5_ = self->test_collection;
- _tmp6_ = gee_collection_contains (_tmp5_, "three");
- _vala_assert (!_tmp6_, "! test_collection.contains (\"three\")");
- _tmp7_ = self->test_collection;
- _tmp8_ = gee_collection_get_size (_tmp7_);
- _tmp9_ = _tmp8_;
- _vala_assert (_tmp9_ == 0, "test_collection.size == 0");
- _tmp10_ = self->test_collection;
- _tmp11_ = gee_collection_get_is_empty (_tmp10_);
- _tmp12_ = _tmp11_;
- _vala_assert (_tmp12_, "test_collection.is_empty");
- _tmp13_ = self->test_collection;
- _tmp14_ = gee_collection_add (_tmp13_, "one");
- _vala_assert (_tmp14_, "test_collection.add (\"one\")");
+ _tmp2_ = test_data_get_data (&_tmp1_);
+ data = _tmp2_;
+ data_length1 = _tmp1_;
+ _data_size_ = data_length1;
+ _tmp4_ = test_data_get_drawn_numbers (&_tmp3_);
+ idx = _tmp4_;
+ idx_length1 = _tmp3_;
+ _idx_size_ = idx_length1;
+ _tmp5_ = data;
+ _tmp5__length1 = data_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp5_;
+ s_collection_length1 = _tmp5__length1;
+ for (s_it = 0; s_it < _tmp5__length1; s_it = s_it + 1) {
+ const gchar* s = NULL;
+ s = s_collection[s_it];
+ {
+ GeeCollection* _tmp6_;
+ const gchar* _tmp7_;
+ gboolean _tmp8_ = FALSE;
+ _tmp6_ = self->test_collection;
+ _tmp7_ = s;
+ _tmp8_ = gee_collection_contains (_tmp6_, _tmp7_);
+ _vala_assert (!_tmp8_, "! test_collection.contains (s)");
+ }
+ }
+ }
+ _tmp9_ = self->test_collection;
+ _tmp10_ = gee_collection_get_size (_tmp9_);
+ _tmp11_ = _tmp10_;
+ _vala_assert (_tmp11_ == 0, "test_collection.size == 0");
+ _tmp12_ = self->test_collection;
+ _tmp13_ = gee_collection_get_is_empty (_tmp12_);
+ _tmp14_ = _tmp13_;
+ _vala_assert (_tmp14_, "test_collection.is_empty");
_tmp15_ = self->test_collection;
- _tmp16_ = gee_collection_contains (_tmp15_, "one");
- _vala_assert (_tmp16_, "test_collection.contains (\"one\")");
- _tmp17_ = self->test_collection;
- _tmp18_ = gee_collection_contains (_tmp17_, "two");
- _vala_assert (!_tmp18_, "! test_collection.contains (\"two\")");
+ _tmp16_ = data;
+ _tmp16__length1 = data_length1;
+ _tmp17_ = _tmp16_[0];
+ _tmp18_ = gee_collection_add (_tmp15_, _tmp17_);
+ _vala_assert (_tmp18_, "test_collection.add (data[0])");
_tmp19_ = self->test_collection;
- _tmp20_ = gee_collection_contains (_tmp19_, "three");
- _vala_assert (!_tmp20_, "! test_collection.contains (\"three\")");
- _tmp21_ = self->test_collection;
- _tmp22_ = gee_collection_get_size (_tmp21_);
- _tmp23_ = _tmp22_;
- _vala_assert (_tmp23_ == 1, "test_collection.size == 1");
- _tmp24_ = self->test_collection;
- _tmp25_ = gee_collection_get_is_empty (_tmp24_);
- _tmp26_ = _tmp25_;
- _vala_assert (!_tmp26_, "! test_collection.is_empty");
- _tmp27_ = self->test_collection;
- _tmp28_ = gee_collection_remove (_tmp27_, "one");
- _vala_assert (_tmp28_, "test_collection.remove (\"one\")");
- _tmp29_ = self->test_collection;
- _tmp30_ = gee_collection_contains (_tmp29_, "one");
- _vala_assert (!_tmp30_, "! test_collection.contains (\"one\")");
- _tmp31_ = self->test_collection;
- _tmp32_ = gee_collection_contains (_tmp31_, "two");
- _vala_assert (!_tmp32_, "! test_collection.contains (\"two\")");
+ _tmp20_ = data;
+ _tmp20__length1 = data_length1;
+ _tmp21_ = _tmp20_[0];
+ _tmp22_ = gee_collection_contains (_tmp19_, _tmp21_);
+ _vala_assert (_tmp22_, "test_collection.contains (data[0])");
+ {
+ guint i;
+ i = (guint) 1;
+ {
+ gboolean _tmp23_;
+ _tmp23_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp24_;
+ guint _tmp26_;
+ gchar** _tmp27_;
+ gint _tmp27__length1;
+ GeeCollection* _tmp28_;
+ gchar** _tmp29_;
+ gint _tmp29__length1;
+ guint _tmp30_;
+ const gchar* _tmp31_;
+ gboolean _tmp32_ = FALSE;
+ _tmp24_ = _tmp23_;
+ if (!_tmp24_) {
+ guint _tmp25_;
+ _tmp25_ = i;
+ i = _tmp25_ + 1;
+ }
+ _tmp23_ = FALSE;
+ _tmp26_ = i;
+ _tmp27_ = data;
+ _tmp27__length1 = data_length1;
+ if (!(_tmp26_ < ((guint) _tmp27__length1))) {
+ break;
+ }
+ _tmp28_ = self->test_collection;
+ _tmp29_ = data;
+ _tmp29__length1 = data_length1;
+ _tmp30_ = i;
+ _tmp31_ = _tmp29_[_tmp30_];
+ _tmp32_ = gee_collection_contains (_tmp28_, _tmp31_);
+ _vala_assert (!_tmp32_, "! test_collection.contains (data[i])");
+ }
+ }
+ }
_tmp33_ = self->test_collection;
- _tmp34_ = gee_collection_contains (_tmp33_, "three");
- _vala_assert (!_tmp34_, "! test_collection.contains (\"three\")");
- _tmp35_ = self->test_collection;
- _tmp36_ = gee_collection_get_size (_tmp35_);
- _tmp37_ = _tmp36_;
- _vala_assert (_tmp37_ == 0, "test_collection.size == 0");
- _tmp38_ = self->test_collection;
- _tmp39_ = gee_collection_get_is_empty (_tmp38_);
- _tmp40_ = _tmp39_;
- _vala_assert (_tmp40_, "test_collection.is_empty");
- _tmp41_ = self->test_collection;
- _tmp42_ = gee_collection_add (_tmp41_, "one");
- _vala_assert (_tmp42_, "test_collection.add (\"one\")");
- _tmp43_ = self->test_collection;
- _tmp44_ = gee_collection_contains (_tmp43_, "one");
- _vala_assert (_tmp44_, "test_collection.contains (\"one\")");
+ _tmp34_ = gee_collection_get_size (_tmp33_);
+ _tmp35_ = _tmp34_;
+ _vala_assert (_tmp35_ == 1, "test_collection.size == 1");
+ _tmp36_ = self->test_collection;
+ _tmp37_ = gee_collection_get_is_empty (_tmp36_);
+ _tmp38_ = _tmp37_;
+ _vala_assert (!_tmp38_, "! test_collection.is_empty");
+ _tmp39_ = self->test_collection;
+ _tmp40_ = gee_collection_remove (_tmp39_, "one");
+ _vala_assert (_tmp40_, "test_collection.remove (\"one\")");
+ _tmp41_ = data;
+ _tmp41__length1 = data_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp41_;
+ s_collection_length1 = _tmp41__length1;
+ for (s_it = 0; s_it < _tmp41__length1; s_it = s_it + 1) {
+ const gchar* s = NULL;
+ s = s_collection[s_it];
+ {
+ GeeCollection* _tmp42_;
+ const gchar* _tmp43_;
+ gboolean _tmp44_ = FALSE;
+ _tmp42_ = self->test_collection;
+ _tmp43_ = s;
+ _tmp44_ = gee_collection_contains (_tmp42_, _tmp43_);
+ _vala_assert (!_tmp44_, "! test_collection.contains (s)");
+ }
+ }
+ }
_tmp45_ = self->test_collection;
- _tmp46_ = gee_collection_contains (_tmp45_, "two");
- _vala_assert (!_tmp46_, "! test_collection.contains (\"two\")");
- _tmp47_ = self->test_collection;
- _tmp48_ = gee_collection_contains (_tmp47_, "three");
- _vala_assert (!_tmp48_, "! test_collection.contains (\"three\")");
- _tmp49_ = self->test_collection;
- _tmp50_ = gee_collection_get_size (_tmp49_);
- _tmp51_ = _tmp50_;
- _vala_assert (_tmp51_ == 1, "test_collection.size == 1");
- _tmp52_ = self->test_collection;
- _tmp53_ = gee_collection_get_is_empty (_tmp52_);
- _tmp54_ = _tmp53_;
- _vala_assert (!_tmp54_, "! test_collection.is_empty");
- _tmp55_ = self->test_collection;
- _tmp56_ = gee_collection_add (_tmp55_, "two");
- _vala_assert (_tmp56_, "test_collection.add (\"two\")");
- _tmp57_ = self->test_collection;
- _tmp58_ = gee_collection_contains (_tmp57_, "one");
- _vala_assert (_tmp58_, "test_collection.contains (\"one\")");
- _tmp59_ = self->test_collection;
- _tmp60_ = gee_collection_contains (_tmp59_, "two");
- _vala_assert (_tmp60_, "test_collection.contains (\"two\")");
- _tmp61_ = self->test_collection;
- _tmp62_ = gee_collection_contains (_tmp61_, "three");
- _vala_assert (!_tmp62_, "! test_collection.contains (\"three\")");
- _tmp63_ = self->test_collection;
- _tmp64_ = gee_collection_get_size (_tmp63_);
- _tmp65_ = _tmp64_;
- _vala_assert (_tmp65_ == 2, "test_collection.size == 2");
- _tmp66_ = self->test_collection;
- _tmp67_ = gee_collection_get_is_empty (_tmp66_);
- _tmp68_ = _tmp67_;
- _vala_assert (!_tmp68_, "! test_collection.is_empty");
- _tmp69_ = self->test_collection;
- _tmp70_ = gee_collection_add (_tmp69_, "three");
- _vala_assert (_tmp70_, "test_collection.add (\"three\")");
- _tmp71_ = self->test_collection;
- _tmp72_ = gee_collection_contains (_tmp71_, "one");
- _vala_assert (_tmp72_, "test_collection.contains (\"one\")");
- _tmp73_ = self->test_collection;
- _tmp74_ = gee_collection_contains (_tmp73_, "two");
- _vala_assert (_tmp74_, "test_collection.contains (\"two\")");
- _tmp75_ = self->test_collection;
- _tmp76_ = gee_collection_contains (_tmp75_, "three");
- _vala_assert (_tmp76_, "test_collection.contains (\"three\")");
- _tmp77_ = self->test_collection;
- _tmp78_ = gee_collection_get_size (_tmp77_);
- _tmp79_ = _tmp78_;
- _vala_assert (_tmp79_ == 3, "test_collection.size == 3");
- _tmp80_ = self->test_collection;
- _tmp81_ = gee_collection_get_is_empty (_tmp80_);
- _tmp82_ = _tmp81_;
- _vala_assert (!_tmp82_, "! test_collection.is_empty");
- _tmp83_ = self->test_collection;
- _tmp84_ = gee_collection_remove (_tmp83_, "two");
- _vala_assert (_tmp84_, "test_collection.remove (\"two\")");
- _tmp85_ = self->test_collection;
- _tmp86_ = gee_collection_contains (_tmp85_, "one");
- _vala_assert (_tmp86_, "test_collection.contains (\"one\")");
- _tmp87_ = self->test_collection;
- _tmp88_ = gee_collection_contains (_tmp87_, "two");
- _vala_assert (!_tmp88_, "! test_collection.contains (\"two\")");
- _tmp89_ = self->test_collection;
- _tmp90_ = gee_collection_contains (_tmp89_, "three");
- _vala_assert (_tmp90_, "test_collection.contains (\"three\")");
- _tmp91_ = self->test_collection;
- _tmp92_ = gee_collection_get_size (_tmp91_);
- _tmp93_ = _tmp92_;
- _vala_assert (_tmp93_ == 2, "test_collection.size == 2");
- _tmp94_ = self->test_collection;
- _tmp95_ = gee_collection_get_is_empty (_tmp94_);
- _tmp96_ = _tmp95_;
- _vala_assert (!_tmp96_, "! test_collection.is_empty");
- _tmp97_ = self->test_collection;
- _tmp98_ = gee_collection_remove (_tmp97_, "two");
- _vala_assert (!_tmp98_, "! test_collection.remove (\"two\")");
- _tmp99_ = self->test_collection;
- _tmp100_ = gee_collection_contains (_tmp99_, "one");
- _vala_assert (_tmp100_, "test_collection.contains (\"one\")");
- _tmp101_ = self->test_collection;
- _tmp102_ = gee_collection_contains (_tmp101_, "two");
- _vala_assert (!_tmp102_, "! test_collection.contains (\"two\")");
- _tmp103_ = self->test_collection;
- _tmp104_ = gee_collection_contains (_tmp103_, "three");
- _vala_assert (_tmp104_, "test_collection.contains (\"three\")");
- _tmp105_ = self->test_collection;
- _tmp106_ = gee_collection_get_size (_tmp105_);
- _tmp107_ = _tmp106_;
- _vala_assert (_tmp107_ == 2, "test_collection.size == 2");
- _tmp108_ = self->test_collection;
- _tmp109_ = gee_collection_get_is_empty (_tmp108_);
- _tmp110_ = _tmp109_;
- _vala_assert (!_tmp110_, "! test_collection.is_empty");
- _tmp111_ = self->test_collection;
- gee_collection_clear (_tmp111_);
- _tmp112_ = self->test_collection;
- _tmp113_ = gee_collection_contains (_tmp112_, "one");
- _vala_assert (!_tmp113_, "! test_collection.contains (\"one\")");
- _tmp114_ = self->test_collection;
- _tmp115_ = gee_collection_contains (_tmp114_, "two");
- _vala_assert (!_tmp115_, "! test_collection.contains (\"two\")");
- _tmp116_ = self->test_collection;
- _tmp117_ = gee_collection_contains (_tmp116_, "three");
- _vala_assert (!_tmp117_, "! test_collection.contains (\"three\")");
- _tmp118_ = self->test_collection;
- _tmp119_ = gee_collection_get_size (_tmp118_);
- _tmp120_ = _tmp119_;
- _vala_assert (_tmp120_ == 0, "test_collection.size == 0");
- _tmp121_ = self->test_collection;
- _tmp122_ = gee_collection_get_is_empty (_tmp121_);
- _tmp123_ = _tmp122_;
- _vala_assert (_tmp123_, "test_collection.is_empty");
+ _tmp46_ = gee_collection_get_size (_tmp45_);
+ _tmp47_ = _tmp46_;
+ _vala_assert (_tmp47_ == 0, "test_collection.size == 0");
+ _tmp48_ = self->test_collection;
+ _tmp49_ = gee_collection_get_is_empty (_tmp48_);
+ _tmp50_ = _tmp49_;
+ _vala_assert (_tmp50_, "test_collection.is_empty");
+ {
+ guint i;
+ i = (guint) 0;
+ {
+ gboolean _tmp51_;
+ _tmp51_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp52_;
+ guint _tmp54_;
+ gchar** _tmp55_;
+ gint _tmp55__length1;
+ GeeCollection* _tmp56_;
+ gchar** _tmp57_;
+ gint _tmp57__length1;
+ guint _tmp58_;
+ const gchar* _tmp59_;
+ gboolean _tmp60_ = FALSE;
+ GeeCollection* _tmp82_;
+ gint _tmp83_;
+ gint _tmp84_;
+ guint _tmp85_;
+ GeeCollection* _tmp86_;
+ gboolean _tmp87_;
+ gboolean _tmp88_;
+ _tmp52_ = _tmp51_;
+ if (!_tmp52_) {
+ guint _tmp53_;
+ _tmp53_ = i;
+ i = _tmp53_ + 1;
+ }
+ _tmp51_ = FALSE;
+ _tmp54_ = i;
+ _tmp55_ = data;
+ _tmp55__length1 = data_length1;
+ if (!(_tmp54_ < ((guint) _tmp55__length1))) {
+ break;
+ }
+ _tmp56_ = self->test_collection;
+ _tmp57_ = data;
+ _tmp57__length1 = data_length1;
+ _tmp58_ = i;
+ _tmp59_ = _tmp57_[_tmp58_];
+ _tmp60_ = gee_collection_add (_tmp56_, _tmp59_);
+ _vala_assert (_tmp60_, "test_collection.add (data[i])");
+ {
+ guint j;
+ j = (guint) 0;
+ {
+ gboolean _tmp61_;
+ _tmp61_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp62_;
+ guint _tmp64_;
+ guint _tmp65_;
+ GeeCollection* _tmp66_;
+ gchar** _tmp67_;
+ gint _tmp67__length1;
+ guint _tmp68_;
+ const gchar* _tmp69_;
+ gboolean _tmp70_ = FALSE;
+ _tmp62_ = _tmp61_;
+ if (!_tmp62_) {
+ guint _tmp63_;
+ _tmp63_ = j;
+ j = _tmp63_ + 1;
+ }
+ _tmp61_ = FALSE;
+ _tmp64_ = j;
+ _tmp65_ = i;
+ if (!(_tmp64_ <= _tmp65_)) {
+ break;
+ }
+ _tmp66_ = self->test_collection;
+ _tmp67_ = data;
+ _tmp67__length1 = data_length1;
+ _tmp68_ = j;
+ _tmp69_ = _tmp67_[_tmp68_];
+ _tmp70_ = gee_collection_contains (_tmp66_, _tmp69_);
+ _vala_assert (_tmp70_, "test_collection.contains (data[j])");
+ }
+ }
+ }
+ {
+ guint _tmp71_;
+ guint j;
+ _tmp71_ = i;
+ j = _tmp71_ + 1;
+ {
+ gboolean _tmp72_;
+ _tmp72_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp73_;
+ guint _tmp75_;
+ gchar** _tmp76_;
+ gint _tmp76__length1;
+ GeeCollection* _tmp77_;
+ gchar** _tmp78_;
+ gint _tmp78__length1;
+ guint _tmp79_;
+ const gchar* _tmp80_;
+ gboolean _tmp81_ = FALSE;
+ _tmp73_ = _tmp72_;
+ if (!_tmp73_) {
+ guint _tmp74_;
+ _tmp74_ = j;
+ j = _tmp74_ + 1;
+ }
+ _tmp72_ = FALSE;
+ _tmp75_ = j;
+ _tmp76_ = data;
+ _tmp76__length1 = data_length1;
+ if (!(_tmp75_ < ((guint) _tmp76__length1))) {
+ break;
+ }
+ _tmp77_ = self->test_collection;
+ _tmp78_ = data;
+ _tmp78__length1 = data_length1;
+ _tmp79_ = j;
+ _tmp80_ = _tmp78_[_tmp79_];
+ _tmp81_ = gee_collection_contains (_tmp77_, _tmp80_);
+ _vala_assert (!_tmp81_, "! test_collection.contains (data[j])");
+ }
+ }
+ }
+ _tmp82_ = self->test_collection;
+ _tmp83_ = gee_collection_get_size (_tmp82_);
+ _tmp84_ = _tmp83_;
+ _tmp85_ = i;
+ _vala_assert (((guint) _tmp84_) == (_tmp85_ + 1), "test_collection.size == i + 1");
+ _tmp86_ = self->test_collection;
+ _tmp87_ = gee_collection_get_is_empty (_tmp86_);
+ _tmp88_ = _tmp87_;
+ _vala_assert (!_tmp88_, "! test_collection.is_empty");
+ }
+ }
+ }
+ {
+ guint i;
+ i = (guint) 0;
+ {
+ gboolean _tmp89_;
+ _tmp89_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp90_;
+ guint _tmp92_;
+ guint* _tmp93_;
+ gint _tmp93__length1;
+ GeeCollection* _tmp94_;
+ gchar** _tmp95_;
+ gint _tmp95__length1;
+ guint* _tmp96_;
+ gint _tmp96__length1;
+ guint _tmp97_;
+ guint _tmp98_;
+ const gchar* _tmp99_;
+ gboolean _tmp100_ = FALSE;
+ GeeCollection* _tmp121_;
+ gint _tmp122_;
+ gint _tmp123_;
+ gchar** _tmp124_;
+ gint _tmp124__length1;
+ guint _tmp125_;
+ GeeCollection* _tmp126_;
+ gchar** _tmp127_;
+ gint _tmp127__length1;
+ guint* _tmp128_;
+ gint _tmp128__length1;
+ guint _tmp129_;
+ guint _tmp130_;
+ const gchar* _tmp131_;
+ gboolean _tmp132_ = FALSE;
+ GeeCollection* _tmp153_;
+ gint _tmp154_;
+ gint _tmp155_;
+ gchar** _tmp156_;
+ gint _tmp156__length1;
+ guint _tmp157_;
+ _tmp90_ = _tmp89_;
+ if (!_tmp90_) {
+ guint _tmp91_;
+ _tmp91_ = i;
+ i = _tmp91_ + 1;
+ }
+ _tmp89_ = FALSE;
+ _tmp92_ = i;
+ _tmp93_ = idx;
+ _tmp93__length1 = idx_length1;
+ if (!(_tmp92_ < ((guint) _tmp93__length1))) {
+ break;
+ }
+ _tmp94_ = self->test_collection;
+ _tmp95_ = data;
+ _tmp95__length1 = data_length1;
+ _tmp96_ = idx;
+ _tmp96__length1 = idx_length1;
+ _tmp97_ = i;
+ _tmp98_ = _tmp96_[_tmp97_];
+ _tmp99_ = _tmp95_[_tmp98_];
+ _tmp100_ = gee_collection_remove (_tmp94_, _tmp99_);
+ _vala_assert (_tmp100_, "test_collection.remove (data[idx[i]])");
+ {
+ guint j;
+ j = (guint) 0;
+ {
+ gboolean _tmp101_;
+ _tmp101_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp102_;
+ guint _tmp104_;
+ gchar** _tmp105_;
+ gint _tmp105__length1;
+ gboolean removed;
+ GeeCollection* _tmp115_;
+ gchar** _tmp116_;
+ gint _tmp116__length1;
+ guint _tmp117_;
+ const gchar* _tmp118_;
+ gboolean _tmp119_ = FALSE;
+ gboolean _tmp120_;
+ _tmp102_ = _tmp101_;
+ if (!_tmp102_) {
+ guint _tmp103_;
+ _tmp103_ = j;
+ j = _tmp103_ + 1;
+ }
+ _tmp101_ = FALSE;
+ _tmp104_ = j;
+ _tmp105_ = data;
+ _tmp105__length1 = data_length1;
+ if (!(_tmp104_ < ((guint) _tmp105__length1))) {
+ break;
+ }
+ removed = FALSE;
+ {
+ guint k;
+ k = (guint) 0;
+ {
+ gboolean _tmp106_;
+ _tmp106_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp107_;
+ guint _tmp109_;
+ guint _tmp110_;
+ guint* _tmp111_;
+ gint _tmp111__length1;
+ guint _tmp112_;
+ guint _tmp113_;
+ guint _tmp114_;
+ _tmp107_ = _tmp106_;
+ if (!_tmp107_) {
+ guint _tmp108_;
+ _tmp108_ = k;
+ k = _tmp108_ + 1;
+ }
+ _tmp106_ = FALSE;
+ _tmp109_ = k;
+ _tmp110_ = i;
+ if (!(_tmp109_ <= _tmp110_)) {
+ break;
+ }
+ _tmp111_ = idx;
+ _tmp111__length1 = idx_length1;
+ _tmp112_ = k;
+ _tmp113_ = _tmp111_[_tmp112_];
+ _tmp114_ = j;
+ if (_tmp113_ == _tmp114_) {
+ removed = TRUE;
+ break;
+ }
+ }
+ }
+ }
+ _tmp115_ = self->test_collection;
+ _tmp116_ = data;
+ _tmp116__length1 = data_length1;
+ _tmp117_ = j;
+ _tmp118_ = _tmp116_[_tmp117_];
+ _tmp119_ = gee_collection_contains (_tmp115_, _tmp118_);
+ _tmp120_ = removed;
+ _vala_assert (_tmp119_ == (!_tmp120_), "test_collection.contains (data[j]) == !removed");
+ }
+ }
+ }
+ _tmp121_ = self->test_collection;
+ _tmp122_ = gee_collection_get_size (_tmp121_);
+ _tmp123_ = _tmp122_;
+ _tmp124_ = data;
+ _tmp124__length1 = data_length1;
+ _tmp125_ = i;
+ _vala_assert (((guint) _tmp123_) == (_tmp124__length1 - (_tmp125_ + 1)), "test_collection.size == data.length - (i + 1)");
+ _tmp126_ = self->test_collection;
+ _tmp127_ = data;
+ _tmp127__length1 = data_length1;
+ _tmp128_ = idx;
+ _tmp128__length1 = idx_length1;
+ _tmp129_ = i;
+ _tmp130_ = _tmp128_[_tmp129_];
+ _tmp131_ = _tmp127_[_tmp130_];
+ _tmp132_ = gee_collection_remove (_tmp126_, _tmp131_);
+ _vala_assert (!_tmp132_, "! test_collection.remove (data[idx[i]])");
+ {
+ guint j;
+ j = (guint) 0;
+ {
+ gboolean _tmp133_;
+ _tmp133_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp134_;
+ guint _tmp136_;
+ gchar** _tmp137_;
+ gint _tmp137__length1;
+ gboolean removed;
+ GeeCollection* _tmp147_;
+ gchar** _tmp148_;
+ gint _tmp148__length1;
+ guint _tmp149_;
+ const gchar* _tmp150_;
+ gboolean _tmp151_ = FALSE;
+ gboolean _tmp152_;
+ _tmp134_ = _tmp133_;
+ if (!_tmp134_) {
+ guint _tmp135_;
+ _tmp135_ = j;
+ j = _tmp135_ + 1;
+ }
+ _tmp133_ = FALSE;
+ _tmp136_ = j;
+ _tmp137_ = data;
+ _tmp137__length1 = data_length1;
+ if (!(_tmp136_ < ((guint) _tmp137__length1))) {
+ break;
+ }
+ removed = FALSE;
+ {
+ guint k;
+ k = (guint) 0;
+ {
+ gboolean _tmp138_;
+ _tmp138_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp139_;
+ guint _tmp141_;
+ guint _tmp142_;
+ guint* _tmp143_;
+ gint _tmp143__length1;
+ guint _tmp144_;
+ guint _tmp145_;
+ guint _tmp146_;
+ _tmp139_ = _tmp138_;
+ if (!_tmp139_) {
+ guint _tmp140_;
+ _tmp140_ = k;
+ k = _tmp140_ + 1;
+ }
+ _tmp138_ = FALSE;
+ _tmp141_ = k;
+ _tmp142_ = i;
+ if (!(_tmp141_ <= _tmp142_)) {
+ break;
+ }
+ _tmp143_ = idx;
+ _tmp143__length1 = idx_length1;
+ _tmp144_ = k;
+ _tmp145_ = _tmp143_[_tmp144_];
+ _tmp146_ = j;
+ if (_tmp145_ == _tmp146_) {
+ removed = TRUE;
+ break;
+ }
+ }
+ }
+ }
+ _tmp147_ = self->test_collection;
+ _tmp148_ = data;
+ _tmp148__length1 = data_length1;
+ _tmp149_ = j;
+ _tmp150_ = _tmp148_[_tmp149_];
+ _tmp151_ = gee_collection_contains (_tmp147_, _tmp150_);
+ _tmp152_ = removed;
+ _vala_assert (_tmp151_ == (!_tmp152_), "test_collection.contains (data[j]) == !removed");
+ }
+ }
+ }
+ _tmp153_ = self->test_collection;
+ _tmp154_ = gee_collection_get_size (_tmp153_);
+ _tmp155_ = _tmp154_;
+ _tmp156_ = data;
+ _tmp156__length1 = data_length1;
+ _tmp157_ = i;
+ _vala_assert (((guint) _tmp155_) == (_tmp156__length1 - (_tmp157_ + 1)), "test_collection.size == data.length - (i + 1)");
+ }
+ }
+ }
+ _tmp158_ = self->test_collection;
+ gee_collection_clear (_tmp158_);
+ _tmp159_ = data;
+ _tmp159__length1 = data_length1;
+ {
+ gchar** el_collection = NULL;
+ gint el_collection_length1 = 0;
+ gint _el_collection_size_ = 0;
+ gint el_it = 0;
+ el_collection = _tmp159_;
+ el_collection_length1 = _tmp159__length1;
+ for (el_it = 0; el_it < _tmp159__length1; el_it = el_it + 1) {
+ const gchar* el = NULL;
+ el = el_collection[el_it];
+ {
+ GeeCollection* _tmp160_;
+ const gchar* _tmp161_;
+ gboolean _tmp162_ = FALSE;
+ _tmp160_ = self->test_collection;
+ _tmp161_ = el;
+ _tmp162_ = gee_collection_contains (_tmp160_, _tmp161_);
+ _vala_assert (!_tmp162_, "! test_collection.contains (el)");
+ }
+ }
+ }
+ _tmp163_ = self->test_collection;
+ _tmp164_ = gee_collection_get_size (_tmp163_);
+ _tmp165_ = _tmp164_;
+ _vala_assert (_tmp165_ == 0, "test_collection.size == 0");
+ _tmp166_ = self->test_collection;
+ _tmp167_ = gee_collection_get_is_empty (_tmp166_);
+ _tmp168_ = _tmp167_;
+ _vala_assert (_tmp168_, "test_collection.is_empty");
}
void collection_tests_test_add_remove (CollectionTests* self) {
GeeCollection* _tmp0_;
- gchar* _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
- gchar* _tmp6_;
- gchar* _tmp7_;
- gchar* _tmp8_;
- gchar* _tmp9_;
- gchar* _tmp10_;
- gchar* _tmp11_;
- gchar* _tmp12_;
- gchar* _tmp13_;
- gchar* _tmp14_;
- gchar* _tmp15_;
- gchar* _tmp16_;
- gchar* _tmp17_;
- gchar* _tmp18_;
- gchar* _tmp19_;
- gchar* _tmp20_;
- gchar* _tmp21_;
- gchar* _tmp22_;
- gchar* _tmp23_;
- gchar* _tmp24_;
- gchar* _tmp25_;
- gchar* _tmp26_;
- gchar* _tmp27_;
- gchar* _tmp28_;
- gchar* _tmp29_;
- gchar* _tmp30_;
- gchar* _tmp31_;
- gchar* _tmp32_;
- gchar* _tmp33_;
- gchar* _tmp34_;
- gchar* _tmp35_;
- gchar* _tmp36_;
- gchar* _tmp37_;
- gchar* _tmp38_;
- gchar* _tmp39_;
- gchar** _tmp40_ = NULL;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
gchar** to_add;
gint to_add_length1;
gint _to_add_size_;
gint expected_size;
- gchar** _tmp41_;
- gint _tmp41__length1;
- GeeCollection* _tmp56_;
- gint _tmp57_;
- gint _tmp58_;
- gchar** _tmp59_;
- gint _tmp59__length1;
- gchar** _tmp60_;
- gint _tmp60__length1;
- gchar** _tmp65_;
- gint _tmp65__length1;
- GeeCollection* _tmp80_;
- gint _tmp81_;
- gint _tmp82_;
+ gchar** _tmp3_;
+ gint _tmp3__length1;
+ GeeCollection* _tmp18_;
+ gint _tmp19_;
+ gint _tmp20_;
+ gchar** _tmp21_;
+ gint _tmp21__length1;
+ gchar** _tmp22_;
+ gint _tmp22__length1;
+ gchar** _tmp27_;
+ gint _tmp27__length1;
+ GeeCollection* _tmp42_;
+ gint _tmp43_;
+ gint _tmp44_;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
- _tmp1_ = g_strdup ("one");
- _tmp2_ = g_strdup ("two");
- _tmp3_ = g_strdup ("three");
- _tmp4_ = g_strdup ("four");
- _tmp5_ = g_strdup ("five");
- _tmp6_ = g_strdup ("six");
- _tmp7_ = g_strdup ("seven");
- _tmp8_ = g_strdup ("eight");
- _tmp9_ = g_strdup ("nine");
- _tmp10_ = g_strdup ("ten");
- _tmp11_ = g_strdup ("eleven");
- _tmp12_ = g_strdup ("twelve");
- _tmp13_ = g_strdup ("thirteen");
- _tmp14_ = g_strdup ("fourteen");
- _tmp15_ = g_strdup ("fifteen");
- _tmp16_ = g_strdup ("sixteen");
- _tmp17_ = g_strdup ("seventeen");
- _tmp18_ = g_strdup ("eighteen");
- _tmp19_ = g_strdup ("nineteen");
- _tmp20_ = g_strdup ("twenty");
- _tmp21_ = g_strdup ("twenty one");
- _tmp22_ = g_strdup ("twenty two");
- _tmp23_ = g_strdup ("twenty three");
- _tmp24_ = g_strdup ("twenty four");
- _tmp25_ = g_strdup ("twenty five");
- _tmp26_ = g_strdup ("twenty six");
- _tmp27_ = g_strdup ("twenty seven");
- _tmp28_ = g_strdup ("twenty eight");
- _tmp29_ = g_strdup ("twenty nine");
- _tmp30_ = g_strdup ("thirty");
- _tmp31_ = g_strdup ("thirty one");
- _tmp32_ = g_strdup ("thirty two");
- _tmp33_ = g_strdup ("thirty four");
- _tmp34_ = g_strdup ("thirty five");
- _tmp35_ = g_strdup ("thirty six");
- _tmp36_ = g_strdup ("thirty seven");
- _tmp37_ = g_strdup ("thirty eight");
- _tmp38_ = g_strdup ("thirty nine");
- _tmp39_ = g_strdup ("fourty");
- _tmp40_ = g_new0 (gchar*, 39 + 1);
- _tmp40_[0] = _tmp1_;
- _tmp40_[1] = _tmp2_;
- _tmp40_[2] = _tmp3_;
- _tmp40_[3] = _tmp4_;
- _tmp40_[4] = _tmp5_;
- _tmp40_[5] = _tmp6_;
- _tmp40_[6] = _tmp7_;
- _tmp40_[7] = _tmp8_;
- _tmp40_[8] = _tmp9_;
- _tmp40_[9] = _tmp10_;
- _tmp40_[10] = _tmp11_;
- _tmp40_[11] = _tmp12_;
- _tmp40_[12] = _tmp13_;
- _tmp40_[13] = _tmp14_;
- _tmp40_[14] = _tmp15_;
- _tmp40_[15] = _tmp16_;
- _tmp40_[16] = _tmp17_;
- _tmp40_[17] = _tmp18_;
- _tmp40_[18] = _tmp19_;
- _tmp40_[19] = _tmp20_;
- _tmp40_[20] = _tmp21_;
- _tmp40_[21] = _tmp22_;
- _tmp40_[22] = _tmp23_;
- _tmp40_[23] = _tmp24_;
- _tmp40_[24] = _tmp25_;
- _tmp40_[25] = _tmp26_;
- _tmp40_[26] = _tmp27_;
- _tmp40_[27] = _tmp28_;
- _tmp40_[28] = _tmp29_;
- _tmp40_[29] = _tmp30_;
- _tmp40_[30] = _tmp31_;
- _tmp40_[31] = _tmp32_;
- _tmp40_[32] = _tmp33_;
- _tmp40_[33] = _tmp34_;
- _tmp40_[34] = _tmp35_;
- _tmp40_[35] = _tmp36_;
- _tmp40_[36] = _tmp37_;
- _tmp40_[37] = _tmp38_;
- _tmp40_[38] = _tmp39_;
- to_add = _tmp40_;
- to_add_length1 = 39;
+ _tmp2_ = test_data_get_data (&_tmp1_);
+ to_add = _tmp2_;
+ to_add_length1 = _tmp1_;
_to_add_size_ = to_add_length1;
expected_size = 0;
- _tmp41_ = to_add;
- _tmp41__length1 = to_add_length1;
+ _tmp3_ = to_add;
+ _tmp3__length1 = to_add_length1;
{
gchar** a_collection = NULL;
gint a_collection_length1 = 0;
gint _a_collection_size_ = 0;
gint a_it = 0;
- a_collection = _tmp41_;
- a_collection_length1 = _tmp41__length1;
- for (a_it = 0; a_it < _tmp41__length1; a_it = a_it + 1) {
- gchar* _tmp42_;
+ a_collection = _tmp3_;
+ a_collection_length1 = _tmp3__length1;
+ for (a_it = 0; a_it < _tmp3__length1; a_it = a_it + 1) {
+ gchar* _tmp4_;
gchar* a = NULL;
- _tmp42_ = g_strdup (a_collection[a_it]);
- a = _tmp42_;
+ _tmp4_ = g_strdup (a_collection[a_it]);
+ a = _tmp4_;
{
- GeeCollection* _tmp43_;
- const gchar* _tmp44_;
- gboolean _tmp45_ = FALSE;
- GeeCollection* _tmp46_;
- gint _tmp47_;
- gint _tmp48_;
- gint _tmp49_;
- GeeCollection* _tmp50_;
- const gchar* _tmp51_;
- gboolean _tmp52_ = FALSE;
- GeeCollection* _tmp53_;
- const gchar* _tmp54_;
- gboolean _tmp55_ = FALSE;
- _tmp43_ = self->test_collection;
- _tmp44_ = a;
- _tmp45_ = gee_collection_contains (_tmp43_, _tmp44_);
- _vala_assert (!_tmp45_, "!test_collection.contains (a)");
- _tmp46_ = self->test_collection;
- _tmp47_ = gee_collection_get_size (_tmp46_);
- _tmp48_ = _tmp47_;
- _tmp49_ = expected_size;
- expected_size = _tmp49_ + 1;
- _vala_assert (_tmp48_ == _tmp49_, "test_collection.size == expected_size++");
- _tmp50_ = self->test_collection;
- _tmp51_ = a;
- _tmp52_ = gee_collection_add (_tmp50_, _tmp51_);
- _vala_assert (_tmp52_, "test_collection.add (a)");
- _tmp53_ = self->test_collection;
- _tmp54_ = a;
- _tmp55_ = gee_collection_contains (_tmp53_, _tmp54_);
- _vala_assert (_tmp55_, "test_collection.contains (a)");
+ GeeCollection* _tmp5_;
+ const gchar* _tmp6_;
+ gboolean _tmp7_ = FALSE;
+ GeeCollection* _tmp8_;
+ gint _tmp9_;
+ gint _tmp10_;
+ gint _tmp11_;
+ GeeCollection* _tmp12_;
+ const gchar* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ GeeCollection* _tmp15_;
+ const gchar* _tmp16_;
+ gboolean _tmp17_ = FALSE;
+ _tmp5_ = self->test_collection;
+ _tmp6_ = a;
+ _tmp7_ = gee_collection_contains (_tmp5_, _tmp6_);
+ _vala_assert (!_tmp7_, "!test_collection.contains (a)");
+ _tmp8_ = self->test_collection;
+ _tmp9_ = gee_collection_get_size (_tmp8_);
+ _tmp10_ = _tmp9_;
+ _tmp11_ = expected_size;
+ expected_size = _tmp11_ + 1;
+ _vala_assert (_tmp10_ == _tmp11_, "test_collection.size == expected_size++");
+ _tmp12_ = self->test_collection;
+ _tmp13_ = a;
+ _tmp14_ = gee_collection_add (_tmp12_, _tmp13_);
+ _vala_assert (_tmp14_, "test_collection.add (a)");
+ _tmp15_ = self->test_collection;
+ _tmp16_ = a;
+ _tmp17_ = gee_collection_contains (_tmp15_, _tmp16_);
+ _vala_assert (_tmp17_, "test_collection.contains (a)");
_g_free0 (a);
}
}
}
- _tmp56_ = self->test_collection;
- _tmp57_ = gee_collection_get_size (_tmp56_);
- _tmp58_ = _tmp57_;
- _tmp59_ = to_add;
- _tmp59__length1 = to_add_length1;
- _vala_assert (_tmp58_ == _tmp59__length1, "test_collection.size == to_add.length");
- _tmp60_ = to_add;
- _tmp60__length1 = to_add_length1;
+ _tmp18_ = self->test_collection;
+ _tmp19_ = gee_collection_get_size (_tmp18_);
+ _tmp20_ = _tmp19_;
+ _tmp21_ = to_add;
+ _tmp21__length1 = to_add_length1;
+ _vala_assert (_tmp20_ == _tmp21__length1, "test_collection.size == to_add.length");
+ _tmp22_ = to_add;
+ _tmp22__length1 = to_add_length1;
{
gchar** a_collection = NULL;
gint a_collection_length1 = 0;
gint _a_collection_size_ = 0;
gint a_it = 0;
- a_collection = _tmp60_;
- a_collection_length1 = _tmp60__length1;
- for (a_it = 0; a_it < _tmp60__length1; a_it = a_it + 1) {
- gchar* _tmp61_;
+ a_collection = _tmp22_;
+ a_collection_length1 = _tmp22__length1;
+ for (a_it = 0; a_it < _tmp22__length1; a_it = a_it + 1) {
+ gchar* _tmp23_;
gchar* a = NULL;
- _tmp61_ = g_strdup (a_collection[a_it]);
- a = _tmp61_;
+ _tmp23_ = g_strdup (a_collection[a_it]);
+ a = _tmp23_;
{
- GeeCollection* _tmp62_;
- const gchar* _tmp63_;
- gboolean _tmp64_ = FALSE;
- _tmp62_ = self->test_collection;
- _tmp63_ = a;
- _tmp64_ = gee_collection_contains (_tmp62_, _tmp63_);
- _vala_assert (_tmp64_, "test_collection.contains (a)");
+ GeeCollection* _tmp24_;
+ const gchar* _tmp25_;
+ gboolean _tmp26_ = FALSE;
+ _tmp24_ = self->test_collection;
+ _tmp25_ = a;
+ _tmp26_ = gee_collection_contains (_tmp24_, _tmp25_);
+ _vala_assert (_tmp26_, "test_collection.contains (a)");
_g_free0 (a);
}
}
}
- _tmp65_ = to_add;
- _tmp65__length1 = to_add_length1;
+ _tmp27_ = to_add;
+ _tmp27__length1 = to_add_length1;
{
gchar** a_collection = NULL;
gint a_collection_length1 = 0;
gint _a_collection_size_ = 0;
gint a_it = 0;
- a_collection = _tmp65_;
- a_collection_length1 = _tmp65__length1;
- for (a_it = 0; a_it < _tmp65__length1; a_it = a_it + 1) {
- gchar* _tmp66_;
+ a_collection = _tmp27_;
+ a_collection_length1 = _tmp27__length1;
+ for (a_it = 0; a_it < _tmp27__length1; a_it = a_it + 1) {
+ gchar* _tmp28_;
gchar* a = NULL;
- _tmp66_ = g_strdup (a_collection[a_it]);
- a = _tmp66_;
+ _tmp28_ = g_strdup (a_collection[a_it]);
+ a = _tmp28_;
{
- GeeCollection* _tmp67_;
- const gchar* _tmp68_;
- gboolean _tmp69_ = FALSE;
- GeeCollection* _tmp70_;
- gint _tmp71_;
- gint _tmp72_;
- gint _tmp73_;
- GeeCollection* _tmp74_;
- const gchar* _tmp75_;
- gboolean _tmp76_ = FALSE;
- GeeCollection* _tmp77_;
- const gchar* _tmp78_;
- gboolean _tmp79_ = FALSE;
- _tmp67_ = self->test_collection;
- _tmp68_ = a;
- _tmp69_ = gee_collection_contains (_tmp67_, _tmp68_);
- _vala_assert (_tmp69_, "test_collection.contains (a)");
- _tmp70_ = self->test_collection;
- _tmp71_ = gee_collection_get_size (_tmp70_);
- _tmp72_ = _tmp71_;
- _tmp73_ = expected_size;
- expected_size = _tmp73_ - 1;
- _vala_assert (_tmp72_ == _tmp73_, "test_collection.size == expected_size--");
- _tmp74_ = self->test_collection;
- _tmp75_ = a;
- _tmp76_ = gee_collection_remove (_tmp74_, _tmp75_);
- _vala_assert (_tmp76_, "test_collection.remove (a)");
- _tmp77_ = self->test_collection;
- _tmp78_ = a;
- _tmp79_ = gee_collection_contains (_tmp77_, _tmp78_);
- _vala_assert (!_tmp79_, "!test_collection.contains (a)");
+ GeeCollection* _tmp29_;
+ const gchar* _tmp30_;
+ gboolean _tmp31_ = FALSE;
+ GeeCollection* _tmp32_;
+ gint _tmp33_;
+ gint _tmp34_;
+ gint _tmp35_;
+ GeeCollection* _tmp36_;
+ const gchar* _tmp37_;
+ gboolean _tmp38_ = FALSE;
+ GeeCollection* _tmp39_;
+ const gchar* _tmp40_;
+ gboolean _tmp41_ = FALSE;
+ _tmp29_ = self->test_collection;
+ _tmp30_ = a;
+ _tmp31_ = gee_collection_contains (_tmp29_, _tmp30_);
+ _vala_assert (_tmp31_, "test_collection.contains (a)");
+ _tmp32_ = self->test_collection;
+ _tmp33_ = gee_collection_get_size (_tmp32_);
+ _tmp34_ = _tmp33_;
+ _tmp35_ = expected_size;
+ expected_size = _tmp35_ - 1;
+ _vala_assert (_tmp34_ == _tmp35_, "test_collection.size == expected_size--");
+ _tmp36_ = self->test_collection;
+ _tmp37_ = a;
+ _tmp38_ = gee_collection_remove (_tmp36_, _tmp37_);
+ _vala_assert (_tmp38_, "test_collection.remove (a)");
+ _tmp39_ = self->test_collection;
+ _tmp40_ = a;
+ _tmp41_ = gee_collection_contains (_tmp39_, _tmp40_);
+ _vala_assert (!_tmp41_, "!test_collection.contains (a)");
_g_free0 (a);
}
}
}
- _tmp80_ = self->test_collection;
- _tmp81_ = gee_collection_get_size (_tmp80_);
- _tmp82_ = _tmp81_;
- _vala_assert (_tmp82_ == 0, "test_collection.size == 0");
- to_add = (_vala_array_free (to_add, to_add_length1, (GDestroyNotify) g_free), NULL);
+ _tmp42_ = self->test_collection;
+ _tmp43_ = gee_collection_get_size (_tmp42_);
+ _tmp44_ = _tmp43_;
+ _vala_assert (_tmp44_ == 0, "test_collection.size == 0");
}
void collection_tests_test_clear (CollectionTests* self) {
GeeCollection* _tmp0_;
- gchar* _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
- gchar* _tmp6_;
- gchar* _tmp7_;
- gchar* _tmp8_;
- gchar* _tmp9_;
- gchar* _tmp10_;
- gchar* _tmp11_;
- gchar* _tmp12_;
- gchar* _tmp13_;
- gchar* _tmp14_;
- gchar* _tmp15_;
- gchar* _tmp16_;
- gchar* _tmp17_;
- gchar* _tmp18_;
- gchar* _tmp19_;
- gchar* _tmp20_;
- gchar* _tmp21_;
- gchar* _tmp22_;
- gchar* _tmp23_;
- gchar* _tmp24_;
- gchar* _tmp25_;
- gchar* _tmp26_;
- gchar* _tmp27_;
- gchar* _tmp28_;
- gchar* _tmp29_;
- gchar* _tmp30_;
- gchar* _tmp31_;
- gchar* _tmp32_;
- gchar* _tmp33_;
- gchar* _tmp34_;
- gchar* _tmp35_;
- gchar* _tmp36_;
- gchar* _tmp37_;
- gchar* _tmp38_;
- gchar* _tmp39_;
- gchar** _tmp40_ = NULL;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
gchar** to_add;
gint to_add_length1;
gint _to_add_size_;
gint expected_size;
- gchar** _tmp41_;
- gint _tmp41__length1;
- GeeCollection* _tmp56_;
- gint _tmp57_;
- gint _tmp58_;
- gchar** _tmp59_;
- gint _tmp59__length1;
- GeeCollection* _tmp60_;
- GeeCollection* _tmp61_;
- gint _tmp62_;
- gint _tmp63_;
- GeeCollection* _tmp64_;
- GeeIterator* _tmp65_ = NULL;
+ gchar** _tmp3_;
+ gint _tmp3__length1;
+ GeeCollection* _tmp18_;
+ gint _tmp19_;
+ gint _tmp20_;
+ gchar** _tmp21_;
+ gint _tmp21__length1;
+ GeeCollection* _tmp22_;
+ GeeCollection* _tmp23_;
+ gint _tmp24_;
+ gint _tmp25_;
+ GeeCollection* _tmp26_;
+ GeeIterator* _tmp27_ = NULL;
GeeIterator* iter;
- gboolean _tmp66_ = FALSE;
+ gboolean _tmp28_ = FALSE;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
- _tmp1_ = g_strdup ("one");
- _tmp2_ = g_strdup ("two");
- _tmp3_ = g_strdup ("three");
- _tmp4_ = g_strdup ("four");
- _tmp5_ = g_strdup ("five");
- _tmp6_ = g_strdup ("six");
- _tmp7_ = g_strdup ("seven");
- _tmp8_ = g_strdup ("eight");
- _tmp9_ = g_strdup ("nine");
- _tmp10_ = g_strdup ("ten");
- _tmp11_ = g_strdup ("eleven");
- _tmp12_ = g_strdup ("twelve");
- _tmp13_ = g_strdup ("thirteen");
- _tmp14_ = g_strdup ("fourteen");
- _tmp15_ = g_strdup ("fifteen");
- _tmp16_ = g_strdup ("sixteen");
- _tmp17_ = g_strdup ("seventeen");
- _tmp18_ = g_strdup ("eighteen");
- _tmp19_ = g_strdup ("nineteen");
- _tmp20_ = g_strdup ("twenty");
- _tmp21_ = g_strdup ("twenty one");
- _tmp22_ = g_strdup ("twenty two");
- _tmp23_ = g_strdup ("twenty three");
- _tmp24_ = g_strdup ("twenty four");
- _tmp25_ = g_strdup ("twenty five");
- _tmp26_ = g_strdup ("twenty six");
- _tmp27_ = g_strdup ("twenty seven");
- _tmp28_ = g_strdup ("twenty eight");
- _tmp29_ = g_strdup ("twenty nine");
- _tmp30_ = g_strdup ("thirty");
- _tmp31_ = g_strdup ("thirty one");
- _tmp32_ = g_strdup ("thirty two");
- _tmp33_ = g_strdup ("thirty four");
- _tmp34_ = g_strdup ("thirty five");
- _tmp35_ = g_strdup ("thirty six");
- _tmp36_ = g_strdup ("thirty seven");
- _tmp37_ = g_strdup ("thirty eight");
- _tmp38_ = g_strdup ("thirty nine");
- _tmp39_ = g_strdup ("fourty");
- _tmp40_ = g_new0 (gchar*, 39 + 1);
- _tmp40_[0] = _tmp1_;
- _tmp40_[1] = _tmp2_;
- _tmp40_[2] = _tmp3_;
- _tmp40_[3] = _tmp4_;
- _tmp40_[4] = _tmp5_;
- _tmp40_[5] = _tmp6_;
- _tmp40_[6] = _tmp7_;
- _tmp40_[7] = _tmp8_;
- _tmp40_[8] = _tmp9_;
- _tmp40_[9] = _tmp10_;
- _tmp40_[10] = _tmp11_;
- _tmp40_[11] = _tmp12_;
- _tmp40_[12] = _tmp13_;
- _tmp40_[13] = _tmp14_;
- _tmp40_[14] = _tmp15_;
- _tmp40_[15] = _tmp16_;
- _tmp40_[16] = _tmp17_;
- _tmp40_[17] = _tmp18_;
- _tmp40_[18] = _tmp19_;
- _tmp40_[19] = _tmp20_;
- _tmp40_[20] = _tmp21_;
- _tmp40_[21] = _tmp22_;
- _tmp40_[22] = _tmp23_;
- _tmp40_[23] = _tmp24_;
- _tmp40_[24] = _tmp25_;
- _tmp40_[25] = _tmp26_;
- _tmp40_[26] = _tmp27_;
- _tmp40_[27] = _tmp28_;
- _tmp40_[28] = _tmp29_;
- _tmp40_[29] = _tmp30_;
- _tmp40_[30] = _tmp31_;
- _tmp40_[31] = _tmp32_;
- _tmp40_[32] = _tmp33_;
- _tmp40_[33] = _tmp34_;
- _tmp40_[34] = _tmp35_;
- _tmp40_[35] = _tmp36_;
- _tmp40_[36] = _tmp37_;
- _tmp40_[37] = _tmp38_;
- _tmp40_[38] = _tmp39_;
- to_add = _tmp40_;
- to_add_length1 = 39;
+ _tmp2_ = test_data_get_data (&_tmp1_);
+ to_add = _tmp2_;
+ to_add_length1 = _tmp1_;
_to_add_size_ = to_add_length1;
expected_size = 0;
- _tmp41_ = to_add;
- _tmp41__length1 = to_add_length1;
+ _tmp3_ = to_add;
+ _tmp3__length1 = to_add_length1;
{
gchar** a_collection = NULL;
gint a_collection_length1 = 0;
gint _a_collection_size_ = 0;
gint a_it = 0;
- a_collection = _tmp41_;
- a_collection_length1 = _tmp41__length1;
- for (a_it = 0; a_it < _tmp41__length1; a_it = a_it + 1) {
- gchar* _tmp42_;
+ a_collection = _tmp3_;
+ a_collection_length1 = _tmp3__length1;
+ for (a_it = 0; a_it < _tmp3__length1; a_it = a_it + 1) {
+ gchar* _tmp4_;
gchar* a = NULL;
- _tmp42_ = g_strdup (a_collection[a_it]);
- a = _tmp42_;
+ _tmp4_ = g_strdup (a_collection[a_it]);
+ a = _tmp4_;
{
- GeeCollection* _tmp43_;
- const gchar* _tmp44_;
- gboolean _tmp45_ = FALSE;
- GeeCollection* _tmp46_;
- gint _tmp47_;
- gint _tmp48_;
- gint _tmp49_;
- GeeCollection* _tmp50_;
- const gchar* _tmp51_;
- gboolean _tmp52_ = FALSE;
- GeeCollection* _tmp53_;
- const gchar* _tmp54_;
- gboolean _tmp55_ = FALSE;
- _tmp43_ = self->test_collection;
- _tmp44_ = a;
- _tmp45_ = gee_collection_contains (_tmp43_, _tmp44_);
- _vala_assert (!_tmp45_, "!test_collection.contains (a)");
- _tmp46_ = self->test_collection;
- _tmp47_ = gee_collection_get_size (_tmp46_);
- _tmp48_ = _tmp47_;
- _tmp49_ = expected_size;
- expected_size = _tmp49_ + 1;
- _vala_assert (_tmp48_ == _tmp49_, "test_collection.size == expected_size++");
- _tmp50_ = self->test_collection;
- _tmp51_ = a;
- _tmp52_ = gee_collection_add (_tmp50_, _tmp51_);
- _vala_assert (_tmp52_, "test_collection.add (a)");
- _tmp53_ = self->test_collection;
- _tmp54_ = a;
- _tmp55_ = gee_collection_contains (_tmp53_, _tmp54_);
- _vala_assert (_tmp55_, "test_collection.contains (a)");
+ GeeCollection* _tmp5_;
+ const gchar* _tmp6_;
+ gboolean _tmp7_ = FALSE;
+ GeeCollection* _tmp8_;
+ gint _tmp9_;
+ gint _tmp10_;
+ gint _tmp11_;
+ GeeCollection* _tmp12_;
+ const gchar* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ GeeCollection* _tmp15_;
+ const gchar* _tmp16_;
+ gboolean _tmp17_ = FALSE;
+ _tmp5_ = self->test_collection;
+ _tmp6_ = a;
+ _tmp7_ = gee_collection_contains (_tmp5_, _tmp6_);
+ _vala_assert (!_tmp7_, "!test_collection.contains (a)");
+ _tmp8_ = self->test_collection;
+ _tmp9_ = gee_collection_get_size (_tmp8_);
+ _tmp10_ = _tmp9_;
+ _tmp11_ = expected_size;
+ expected_size = _tmp11_ + 1;
+ _vala_assert (_tmp10_ == _tmp11_, "test_collection.size == expected_size++");
+ _tmp12_ = self->test_collection;
+ _tmp13_ = a;
+ _tmp14_ = gee_collection_add (_tmp12_, _tmp13_);
+ _vala_assert (_tmp14_, "test_collection.add (a)");
+ _tmp15_ = self->test_collection;
+ _tmp16_ = a;
+ _tmp17_ = gee_collection_contains (_tmp15_, _tmp16_);
+ _vala_assert (_tmp17_, "test_collection.contains (a)");
_g_free0 (a);
}
}
}
- _tmp56_ = self->test_collection;
- _tmp57_ = gee_collection_get_size (_tmp56_);
- _tmp58_ = _tmp57_;
- _tmp59_ = to_add;
- _tmp59__length1 = to_add_length1;
- _vala_assert (_tmp58_ == _tmp59__length1, "test_collection.size == to_add.length");
- _tmp60_ = self->test_collection;
- gee_collection_clear (_tmp60_);
- _tmp61_ = self->test_collection;
- _tmp62_ = gee_collection_get_size (_tmp61_);
- _tmp63_ = _tmp62_;
- _vala_assert (_tmp63_ == 0, "test_collection.size == 0");
- _tmp64_ = self->test_collection;
- _tmp65_ = gee_iterable_iterator ((GeeIterable*) _tmp64_);
- iter = _tmp65_;
+ _tmp18_ = self->test_collection;
+ _tmp19_ = gee_collection_get_size (_tmp18_);
+ _tmp20_ = _tmp19_;
+ _tmp21_ = to_add;
+ _tmp21__length1 = to_add_length1;
+ _vala_assert (_tmp20_ == _tmp21__length1, "test_collection.size == to_add.length");
+ _tmp22_ = self->test_collection;
+ gee_collection_clear (_tmp22_);
+ _tmp23_ = self->test_collection;
+ _tmp24_ = gee_collection_get_size (_tmp23_);
+ _tmp25_ = _tmp24_;
+ _vala_assert (_tmp25_ == 0, "test_collection.size == 0");
+ _tmp26_ = self->test_collection;
+ _tmp27_ = gee_iterable_iterator ((GeeIterable*) _tmp26_);
+ iter = _tmp27_;
_vala_assert (iter != NULL, "iter != null");
- _tmp66_ = gee_iterator_has_next (iter);
- _vala_assert (!_tmp66_, "!iter.has_next ()");
+ _tmp28_ = gee_iterator_has_next (iter);
+ _vala_assert (!_tmp28_, "!iter.has_next ()");
_g_object_unref0 (iter);
- to_add = (_vala_array_free (to_add, to_add_length1, (GDestroyNotify) g_free), NULL);
}
@@ -1615,7 +2022,7 @@ void collection_tests_test_add_all (CollectionTests* self) {
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
- _tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = _tmp1_;
_tmp2_ = self->test_collection;
_tmp3_ = gee_collection_add_all (_tmp2_, (GeeCollection*) dummy);
@@ -1624,7 +2031,7 @@ void collection_tests_test_add_all (CollectionTests* self) {
_tmp5_ = gee_collection_get_is_empty (_tmp4_);
_tmp6_ = _tmp5_;
_vala_assert (_tmp6_, "test_collection.is_empty");
- _tmp7_ = gee_abstract_collection_get_is_empty ((GeeAbstractCollection*) dummy);
+ _tmp7_ = gee_collection_get_is_empty ((GeeCollection*) dummy);
_tmp8_ = _tmp7_;
_vala_assert (_tmp8_, "dummy.is_empty");
_tmp9_ = self->test_collection;
@@ -1788,7 +2195,7 @@ void collection_tests_test_contains_all (CollectionTests* self) {
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
- _tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = _tmp1_;
_tmp2_ = gee_abstract_collection_add ((GeeAbstractCollection*) dummy, "hello1");
_vala_assert (_tmp2_, "dummy.add (\"hello1\")");
@@ -1828,7 +2235,7 @@ void collection_tests_test_contains_all (CollectionTests* self) {
_tmp25_ = gee_collection_contains_all (_tmp24_, (GeeCollection*) dummy);
_vala_assert (_tmp25_, "test_collection.contains_all (dummy)");
_tmp26_ = self->test_collection;
- _tmp27_ = gee_abstract_collection_contains_all ((GeeAbstractCollection*) dummy, _tmp26_);
+ _tmp27_ = gee_collection_contains_all ((GeeCollection*) dummy, _tmp26_);
_vala_assert (!_tmp27_, "! dummy.contains_all (test_collection)");
_g_object_unref0 (dummy);
}
@@ -1889,7 +2296,7 @@ void collection_tests_test_remove_all (CollectionTests* self) {
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
- _tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = _tmp1_;
_tmp2_ = self->test_collection;
_tmp3_ = gee_collection_remove_all (_tmp2_, (GeeCollection*) dummy);
@@ -1898,7 +2305,7 @@ void collection_tests_test_remove_all (CollectionTests* self) {
_tmp5_ = gee_collection_get_is_empty (_tmp4_);
_tmp6_ = _tmp5_;
_vala_assert (_tmp6_, "test_collection.is_empty");
- _tmp7_ = gee_abstract_collection_get_is_empty ((GeeAbstractCollection*) dummy);
+ _tmp7_ = gee_collection_get_is_empty ((GeeCollection*) dummy);
_tmp8_ = _tmp7_;
_vala_assert (_tmp8_, "dummy.is_empty");
_tmp9_ = gee_abstract_collection_add ((GeeAbstractCollection*) dummy, "hello1");
@@ -2082,7 +2489,7 @@ void collection_tests_test_retain_all (CollectionTests* self) {
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
- _tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = _tmp1_;
_tmp2_ = self->test_collection;
_tmp3_ = gee_collection_retain_all (_tmp2_, (GeeCollection*) dummy);
@@ -2091,7 +2498,7 @@ void collection_tests_test_retain_all (CollectionTests* self) {
_tmp5_ = gee_collection_get_is_empty (_tmp4_);
_tmp6_ = _tmp5_;
_vala_assert (_tmp6_, "test_collection.is_empty");
- _tmp7_ = gee_abstract_collection_get_is_empty ((GeeAbstractCollection*) dummy);
+ _tmp7_ = gee_collection_get_is_empty ((GeeCollection*) dummy);
_tmp8_ = _tmp7_;
_vala_assert (_tmp8_, "dummy.is_empty");
_tmp9_ = self->test_collection;
@@ -2107,7 +2514,7 @@ void collection_tests_test_retain_all (CollectionTests* self) {
_tmp16_ = gee_collection_get_is_empty (_tmp15_);
_tmp17_ = _tmp16_;
_vala_assert (_tmp17_, "test_collection.is_empty");
- _tmp18_ = gee_abstract_collection_get_is_empty ((GeeAbstractCollection*) dummy);
+ _tmp18_ = gee_collection_get_is_empty ((GeeCollection*) dummy);
_tmp19_ = _tmp18_;
_vala_assert (_tmp19_, "dummy.is_empty");
_tmp20_ = self->test_collection;
@@ -2343,64 +2750,1243 @@ void collection_tests_test_gobject_properties (CollectionTests* self) {
GValue _tmp1_ = {0};
GValue _tmp2_;
GeeCollection* _tmp3_;
- GType _tmp4_ = 0UL;
+ gint _tmp4_ = 0;
GeeCollection* _tmp5_;
- GType _tmp6_;
- GType _tmp7_;
- GValue _tmp8_ = {0};
- GValue _tmp9_;
- GeeCollection* _tmp10_;
- gboolean _tmp11_ = FALSE;
- GeeCollection* _tmp12_;
- gboolean _tmp13_;
- gboolean _tmp14_;
- GValue _tmp15_ = {0};
- GValue _tmp16_;
- GeeCollection* _tmp17_;
- gint _tmp18_ = 0;
- GeeCollection* _tmp19_;
- gint _tmp20_;
- gint _tmp21_;
+ gint _tmp6_;
+ gint _tmp7_;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_vala_assert (_tmp0_ != NULL, "test_collection != null");
- g_value_init (&_tmp1_, G_TYPE_GTYPE);
+ g_value_init (&_tmp1_, G_TYPE_INT);
G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
value = _tmp1_;
_tmp2_ = value;
_tmp3_ = self->test_collection;
- g_object_get_property ((GObject*) _tmp3_, "element-type", &value);
- _tmp4_ = g_value_get_gtype (&value);
+ g_object_get_property ((GObject*) _tmp3_, "size", &value);
+ _tmp4_ = g_value_get_int (&value);
_tmp5_ = self->test_collection;
- _tmp6_ = gee_iterable_get_element_type ((GeeIterable*) _tmp5_);
+ _tmp6_ = gee_collection_get_size (_tmp5_);
_tmp7_ = _tmp6_;
- _vala_assert (_tmp4_ == _tmp7_, "value.get_gtype () == test_collection.element_type");
+ _vala_assert (_tmp4_ == _tmp7_, "value.get_int () == test_collection.size");
g_value_unset (&value);
- g_value_init (&_tmp8_, G_TYPE_BOOLEAN);
G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp8_;
- _tmp9_ = value;
+}
+
+
+static gint __lambda3_ (CollectionTests* self, gchar* x, gint y) {
+ gint result = 0;
+ gint _tmp0_;
+ g_return_val_if_fail (x != NULL, 0);
+ _tmp0_ = y;
+ result = _tmp0_ + 1;
+ _g_free0 (x);
+ return result;
+}
+
+
+static gpointer ___lambda3__gee_fold_func (gpointer g, gpointer a, gpointer self) {
+ gpointer result;
+ result = __lambda3_ (self, g, a);
+ return result;
+}
+
+
+static gint __lambda4_ (CollectionTests* self, gchar* x, gint y) {
+ gint result = 0;
+ gint _tmp0_;
+ g_return_val_if_fail (x != NULL, 0);
+ _tmp0_ = y;
+ result = _tmp0_ + 1;
+ _g_free0 (x);
+ return result;
+}
+
+
+static gpointer ___lambda4__gee_fold_func (gpointer g, gpointer a, gpointer self) {
+ gpointer result;
+ result = __lambda4_ (self, g, a);
+ return result;
+}
+
+
+static gint __lambda5_ (CollectionTests* self, gchar* x, gint y) {
+ gint result = 0;
+ gint _tmp0_;
+ g_return_val_if_fail (x != NULL, 0);
+ _tmp0_ = y;
+ result = _tmp0_ + 1;
+ _g_free0 (x);
+ return result;
+}
+
+
+static gpointer ___lambda5__gee_fold_func (gpointer g, gpointer a, gpointer self) {
+ gpointer result;
+ result = __lambda5_ (self, g, a);
+ return result;
+}
+
+
+void collection_tests_test_fold (CollectionTests* self) {
+ GeeCollection* _tmp0_;
+ gboolean _tmp1_ = FALSE;
+ GeeCollection* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeCollection* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ gint count = 0;
+ GeeCollection* _tmp6_;
+ gpointer _tmp7_ = NULL;
+ gint _tmp8_;
+ GeeCollection* _tmp9_;
+ GeeIterator* _tmp10_ = NULL;
+ GeeIterator* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ gint _tmp13_;
+ GeeCollection* _tmp14_;
+ GeeIterator* _tmp15_ = NULL;
+ GeeIterator* iter;
+ gboolean _tmp16_ = FALSE;
+ gpointer _tmp17_ = NULL;
+ gint _tmp18_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->test_collection;
+ _tmp1_ = gee_collection_add (_tmp0_, "one");
+ _vala_assert (_tmp1_, "test_collection.add (\"one\")");
+ _tmp2_ = self->test_collection;
+ _tmp3_ = gee_collection_add (_tmp2_, "two");
+ _vala_assert (_tmp3_, "test_collection.add (\"two\")");
+ _tmp4_ = self->test_collection;
+ _tmp5_ = gee_collection_add (_tmp4_, "three");
+ _vala_assert (_tmp5_, "test_collection.add (\"three\")");
+ _tmp6_ = self->test_collection;
+ _tmp7_ = gee_traversable_fold ((GeeTraversable*) _tmp6_, G_TYPE_INT, NULL, NULL, ___lambda3__gee_fold_func, self, (gpointer) ((gintptr) 0));
+ count = (gint) ((gintptr) _tmp7_);
+ _tmp8_ = count;
+ _vala_assert (_tmp8_ == 3, "count == 3");
+ _tmp9_ = self->test_collection;
+ _tmp10_ = gee_iterable_iterator ((GeeIterable*) _tmp9_);
+ _tmp11_ = _tmp10_;
+ _tmp12_ = gee_traversable_fold ((GeeTraversable*) _tmp11_, G_TYPE_INT, NULL, NULL, ___lambda4__gee_fold_func, self, (gpointer) ((gintptr) 0));
+ count = (gint) ((gintptr) _tmp12_);
+ _g_object_unref0 (_tmp11_);
+ _tmp13_ = count;
+ _vala_assert (_tmp13_ == 3, "count == 3");
+ _tmp14_ = self->test_collection;
+ _tmp15_ = gee_iterable_iterator ((GeeIterable*) _tmp14_);
+ iter = _tmp15_;
+ _tmp16_ = gee_iterator_next (iter);
+ _vala_assert (_tmp16_, "iter.next ()");
+ _tmp17_ = gee_traversable_fold ((GeeTraversable*) iter, G_TYPE_INT, NULL, NULL, ___lambda5__gee_fold_func, self, (gpointer) ((gintptr) 0));
+ count = (gint) ((gintptr) _tmp17_);
+ _tmp18_ = count;
+ _vala_assert (_tmp18_ == 3, "count == 3");
+ _g_object_unref0 (iter);
+}
+
+
+static Block1Data* block1_data_ref (Block1Data* _data1_) {
+ g_atomic_int_inc (&_data1_->_ref_count_);
+ return _data1_;
+}
+
+
+static void block1_data_unref (void * _userdata_) {
+ Block1Data* _data1_;
+ _data1_ = (Block1Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
+ CollectionTests * self;
+ self = _data1_->self;
+ _g_object_unref0 (self);
+ g_slice_free (Block1Data, _data1_);
+ }
+}
+
+
+static gboolean __lambda6_ (Block1Data* _data1_, gchar* x) {
+ CollectionTests * self;
+ gboolean result = FALSE;
+ gint _tmp0_;
+ self = _data1_->self;
+ g_return_val_if_fail (x != NULL, FALSE);
+ _tmp0_ = _data1_->count;
+ _data1_->count = _tmp0_ + 1;
+ result = TRUE;
+ _g_free0 (x);
+ return result;
+}
+
+
+static gboolean ___lambda6__gee_forall_func (gpointer g, gpointer self) {
+ gboolean result;
+ result = __lambda6_ (self, g);
+ return result;
+}
+
+
+static gboolean __lambda7_ (Block1Data* _data1_, gchar* x) {
+ CollectionTests * self;
+ gboolean result = FALSE;
+ gint _tmp0_;
+ self = _data1_->self;
+ g_return_val_if_fail (x != NULL, FALSE);
+ _tmp0_ = _data1_->count;
+ _data1_->count = _tmp0_ + 1;
+ result = TRUE;
+ _g_free0 (x);
+ return result;
+}
+
+
+static gboolean ___lambda7__gee_forall_func (gpointer g, gpointer self) {
+ gboolean result;
+ result = __lambda7_ (self, g);
+ return result;
+}
+
+
+static gboolean __lambda8_ (Block1Data* _data1_, gchar* x) {
+ CollectionTests * self;
+ gboolean result = FALSE;
+ gint _tmp0_;
+ self = _data1_->self;
+ g_return_val_if_fail (x != NULL, FALSE);
+ _tmp0_ = _data1_->count;
+ _data1_->count = _tmp0_ + 1;
+ result = TRUE;
+ _g_free0 (x);
+ return result;
+}
+
+
+static gboolean ___lambda8__gee_forall_func (gpointer g, gpointer self) {
+ gboolean result;
+ result = __lambda8_ (self, g);
+ return result;
+}
+
+
+void collection_tests_test_foreach (CollectionTests* self) {
+ Block1Data* _data1_;
+ GeeCollection* _tmp0_;
+ gboolean _tmp1_ = FALSE;
+ GeeCollection* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeCollection* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeCollection* _tmp6_;
+ GeeCollection* _tmp7_;
+ GeeIterator* _tmp8_ = NULL;
+ GeeIterator* _tmp9_;
+ GeeCollection* _tmp10_;
+ GeeIterator* _tmp11_ = NULL;
+ GeeIterator* iter;
+ gboolean _tmp12_ = FALSE;
+ g_return_if_fail (self != NULL);
+ _data1_ = g_slice_new0 (Block1Data);
+ _data1_->_ref_count_ = 1;
+ _data1_->self = g_object_ref (self);
+ _tmp0_ = self->test_collection;
+ _tmp1_ = gee_collection_add (_tmp0_, "one");
+ _vala_assert (_tmp1_, "test_collection.add (\"one\")");
+ _tmp2_ = self->test_collection;
+ _tmp3_ = gee_collection_add (_tmp2_, "two");
+ _vala_assert (_tmp3_, "test_collection.add (\"two\")");
+ _tmp4_ = self->test_collection;
+ _tmp5_ = gee_collection_add (_tmp4_, "three");
+ _vala_assert (_tmp5_, "test_collection.add (\"three\")");
+ _data1_->count = 0;
+ _tmp6_ = self->test_collection;
+ gee_traversable_foreach ((GeeTraversable*) _tmp6_, ___lambda6__gee_forall_func, _data1_);
+ _vala_assert (_data1_->count == 3, "count == 3");
+ _tmp7_ = self->test_collection;
+ _tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_);
+ _tmp9_ = _tmp8_;
+ gee_traversable_foreach ((GeeTraversable*) _tmp9_, ___lambda7__gee_forall_func, _data1_);
+ _g_object_unref0 (_tmp9_);
+ _vala_assert (_data1_->count == 6, "count == 6");
_tmp10_ = self->test_collection;
- g_object_get_property ((GObject*) _tmp10_, "is-empty", &value);
- _tmp11_ = g_value_get_boolean (&value);
- _tmp12_ = self->test_collection;
- _tmp13_ = gee_collection_get_is_empty (_tmp12_);
- _tmp14_ = _tmp13_;
- _vala_assert (_tmp11_ == _tmp14_, "value.get_boolean () == test_collection.is_empty");
- g_value_unset (&value);
- g_value_init (&_tmp15_, G_TYPE_INT);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp15_;
- _tmp16_ = value;
- _tmp17_ = self->test_collection;
- g_object_get_property ((GObject*) _tmp17_, "size", &value);
- _tmp18_ = g_value_get_int (&value);
- _tmp19_ = self->test_collection;
- _tmp20_ = gee_collection_get_size (_tmp19_);
- _tmp21_ = _tmp20_;
- _vala_assert (_tmp18_ == _tmp21_, "value.get_int () == test_collection.size");
- g_value_unset (&value);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
+ _tmp11_ = gee_iterable_iterator ((GeeIterable*) _tmp10_);
+ iter = _tmp11_;
+ _tmp12_ = gee_iterator_next (iter);
+ _vala_assert (_tmp12_, "iter.next ()");
+ gee_traversable_foreach ((GeeTraversable*) iter, ___lambda8__gee_forall_func, _data1_);
+ _vala_assert (_data1_->count == 9, "count == 9");
+ _g_object_unref0 (iter);
+ block1_data_unref (_data1_);
+ _data1_ = NULL;
+}
+
+
+static Block2Data* block2_data_ref (Block2Data* _data2_) {
+ g_atomic_int_inc (&_data2_->_ref_count_);
+ return _data2_;
+}
+
+
+static void block2_data_unref (void * _userdata_) {
+ Block2Data* _data2_;
+ _data2_ = (Block2Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
+ CollectionTests * self;
+ self = _data2_->self;
+ _g_object_unref0 (self);
+ g_slice_free (Block2Data, _data2_);
+ }
+}
+
+
+static gint __lambda9_ (Block2Data* _data2_, gchar* str) {
+ CollectionTests * self;
+ gint result = 0;
+ const gchar* _tmp0_;
+ gint _tmp6_;
+ self = _data2_->self;
+ g_return_val_if_fail (str != NULL, 0);
+ _tmp0_ = str;
+ if (g_strcmp0 (_tmp0_, "one") == 0) {
+ gboolean _tmp1_;
+ _tmp1_ = _data2_->one;
+ _vala_assert (!_tmp1_, "!one");
+ _data2_->one = TRUE;
+ } else {
+ const gchar* _tmp2_;
+ _tmp2_ = str;
+ if (g_strcmp0 (_tmp2_, "two") == 0) {
+ gboolean _tmp3_;
+ _tmp3_ = _data2_->two;
+ _vala_assert (!_tmp3_, "!two");
+ _data2_->two = TRUE;
+ } else {
+ const gchar* _tmp4_;
+ _tmp4_ = str;
+ if (g_strcmp0 (_tmp4_, "three") == 0) {
+ gboolean _tmp5_;
+ _tmp5_ = _data2_->three;
+ _vala_assert (!_tmp5_, "!three");
+ _data2_->three = TRUE;
+ } else {
+ g_assert_not_reached ();
+ }
+ }
+ }
+ _tmp6_ = _data2_->i;
+ _data2_->i = _tmp6_ + 1;
+ result = _tmp6_;
+ _g_free0 (str);
+ return result;
+}
+
+
+static gpointer ___lambda9__gee_map_func (gpointer g, gpointer self) {
+ gpointer result;
+ result = __lambda9_ (self, g);
+ return result;
+}
+
+
+static gint __lambda10_ (Block2Data* _data2_, gchar* str) {
+ CollectionTests * self;
+ gint result = 0;
+ const gchar* _tmp0_;
+ gint _tmp6_;
+ self = _data2_->self;
+ g_return_val_if_fail (str != NULL, 0);
+ _tmp0_ = str;
+ if (g_strcmp0 (_tmp0_, "one") == 0) {
+ gboolean _tmp1_;
+ _tmp1_ = _data2_->one;
+ _vala_assert (!_tmp1_, "!one");
+ _data2_->one = TRUE;
+ } else {
+ const gchar* _tmp2_;
+ _tmp2_ = str;
+ if (g_strcmp0 (_tmp2_, "two") == 0) {
+ gboolean _tmp3_;
+ _tmp3_ = _data2_->two;
+ _vala_assert (!_tmp3_, "!two");
+ _data2_->two = TRUE;
+ } else {
+ const gchar* _tmp4_;
+ _tmp4_ = str;
+ if (g_strcmp0 (_tmp4_, "three") == 0) {
+ gboolean _tmp5_;
+ _tmp5_ = _data2_->three;
+ _vala_assert (!_tmp5_, "!three");
+ _data2_->three = TRUE;
+ } else {
+ g_assert_not_reached ();
+ }
+ }
+ }
+ _tmp6_ = _data2_->i;
+ _data2_->i = _tmp6_ + 1;
+ result = _tmp6_;
+ _g_free0 (str);
+ return result;
+}
+
+
+static gpointer ___lambda10__gee_map_func (gpointer g, gpointer self) {
+ gpointer result;
+ result = __lambda10_ (self, g);
+ return result;
+}
+
+
+void collection_tests_test_map (CollectionTests* self) {
+ Block2Data* _data2_;
+ GeeCollection* _tmp0_;
+ gboolean _tmp1_ = FALSE;
+ GeeCollection* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeCollection* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeCollection* _tmp6_;
+ GeeIterator* _tmp7_ = NULL;
+ GeeIterator* _tmp8_;
+ GeeIterator* _tmp9_ = NULL;
+ GeeIterator* _tmp10_;
+ GeeIterator* iter;
+ gint j;
+ gint _tmp24_;
+ gint _tmp25_;
+ gint _tmp26_;
+ GeeCollection* _tmp27_;
+ gint _tmp28_;
+ gint _tmp29_;
+ gboolean _tmp30_;
+ gboolean _tmp31_;
+ gboolean _tmp32_;
+ gboolean _tmp33_;
+ gboolean _tmp34_;
+ gint _tmp35_;
+ GeeCollection* _tmp36_;
+ GeeIterator* _tmp37_ = NULL;
+ gint _tmp51_;
+ gint _tmp52_;
+ gint _tmp53_;
+ GeeCollection* _tmp54_;
+ gint _tmp55_;
+ gint _tmp56_;
+ gboolean _tmp57_;
+ gboolean _tmp58_;
+ gboolean _tmp59_;
+ g_return_if_fail (self != NULL);
+ _data2_ = g_slice_new0 (Block2Data);
+ _data2_->_ref_count_ = 1;
+ _data2_->self = g_object_ref (self);
+ _tmp0_ = self->test_collection;
+ _tmp1_ = gee_collection_add (_tmp0_, "one");
+ _vala_assert (_tmp1_, "test_collection.add (\"one\")");
+ _tmp2_ = self->test_collection;
+ _tmp3_ = gee_collection_add (_tmp2_, "two");
+ _vala_assert (_tmp3_, "test_collection.add (\"two\")");
+ _tmp4_ = self->test_collection;
+ _tmp5_ = gee_collection_add (_tmp4_, "three");
+ _vala_assert (_tmp5_, "test_collection.add (\"three\")");
+ _data2_->one = FALSE;
+ _data2_->two = FALSE;
+ _data2_->three = FALSE;
+ _data2_->i = 0;
+ _tmp6_ = self->test_collection;
+ _tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_);
+ _tmp8_ = _tmp7_;
+ _tmp9_ = gee_traversable_map ((GeeTraversable*) _tmp8_, G_TYPE_INT, NULL, NULL, ___lambda9__gee_map_func, _data2_);
+ _tmp10_ = _tmp9_;
+ _g_object_unref0 (_tmp8_);
+ iter = _tmp10_;
+ j = 0;
+ while (TRUE) {
+ GeeIterator* _tmp11_;
+ gboolean _tmp12_ = FALSE;
+ gint _tmp13_;
+ gint _tmp14_;
+ gint _tmp15_;
+ GeeIterator* _tmp16_;
+ gpointer _tmp17_ = NULL;
+ gint _tmp18_;
+ GeeIterator* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gint _tmp21_;
+ gint _tmp22_;
+ gint _tmp23_;
+ _tmp11_ = iter;
+ _tmp12_ = gee_iterator_next (_tmp11_);
+ if (!_tmp12_) {
+ break;
+ }
+ _tmp13_ = _data2_->i;
+ _tmp14_ = j;
+ _vala_assert (_tmp13_ == _tmp14_, "i == j");
+ _tmp15_ = j;
+ _tmp16_ = iter;
+ _tmp17_ = gee_iterator_get (_tmp16_);
+ _vala_assert (_tmp15_ == ((gint) ((gintptr) _tmp17_)), "j == iter.get ()");
+ _tmp18_ = j;
+ _tmp19_ = iter;
+ _tmp20_ = gee_iterator_get (_tmp19_);
+ _vala_assert (_tmp18_ == ((gint) ((gintptr) _tmp20_)), "j == iter.get ()");
+ _tmp21_ = j;
+ j = _tmp21_ + 1;
+ _tmp22_ = _data2_->i;
+ _tmp23_ = j;
+ _vala_assert (_tmp22_ == _tmp23_, "i == j");
+ }
+ _tmp24_ = _data2_->i;
+ _tmp25_ = j;
+ _vala_assert (_tmp24_ == _tmp25_, "i == j");
+ _tmp26_ = _data2_->i;
+ _tmp27_ = self->test_collection;
+ _tmp28_ = gee_collection_get_size (_tmp27_);
+ _tmp29_ = _tmp28_;
+ _vala_assert (_tmp26_ == _tmp29_, "i == test_collection.size");
+ _tmp30_ = _data2_->one;
+ _vala_assert (_tmp30_, "one");
+ _tmp31_ = _data2_->two;
+ _vala_assert (_tmp31_, "two");
+ _tmp32_ = _data2_->three;
+ _vala_assert (_tmp32_, "three");
+ _data2_->three = FALSE;
+ _tmp33_ = _data2_->three;
+ _data2_->two = _tmp33_;
+ _tmp34_ = _data2_->two;
+ _data2_->one = _tmp34_;
+ j = 0;
+ _tmp35_ = j;
+ _data2_->i = _tmp35_;
+ _tmp36_ = self->test_collection;
+ _tmp37_ = gee_traversable_map ((GeeTraversable*) _tmp36_, G_TYPE_INT, NULL, NULL, ___lambda10__gee_map_func, _data2_);
+ _g_object_unref0 (iter);
+ iter = _tmp37_;
+ while (TRUE) {
+ GeeIterator* _tmp38_;
+ gboolean _tmp39_ = FALSE;
+ gint _tmp40_;
+ gint _tmp41_;
+ gint _tmp42_;
+ GeeIterator* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gint _tmp45_;
+ GeeIterator* _tmp46_;
+ gpointer _tmp47_ = NULL;
+ gint _tmp48_;
+ gint _tmp49_;
+ gint _tmp50_;
+ _tmp38_ = iter;
+ _tmp39_ = gee_iterator_next (_tmp38_);
+ if (!_tmp39_) {
+ break;
+ }
+ _tmp40_ = _data2_->i;
+ _tmp41_ = j;
+ _vala_assert (_tmp40_ == _tmp41_, "i == j");
+ _tmp42_ = j;
+ _tmp43_ = iter;
+ _tmp44_ = gee_iterator_get (_tmp43_);
+ _vala_assert (_tmp42_ == ((gint) ((gintptr) _tmp44_)), "j == iter.get ()");
+ _tmp45_ = j;
+ _tmp46_ = iter;
+ _tmp47_ = gee_iterator_get (_tmp46_);
+ _vala_assert (_tmp45_ == ((gint) ((gintptr) _tmp47_)), "j == iter.get ()");
+ _tmp48_ = j;
+ j = _tmp48_ + 1;
+ _tmp49_ = _data2_->i;
+ _tmp50_ = j;
+ _vala_assert (_tmp49_ == _tmp50_, "i == j");
+ }
+ _tmp51_ = _data2_->i;
+ _tmp52_ = j;
+ _vala_assert (_tmp51_ == _tmp52_, "i == j");
+ _tmp53_ = _data2_->i;
+ _tmp54_ = self->test_collection;
+ _tmp55_ = gee_collection_get_size (_tmp54_);
+ _tmp56_ = _tmp55_;
+ _vala_assert (_tmp53_ == _tmp56_, "i == test_collection.size");
+ _tmp57_ = _data2_->one;
+ _vala_assert (_tmp57_, "one");
+ _tmp58_ = _data2_->two;
+ _vala_assert (_tmp58_, "two");
+ _tmp59_ = _data2_->three;
+ _vala_assert (_tmp59_, "three");
+ _g_object_unref0 (iter);
+ block2_data_unref (_data2_);
+ _data2_ = NULL;
+}
+
+
+static Block3Data* block3_data_ref (Block3Data* _data3_) {
+ g_atomic_int_inc (&_data3_->_ref_count_);
+ return _data3_;
+}
+
+
+static void block3_data_unref (void * _userdata_) {
+ Block3Data* _data3_;
+ _data3_ = (Block3Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
+ CollectionTests * self;
+ self = _data3_->self;
+ _g_object_unref0 (self);
+ g_slice_free (Block3Data, _data3_);
+ }
+}
+
+
+static gint __lambda11_ (Block3Data* _data3_, gchar* str, gint cur) {
+ CollectionTests * self;
+ gint result = 0;
+ const gchar* _tmp0_;
+ gint _tmp6_;
+ self = _data3_->self;
+ g_return_val_if_fail (str != NULL, 0);
+ _tmp0_ = str;
+ if (g_strcmp0 (_tmp0_, "one") == 0) {
+ gboolean _tmp1_;
+ _tmp1_ = _data3_->one;
+ _vala_assert (!_tmp1_, "!one");
+ _data3_->one = TRUE;
+ } else {
+ const gchar* _tmp2_;
+ _tmp2_ = str;
+ if (g_strcmp0 (_tmp2_, "two") == 0) {
+ gboolean _tmp3_;
+ _tmp3_ = _data3_->two;
+ _vala_assert (!_tmp3_, "!two");
+ _data3_->two = TRUE;
+ } else {
+ const gchar* _tmp4_;
+ _tmp4_ = str;
+ if (g_strcmp0 (_tmp4_, "three") == 0) {
+ gboolean _tmp5_;
+ _tmp5_ = _data3_->three;
+ _vala_assert (!_tmp5_, "!three");
+ _data3_->three = TRUE;
+ } else {
+ g_assert_not_reached ();
+ }
+ }
+ }
+ _tmp6_ = cur;
+ result = _tmp6_ + 1;
+ _g_free0 (str);
+ return result;
+}
+
+
+static gpointer ___lambda11__gee_fold_func (gpointer g, gpointer a, gpointer self) {
+ gpointer result;
+ result = __lambda11_ (self, g, a);
+ return result;
+}
+
+
+static gint __lambda12_ (Block3Data* _data3_, gchar* str, gint cur) {
+ CollectionTests * self;
+ gint result = 0;
+ const gchar* _tmp0_;
+ gint _tmp6_;
+ self = _data3_->self;
+ g_return_val_if_fail (str != NULL, 0);
+ _tmp0_ = str;
+ if (g_strcmp0 (_tmp0_, "one") == 0) {
+ gboolean _tmp1_;
+ _tmp1_ = _data3_->one;
+ _vala_assert (!_tmp1_, "!one");
+ _data3_->one = TRUE;
+ } else {
+ const gchar* _tmp2_;
+ _tmp2_ = str;
+ if (g_strcmp0 (_tmp2_, "two") == 0) {
+ gboolean _tmp3_;
+ _tmp3_ = _data3_->two;
+ _vala_assert (!_tmp3_, "!two");
+ _data3_->two = TRUE;
+ } else {
+ const gchar* _tmp4_;
+ _tmp4_ = str;
+ if (g_strcmp0 (_tmp4_, "three") == 0) {
+ gboolean _tmp5_;
+ _tmp5_ = _data3_->three;
+ _vala_assert (!_tmp5_, "!three");
+ _data3_->three = TRUE;
+ } else {
+ g_assert_not_reached ();
+ }
+ }
+ }
+ _tmp6_ = cur;
+ result = _tmp6_ + 1;
+ _g_free0 (str);
+ return result;
+}
+
+
+static gpointer ___lambda12__gee_fold_func (gpointer g, gpointer a, gpointer self) {
+ gpointer result;
+ result = __lambda12_ (self, g, a);
+ return result;
+}
+
+
+void collection_tests_test_scan (CollectionTests* self) {
+ Block3Data* _data3_;
+ GeeCollection* _tmp0_;
+ gboolean _tmp1_ = FALSE;
+ GeeCollection* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeCollection* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeCollection* _tmp6_;
+ GeeIterator* _tmp7_ = NULL;
+ GeeIterator* _tmp8_;
+ GeeIterator* _tmp9_ = NULL;
+ GeeIterator* _tmp10_;
+ GeeIterator* iter;
+ gint j;
+ gint _tmp22_;
+ GeeCollection* _tmp23_;
+ gint _tmp24_;
+ gint _tmp25_;
+ gboolean _tmp26_;
+ gboolean _tmp27_;
+ gboolean _tmp28_;
+ gboolean _tmp29_;
+ gboolean _tmp30_;
+ GeeCollection* _tmp31_;
+ GeeIterator* _tmp32_ = NULL;
+ gint _tmp44_;
+ GeeCollection* _tmp45_;
+ gint _tmp46_;
+ gint _tmp47_;
+ gboolean _tmp48_;
+ gboolean _tmp49_;
+ gboolean _tmp50_;
+ g_return_if_fail (self != NULL);
+ _data3_ = g_slice_new0 (Block3Data);
+ _data3_->_ref_count_ = 1;
+ _data3_->self = g_object_ref (self);
+ _tmp0_ = self->test_collection;
+ _tmp1_ = gee_collection_add (_tmp0_, "one");
+ _vala_assert (_tmp1_, "test_collection.add (\"one\")");
+ _tmp2_ = self->test_collection;
+ _tmp3_ = gee_collection_add (_tmp2_, "two");
+ _vala_assert (_tmp3_, "test_collection.add (\"two\")");
+ _tmp4_ = self->test_collection;
+ _tmp5_ = gee_collection_add (_tmp4_, "three");
+ _vala_assert (_tmp5_, "test_collection.add (\"three\")");
+ _data3_->one = FALSE;
+ _data3_->two = FALSE;
+ _data3_->three = FALSE;
+ _tmp6_ = self->test_collection;
+ _tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_);
+ _tmp8_ = _tmp7_;
+ _tmp9_ = gee_traversable_scan ((GeeTraversable*) _tmp8_, G_TYPE_INT, NULL, NULL, ___lambda11__gee_fold_func, _data3_, (gpointer) ((gintptr) 0));
+ _tmp10_ = _tmp9_;
+ _g_object_unref0 (_tmp8_);
+ iter = _tmp10_;
+ j = 0;
+ {
+ gboolean _tmp11_;
+ _tmp11_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp12_;
+ gint _tmp15_;
+ GeeIterator* _tmp16_;
+ gpointer _tmp17_ = NULL;
+ gint _tmp18_;
+ GeeIterator* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gint _tmp21_;
+ _tmp12_ = _tmp11_;
+ if (!_tmp12_) {
+ GeeIterator* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ _tmp13_ = iter;
+ _tmp14_ = gee_iterator_next (_tmp13_);
+ if (!_tmp14_) {
+ break;
+ }
+ }
+ _tmp11_ = FALSE;
+ _tmp15_ = j;
+ _tmp16_ = iter;
+ _tmp17_ = gee_iterator_get (_tmp16_);
+ _vala_assert (_tmp15_ == ((gint) ((gintptr) _tmp17_)), "j == iter.get ()");
+ _tmp18_ = j;
+ _tmp19_ = iter;
+ _tmp20_ = gee_iterator_get (_tmp19_);
+ _vala_assert (_tmp18_ == ((gint) ((gintptr) _tmp20_)), "j == iter.get ()");
+ _tmp21_ = j;
+ j = _tmp21_ + 1;
+ }
+ }
+ _tmp22_ = j;
+ _tmp23_ = self->test_collection;
+ _tmp24_ = gee_collection_get_size (_tmp23_);
+ _tmp25_ = _tmp24_;
+ _vala_assert (_tmp22_ == (_tmp25_ + 1), "j == test_collection.size + 1");
+ _tmp26_ = _data3_->one;
+ _vala_assert (_tmp26_, "one");
+ _tmp27_ = _data3_->two;
+ _vala_assert (_tmp27_, "two");
+ _tmp28_ = _data3_->three;
+ _vala_assert (_tmp28_, "three");
+ _data3_->three = FALSE;
+ _tmp29_ = _data3_->three;
+ _data3_->two = _tmp29_;
+ _tmp30_ = _data3_->two;
+ _data3_->one = _tmp30_;
+ j = 0;
+ _tmp31_ = self->test_collection;
+ _tmp32_ = gee_traversable_scan ((GeeTraversable*) _tmp31_, G_TYPE_INT, NULL, NULL, ___lambda12__gee_fold_func, _data3_, (gpointer) ((gintptr) 0));
+ _g_object_unref0 (iter);
+ iter = _tmp32_;
+ {
+ gboolean _tmp33_;
+ _tmp33_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp34_;
+ gint _tmp37_;
+ GeeIterator* _tmp38_;
+ gpointer _tmp39_ = NULL;
+ gint _tmp40_;
+ GeeIterator* _tmp41_;
+ gpointer _tmp42_ = NULL;
+ gint _tmp43_;
+ _tmp34_ = _tmp33_;
+ if (!_tmp34_) {
+ GeeIterator* _tmp35_;
+ gboolean _tmp36_ = FALSE;
+ _tmp35_ = iter;
+ _tmp36_ = gee_iterator_next (_tmp35_);
+ if (!_tmp36_) {
+ break;
+ }
+ }
+ _tmp33_ = FALSE;
+ _tmp37_ = j;
+ _tmp38_ = iter;
+ _tmp39_ = gee_iterator_get (_tmp38_);
+ _vala_assert (_tmp37_ == ((gint) ((gintptr) _tmp39_)), "j == iter.get ()");
+ _tmp40_ = j;
+ _tmp41_ = iter;
+ _tmp42_ = gee_iterator_get (_tmp41_);
+ _vala_assert (_tmp40_ == ((gint) ((gintptr) _tmp42_)), "j == iter.get ()");
+ _tmp43_ = j;
+ j = _tmp43_ + 1;
+ }
+ }
+ _tmp44_ = j;
+ _tmp45_ = self->test_collection;
+ _tmp46_ = gee_collection_get_size (_tmp45_);
+ _tmp47_ = _tmp46_;
+ _vala_assert (_tmp44_ == (_tmp47_ + 1), "j == test_collection.size + 1");
+ _tmp48_ = _data3_->one;
+ _vala_assert (_tmp48_, "one");
+ _tmp49_ = _data3_->two;
+ _vala_assert (_tmp49_, "two");
+ _tmp50_ = _data3_->three;
+ _vala_assert (_tmp50_, "three");
+ _g_object_unref0 (iter);
+ block3_data_unref (_data3_);
+ _data3_ = NULL;
+}
+
+
+static Block4Data* block4_data_ref (Block4Data* _data4_) {
+ g_atomic_int_inc (&_data4_->_ref_count_);
+ return _data4_;
+}
+
+
+static void block4_data_unref (void * _userdata_) {
+ Block4Data* _data4_;
+ _data4_ = (Block4Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
+ CollectionTests * self;
+ self = _data4_->self;
+ _g_object_unref0 (self);
+ g_slice_free (Block4Data, _data4_);
+ }
+}
+
+
+static gboolean __lambda13_ (Block4Data* _data4_, const gchar* str) {
+ CollectionTests * self;
+ gboolean result = FALSE;
+ const gchar* _tmp0_;
+ const gchar* _tmp6_;
+ self = _data4_->self;
+ g_return_val_if_fail (str != NULL, FALSE);
+ _tmp0_ = str;
+ if (g_strcmp0 (_tmp0_, "one") == 0) {
+ gboolean _tmp1_;
+ _tmp1_ = _data4_->one;
+ _vala_assert (!_tmp1_, "!one");
+ _data4_->one = TRUE;
+ } else {
+ const gchar* _tmp2_;
+ _tmp2_ = str;
+ if (g_strcmp0 (_tmp2_, "two") == 0) {
+ gboolean _tmp3_;
+ _tmp3_ = _data4_->two;
+ _vala_assert (!_tmp3_, "!two");
+ _data4_->two = TRUE;
+ } else {
+ const gchar* _tmp4_;
+ _tmp4_ = str;
+ if (g_strcmp0 (_tmp4_, "three") == 0) {
+ gboolean _tmp5_;
+ _tmp5_ = _data4_->three;
+ _vala_assert (!_tmp5_, "!three");
+ _data4_->three = TRUE;
+ } else {
+ g_assert_not_reached ();
+ }
+ }
+ }
+ _tmp6_ = str;
+ result = g_strcmp0 (_tmp6_, "two") != 0;
+ return result;
+}
+
+
+static gboolean ___lambda13__gee_predicate (gconstpointer g, gpointer self) {
+ gboolean result;
+ result = __lambda13_ (self, g);
+ return result;
+}
+
+
+static gboolean __lambda14_ (Block4Data* _data4_, const gchar* str) {
+ CollectionTests * self;
+ gboolean result = FALSE;
+ const gchar* _tmp0_;
+ const gchar* _tmp6_;
+ self = _data4_->self;
+ g_return_val_if_fail (str != NULL, FALSE);
+ _tmp0_ = str;
+ if (g_strcmp0 (_tmp0_, "one") == 0) {
+ gboolean _tmp1_;
+ _tmp1_ = _data4_->one;
+ _vala_assert (!_tmp1_, "!one");
+ _data4_->one = TRUE;
+ } else {
+ const gchar* _tmp2_;
+ _tmp2_ = str;
+ if (g_strcmp0 (_tmp2_, "two") == 0) {
+ gboolean _tmp3_;
+ _tmp3_ = _data4_->two;
+ _vala_assert (!_tmp3_, "!two");
+ _data4_->two = TRUE;
+ } else {
+ const gchar* _tmp4_;
+ _tmp4_ = str;
+ if (g_strcmp0 (_tmp4_, "three") == 0) {
+ gboolean _tmp5_;
+ _tmp5_ = _data4_->three;
+ _vala_assert (!_tmp5_, "!three");
+ _data4_->three = TRUE;
+ } else {
+ g_assert_not_reached ();
+ }
+ }
+ }
+ _tmp6_ = str;
+ result = g_strcmp0 (_tmp6_, "two") != 0;
+ return result;
+}
+
+
+static gboolean ___lambda14__gee_predicate (gconstpointer g, gpointer self) {
+ gboolean result;
+ result = __lambda14_ (self, g);
+ return result;
+}
+
+
+void collection_tests_test_filter (CollectionTests* self) {
+ Block4Data* _data4_;
+ GeeCollection* _tmp0_;
+ gboolean _tmp1_ = FALSE;
+ GeeCollection* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeCollection* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeCollection* _tmp6_;
+ GeeIterator* _tmp7_ = NULL;
+ GeeIterator* _tmp8_;
+ GeeIterator* _tmp9_ = NULL;
+ GeeIterator* _tmp10_;
+ GeeIterator* iter;
+ GeeIterator* _tmp11_;
+ gboolean _tmp12_;
+ gboolean _tmp13_;
+ gint j;
+ gint _tmp20_;
+ gboolean _tmp21_;
+ gboolean _tmp22_;
+ gboolean _tmp23_;
+ gboolean _tmp24_;
+ gboolean _tmp25_;
+ GeeCollection* _tmp26_;
+ GeeIterator* _tmp27_ = NULL;
+ GeeIterator* _tmp28_;
+ gboolean _tmp29_;
+ gboolean _tmp30_;
+ gint _tmp37_;
+ gboolean _tmp38_;
+ gboolean _tmp39_;
+ gboolean _tmp40_;
+ g_return_if_fail (self != NULL);
+ _data4_ = g_slice_new0 (Block4Data);
+ _data4_->_ref_count_ = 1;
+ _data4_->self = g_object_ref (self);
+ _tmp0_ = self->test_collection;
+ _tmp1_ = gee_collection_add (_tmp0_, "one");
+ _vala_assert (_tmp1_, "test_collection.add (\"one\")");
+ _tmp2_ = self->test_collection;
+ _tmp3_ = gee_collection_add (_tmp2_, "two");
+ _vala_assert (_tmp3_, "test_collection.add (\"two\")");
+ _tmp4_ = self->test_collection;
+ _tmp5_ = gee_collection_add (_tmp4_, "three");
+ _vala_assert (_tmp5_, "test_collection.add (\"three\")");
+ _data4_->one = FALSE;
+ _data4_->two = FALSE;
+ _data4_->three = FALSE;
+ _tmp6_ = self->test_collection;
+ _tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_);
+ _tmp8_ = _tmp7_;
+ _tmp9_ = gee_traversable_filter ((GeeTraversable*) _tmp8_, ___lambda13__gee_predicate, block4_data_ref (_data4_), block4_data_unref);
+ _tmp10_ = _tmp9_;
+ _g_object_unref0 (_tmp8_);
+ iter = _tmp10_;
+ _tmp11_ = iter;
+ _tmp12_ = gee_iterator_get_valid (_tmp11_);
+ _tmp13_ = _tmp12_;
+ _vala_assert (!_tmp13_, "!iter.valid");
+ j = 0;
+ while (TRUE) {
+ GeeIterator* _tmp14_;
+ gboolean _tmp15_ = FALSE;
+ GeeIterator* _tmp16_;
+ gpointer _tmp17_ = NULL;
+ gchar* _tmp18_;
+ gint _tmp19_;
+ _tmp14_ = iter;
+ _tmp15_ = gee_iterator_next (_tmp14_);
+ if (!_tmp15_) {
+ break;
+ }
+ _tmp16_ = iter;
+ _tmp17_ = gee_iterator_get (_tmp16_);
+ _tmp18_ = (gchar*) _tmp17_;
+ _vala_assert (g_strcmp0 (_tmp18_, "two") != 0, "iter.get () != \"two\"");
+ _g_free0 (_tmp18_);
+ _tmp19_ = j;
+ j = _tmp19_ + 1;
+ }
+ _tmp20_ = j;
+ _vala_assert (_tmp20_ == 2, "j == 2");
+ _tmp21_ = _data4_->one;
+ _vala_assert (_tmp21_, "one");
+ _tmp22_ = _data4_->two;
+ _vala_assert (_tmp22_, "two");
+ _tmp23_ = _data4_->three;
+ _vala_assert (_tmp23_, "three");
+ _data4_->three = FALSE;
+ _tmp24_ = _data4_->three;
+ _data4_->two = _tmp24_;
+ _tmp25_ = _data4_->two;
+ _data4_->one = _tmp25_;
+ j = 0;
+ _tmp26_ = self->test_collection;
+ _tmp27_ = gee_traversable_filter ((GeeTraversable*) _tmp26_, ___lambda14__gee_predicate, block4_data_ref (_data4_), block4_data_unref);
+ _g_object_unref0 (iter);
+ iter = _tmp27_;
+ _tmp28_ = iter;
+ _tmp29_ = gee_iterator_get_valid (_tmp28_);
+ _tmp30_ = _tmp29_;
+ _vala_assert (!_tmp30_, "!iter.valid");
+ while (TRUE) {
+ GeeIterator* _tmp31_;
+ gboolean _tmp32_ = FALSE;
+ GeeIterator* _tmp33_;
+ gpointer _tmp34_ = NULL;
+ gchar* _tmp35_;
+ gint _tmp36_;
+ _tmp31_ = iter;
+ _tmp32_ = gee_iterator_next (_tmp31_);
+ if (!_tmp32_) {
+ break;
+ }
+ _tmp33_ = iter;
+ _tmp34_ = gee_iterator_get (_tmp33_);
+ _tmp35_ = (gchar*) _tmp34_;
+ _vala_assert (g_strcmp0 (_tmp35_, "two") != 0, "iter.get () != \"two\"");
+ _g_free0 (_tmp35_);
+ _tmp36_ = j;
+ j = _tmp36_ + 1;
+ }
+ _tmp37_ = j;
+ _vala_assert (_tmp37_ == 2, "j == 2");
+ _tmp38_ = _data4_->one;
+ _vala_assert (_tmp38_, "one");
+ _tmp39_ = _data4_->two;
+ _vala_assert (_tmp39_, "two");
+ _tmp40_ = _data4_->three;
+ _vala_assert (_tmp40_, "three");
+ _g_object_unref0 (iter);
+ block4_data_unref (_data4_);
+ _data4_ = NULL;
+}
+
+
+void collection_tests_test_chop (CollectionTests* self) {
+ GeeCollection* _tmp0_;
+ gboolean _tmp1_ = FALSE;
+ GeeCollection* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeCollection* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeCollection* _tmp6_;
+ GeeIterator* _tmp7_ = NULL;
+ GeeIterator* _tmp8_;
+ GeeIterator* _tmp9_ = NULL;
+ GeeIterator* _tmp10_;
+ GeeIterator* iter;
+ GeeIterator* _tmp11_;
+ gboolean _tmp12_;
+ gboolean _tmp13_;
+ GeeCollection* _tmp14_;
+ GeeIterator* _tmp15_ = NULL;
+ GeeIterator* iter2;
+ GeeIterator* _tmp16_;
+ gboolean _tmp17_ = FALSE;
+ GeeIterator* _tmp18_;
+ gboolean _tmp19_ = FALSE;
+ GeeIterator* _tmp20_;
+ gboolean _tmp21_ = FALSE;
+ GeeIterator* _tmp22_;
+ gpointer _tmp23_ = NULL;
+ gchar* _tmp24_;
+ GeeIterator* _tmp25_;
+ gpointer _tmp26_ = NULL;
+ gchar* _tmp27_;
+ GeeIterator* _tmp28_;
+ gboolean _tmp29_ = FALSE;
+ GeeIterator* _tmp30_;
+ gboolean _tmp31_ = FALSE;
+ GeeCollection* _tmp32_;
+ GeeIterator* _tmp33_ = NULL;
+ GeeIterator* _tmp34_;
+ gboolean _tmp35_;
+ gboolean _tmp36_;
+ GeeCollection* _tmp37_;
+ GeeIterator* _tmp38_ = NULL;
+ GeeIterator* _tmp39_;
+ gboolean _tmp40_ = FALSE;
+ GeeIterator* _tmp41_;
+ gboolean _tmp42_ = FALSE;
+ GeeIterator* _tmp43_;
+ gboolean _tmp44_ = FALSE;
+ GeeIterator* _tmp45_;
+ gpointer _tmp46_ = NULL;
+ gchar* _tmp47_;
+ GeeIterator* _tmp48_;
+ gpointer _tmp49_ = NULL;
+ gchar* _tmp50_;
+ GeeIterator* _tmp51_;
+ gboolean _tmp52_ = FALSE;
+ GeeIterator* _tmp53_;
+ gboolean _tmp54_ = FALSE;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->test_collection;
+ _tmp1_ = gee_collection_add (_tmp0_, "one");
+ _vala_assert (_tmp1_, "test_collection.add (\"one\")");
+ _tmp2_ = self->test_collection;
+ _tmp3_ = gee_collection_add (_tmp2_, "two");
+ _vala_assert (_tmp3_, "test_collection.add (\"two\")");
+ _tmp4_ = self->test_collection;
+ _tmp5_ = gee_collection_add (_tmp4_, "three");
+ _vala_assert (_tmp5_, "test_collection.add (\"three\")");
+ _tmp6_ = self->test_collection;
+ _tmp7_ = gee_iterable_iterator ((GeeIterable*) _tmp6_);
+ _tmp8_ = _tmp7_;
+ _tmp9_ = gee_traversable_chop ((GeeTraversable*) _tmp8_, 1, 1);
+ _tmp10_ = _tmp9_;
+ _g_object_unref0 (_tmp8_);
+ iter = _tmp10_;
+ _tmp11_ = iter;
+ _tmp12_ = gee_iterator_get_valid (_tmp11_);
+ _tmp13_ = _tmp12_;
+ _vala_assert (!_tmp13_, "!iter.valid");
+ _tmp14_ = self->test_collection;
+ _tmp15_ = gee_iterable_iterator ((GeeIterable*) _tmp14_);
+ iter2 = _tmp15_;
+ _tmp16_ = iter2;
+ _tmp17_ = gee_iterator_next (_tmp16_);
+ _vala_assert (_tmp17_, "iter2.next ()");
+ _tmp18_ = iter2;
+ _tmp19_ = gee_iterator_next (_tmp18_);
+ _vala_assert (_tmp19_, "iter2.next ()");
+ _tmp20_ = iter;
+ _tmp21_ = gee_iterator_next (_tmp20_);
+ _vala_assert (_tmp21_, "iter.next ()");
+ _tmp22_ = iter2;
+ _tmp23_ = gee_iterator_get (_tmp22_);
+ _tmp24_ = (gchar*) _tmp23_;
+ _tmp25_ = iter;
+ _tmp26_ = gee_iterator_get (_tmp25_);
+ _tmp27_ = (gchar*) _tmp26_;
+ _vala_assert (g_strcmp0 (_tmp24_, _tmp27_) == 0, "iter2.get () == iter.get ()");
+ _g_free0 (_tmp27_);
+ _g_free0 (_tmp24_);
+ _tmp28_ = iter;
+ _tmp29_ = gee_iterator_next (_tmp28_);
+ _vala_assert (!_tmp29_, "!iter.next ()");
+ _tmp30_ = iter2;
+ _tmp31_ = gee_iterator_next (_tmp30_);
+ _vala_assert (_tmp31_, "iter2.next ()");
+ _tmp32_ = self->test_collection;
+ _tmp33_ = gee_traversable_chop ((GeeTraversable*) _tmp32_, 1, 1);
+ _g_object_unref0 (iter);
+ iter = _tmp33_;
+ _tmp34_ = iter;
+ _tmp35_ = gee_iterator_get_valid (_tmp34_);
+ _tmp36_ = _tmp35_;
+ _vala_assert (!_tmp36_, "!iter.valid");
+ _tmp37_ = self->test_collection;
+ _tmp38_ = gee_iterable_iterator ((GeeIterable*) _tmp37_);
+ _g_object_unref0 (iter2);
+ iter2 = _tmp38_;
+ _tmp39_ = iter2;
+ _tmp40_ = gee_iterator_next (_tmp39_);
+ _vala_assert (_tmp40_, "iter2.next ()");
+ _tmp41_ = iter2;
+ _tmp42_ = gee_iterator_next (_tmp41_);
+ _vala_assert (_tmp42_, "iter2.next ()");
+ _tmp43_ = iter;
+ _tmp44_ = gee_iterator_next (_tmp43_);
+ _vala_assert (_tmp44_, "iter.next ()");
+ _tmp45_ = iter2;
+ _tmp46_ = gee_iterator_get (_tmp45_);
+ _tmp47_ = (gchar*) _tmp46_;
+ _tmp48_ = iter;
+ _tmp49_ = gee_iterator_get (_tmp48_);
+ _tmp50_ = (gchar*) _tmp49_;
+ _vala_assert (g_strcmp0 (_tmp47_, _tmp50_) == 0, "iter2.get () == iter.get ()");
+ _g_free0 (_tmp50_);
+ _g_free0 (_tmp47_);
+ _tmp51_ = iter;
+ _tmp52_ = gee_iterator_next (_tmp51_);
+ _vala_assert (!_tmp52_, "!iter.next ()");
+ _tmp53_ = iter2;
+ _tmp54_ = gee_iterator_next (_tmp53_);
+ _vala_assert (_tmp54_, "iter2.next ()");
+ _g_object_unref0 (iter2);
+ _g_object_unref0 (iter);
}
diff --git a/tests/testcollection.vala b/tests/testcollection.vala
index 6155f9e..ddb9308 100644
--- a/tests/testcollection.vala
+++ b/tests/testcollection.vala
@@ -2,6 +2,7 @@
*
* Copyright (C) 2008 Jürg Billeter
* Copyright (C) 2009 Didier Villevalois, Julien Peeters
+ * Copyright (C) 2011-2012 Maciej Piechotka
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,6 +22,7 @@
* Jürg Billeter <j@bitron.ch>
* Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
* Julien Peeters <contact@julienpeeters.fr>
+ * Maciej Piechotka <uzytkownik2@gmail.com>
*/
using Gee;
@@ -43,6 +45,12 @@ public abstract class CollectionTests : Gee.TestCase {
add_test ("[Collection] retain_all", test_retain_all);
add_test ("[Collection] to_array", test_to_array);
add_test ("[Collection] GObject properties", test_gobject_properties);
+ add_test ("[Collection] fold", test_fold);
+ add_test ("[Collection] foreach", test_foreach);
+ add_test ("[Collection] map", test_map);
+ add_test ("[Collection] scan", test_scan);
+ add_test ("[Collection] filter", test_filter);
+ add_test ("[Collection] chop", test_chop);
}
protected Collection<string> test_collection;
@@ -64,98 +72,50 @@ public abstract class CollectionTests : Gee.TestCase {
Iterator<string> iterator = test_collection.iterator ();
assert (! iterator.has_next ());
assert (! iterator.next ());
- assert (! iterator.first ());
- // Check for some elements in the collection
- assert (test_collection.add ("one"));
- assert (test_collection.add ("two"));
- assert (test_collection.add ("three"));
+ unowned string[] data = TestData.get_data ();
- bool one_found = false;
- bool two_found = false;
- bool three_found = false;
- bool one_found_once = true;
- bool two_found_once = true;
- bool three_found_once = true;
- iterator = test_collection.iterator ();
- while (true) {
- has_next = iterator.has_next ();
- assert (has_next == iterator.next ());
- if (! has_next) {
- break;
- }
+ // Check for some elements in the collection
+ foreach (unowned string el in data) {
+ assert (test_collection.add (el));
+ }
- string element = iterator.get ();
- if (element == "one") {
- if (one_found) {
- one_found_once = false;
- }
- one_found = true;
- } else if (element == "two") {
- if (two_found) {
- two_found_once = false;
- }
- two_found = true;
- } else if (element == "three") {
- if (three_found) {
- three_found_once = false;
- }
- three_found = true;
+ uint[] found_times = new uint[data.length];
+ for (uint i = 0; i < 2; i++) {
+ for (uint j = 0; j < found_times.length; j++) {
+ found_times[j] = 0;
}
- }
- has_next = iterator.has_next ();
- assert (! has_next);
- assert (has_next == iterator.next ());
- assert (one_found);
- assert (one_found_once);
- assert (two_found);
- assert (two_found_once);
- assert (three_found);
- assert (three_found_once);
-
- // Do it twice to check first ()
- assert (iterator.first ());
-
- one_found = false;
- two_found = false;
- three_found = false;
- one_found_once = true;
- two_found_once = true;
- three_found_once = true;
- while (true) {
- string element = iterator.get ();
- if (element == "one") {
- if (one_found) {
- one_found_once = false;
- }
- one_found = true;
- } else if (element == "two") {
- if (two_found) {
- two_found_once = false;
+ iterator = test_collection.iterator ();
+ bool valid = iterator.valid;
+ assert (! valid);
+ while (true) {
+ has_next = iterator.has_next ();
+ assert (valid == iterator.valid);
+ assert (has_next == iterator.next ());
+ assert (valid = iterator.valid);
+ if (! has_next) {
+ break;
}
- two_found = true;
- } else if (element == "three") {
- if (three_found) {
- three_found_once = false;
+
+ string element = iterator.get ();
+ assert (iterator.valid);
+ for (uint element_idx = 0;; element_idx++) {
+ assert (element_idx < data.length);
+ if (data[element_idx] == element) {
+ found_times[element_idx]++;
+ break;
+ }
}
- three_found = true;
}
-
has_next = iterator.has_next ();
+ assert (! has_next);
+ assert (iterator.valid);
assert (has_next == iterator.next ());
- if (! has_next) {
- break;
+ assert (iterator.valid);
+ foreach (var ft in found_times) {
+ assert (ft == 1);
}
}
- has_next = iterator.has_next ();
- assert (! has_next);
- assert (has_next == iterator.next ());
- assert (one_found);
- assert (one_found_once);
- assert (two_found);
- assert (two_found_once);
- assert (three_found);
- assert (three_found_once);
}
public void test_mutable_iterator () {
@@ -167,167 +127,143 @@ public abstract class CollectionTests : Gee.TestCase {
Iterator<string> iterator = test_collection.iterator ();
// ...
- // Check for some elements in the collection and remove one
- assert (test_collection.add ("one"));
- assert (test_collection.add ("two"));
- assert (test_collection.add ("three"));
+ unowned string[] data = TestData.get_data ();
+ unowned uint[] idx = TestData.get_drawn_numbers ();
+
+ // Check for some elements in the collection and remove few
+ foreach (unowned string el in data) {
+ assert (test_collection.add (el));
+ }
- bool one_found = false;
- bool two_found = false;
- bool three_found = false;
- bool one_found_once = true;
- bool two_found_once = true;
- bool three_found_once = true;
iterator = test_collection.iterator ();
- while (true) {
- has_next = iterator.has_next ();
- assert (has_next == iterator.next ());
- if (! has_next) {
- break;
+ uint[] found_times = new uint[data.length];
+ for (uint i = 0; i <= idx.length; i++) {
+ for (uint j = 0; j < found_times.length; j++) {
+ found_times[j] = 0;
}
-
- string element = iterator.get ();
- if (element == "one") {
- if (one_found) {
- one_found_once = false;
+ iterator = test_collection.iterator ();
+ assert (! iterator.valid);
+ bool last_removed = false;
+ while (true) {
+ has_next = iterator.has_next ();
+ assert (has_next == iterator.next ());
+ if (! has_next) {
+ break;
}
- one_found = true;
- } else if (element == "two") {
- if (two_found) {
- two_found_once = false;
- }
- two_found = true;
- // Remove this element
- iterator.remove ();
- } else if (element == "three") {
- if (three_found) {
- three_found_once = false;
- }
- three_found = true;
- }
- }
- has_next = iterator.has_next ();
- assert (! has_next);
- assert (has_next == iterator.next ());
- assert (one_found);
- assert (one_found_once);
- assert (two_found);
- assert (two_found_once);
- assert (three_found);
- assert (three_found_once);
-
- // Check after removal
- assert (iterator.first ());
-
- one_found = false;
- two_found = false;
- three_found = false;
- one_found_once = true;
- two_found_once = true;
- three_found_once = true;
- while (true) {
- string element = iterator.get ();
- if (element == "one") {
- if (one_found) {
- one_found_once = false;
+ string element = iterator.get ();
+ assert (iterator.valid);
+ for (uint element_idx = 0;; element_idx++) {
+ assert (element_idx < data.length);
+ if (data[element_idx] == element) {
+ if (i != idx.length && data[element_idx] == data[idx[i]]) {
+ iterator.remove ();
+ assert (! iterator.valid);
+ last_removed = true;
+ } else {
+ last_removed = false;
+ }
+ found_times[element_idx]++;
+ break;
+ }
}
- one_found = true;
- } else if (element == "two") {
- two_found = true;
- } else if (element == "three") {
- if (three_found) {
- three_found_once = false;
- }
- three_found = true;
}
-
has_next = iterator.has_next ();
+ assert (! has_next);
+ assert (iterator.valid == !last_removed);
assert (has_next == iterator.next ());
- if (! has_next) {
- break;
+ assert (iterator.valid == !last_removed);
+ for (uint j = 0; j < found_times.length; j++) {
+ bool removed = false;
+ for (int k = 0; k < i; k++) {
+ if (idx[k] == j) {
+ removed = true;
+ break;
+ }
+ }
+ assert (found_times[j] == (removed ? 0 : 1));
}
}
- has_next = iterator.has_next ();
- assert (! has_next);
- assert (has_next == iterator.next ());
- assert (one_found);
- assert (one_found_once);
- assert (!two_found);
- assert (three_found);
- assert (three_found_once);
}
public void test_contains_size_and_is_empty () {
// Check the collection exists
assert (test_collection != null);
+ unowned string[] data = TestData.get_data ();
+ unowned uint[] idx = TestData.get_drawn_numbers ();
+
// Check the collection is initially empty
- assert (! test_collection.contains ("one"));
- assert (! test_collection.contains ("two"));
- assert (! test_collection.contains ("three"));
+ foreach (unowned string s in data) {
+ assert (! test_collection.contains (s));
+ }
assert (test_collection.size == 0);
assert (test_collection.is_empty);
// Add an element
- assert (test_collection.add ("one"));
- assert (test_collection.contains ("one"));
- assert (! test_collection.contains ("two"));
- assert (! test_collection.contains ("three"));
+ assert (test_collection.add (data[0]));
+ assert (test_collection.contains (data[0]));
+ for (uint i = 1; i < data.length; i++) {
+ assert (! test_collection.contains (data[i]));
+ }
assert (test_collection.size == 1);
assert (! test_collection.is_empty);
// Remove the added element
assert (test_collection.remove ("one"));
- assert (! test_collection.contains ("one"));
- assert (! test_collection.contains ("two"));
- assert (! test_collection.contains ("three"));
+ foreach (unowned string s in data) {
+ assert (! test_collection.contains (s));
+ }
assert (test_collection.size == 0);
assert (test_collection.is_empty);
// Add more elements
- assert (test_collection.add ("one"));
- assert (test_collection.contains ("one"));
- assert (! test_collection.contains ("two"));
- assert (! test_collection.contains ("three"));
- assert (test_collection.size == 1);
- assert (! test_collection.is_empty);
-
- assert (test_collection.add ("two"));
- assert (test_collection.contains ("one"));
- assert (test_collection.contains ("two"));
- assert (! test_collection.contains ("three"));
- assert (test_collection.size == 2);
- assert (! test_collection.is_empty);
-
- assert (test_collection.add ("three"));
- assert (test_collection.contains ("one"));
- assert (test_collection.contains ("two"));
- assert (test_collection.contains ("three"));
- assert (test_collection.size == 3);
- assert (! test_collection.is_empty);
-
- // Remove one element
- assert (test_collection.remove ("two"));
- assert (test_collection.contains ("one"));
- assert (! test_collection.contains ("two"));
- assert (test_collection.contains ("three"));
- assert (test_collection.size == 2);
- assert (! test_collection.is_empty);
-
- // Remove the same element again
- assert (! test_collection.remove ("two"));
- assert (test_collection.contains ("one"));
- assert (! test_collection.contains ("two"));
- assert (test_collection.contains ("three"));
- assert (test_collection.size == 2);
- assert (! test_collection.is_empty);
+ for (uint i = 0; i < data.length; i++) {
+ assert (test_collection.add (data[i]));
+ for (uint j = 0; j <= i; j++) {
+ assert (test_collection.contains (data[j]));
+ }
+ for (uint j = i + 1; j < data.length; j++) {
+ assert (! test_collection.contains (data[j]));
+ }
+ assert (test_collection.size == i + 1);
+ assert (! test_collection.is_empty);
+ }
+ for (uint i = 0; i < idx.length; i++) {
+ // Remove one element
+ assert (test_collection.remove (data[idx[i]]));
+ for (uint j = 0; j < data.length; j++) {
+ bool removed = false;
+ for (uint k = 0; k <= i; k++) {
+ if (idx[k] == j) {
+ removed = true;
+ break;
+ }
+ }
+ assert (test_collection.contains (data[j]) == !removed);
+ }
+ assert (test_collection.size == data.length - (i + 1));
+
+ // Remove the same element again
+ assert (! test_collection.remove (data[idx[i]]));
+ for (uint j = 0; j < data.length; j++) {
+ bool removed = false;
+ for (uint k = 0; k <= i; k++) {
+ if (idx[k] == j) {
+ removed = true;
+ break;
+ }
+ }
+ assert (test_collection.contains (data[j]) == !removed);
+ }
+ assert (test_collection.size == data.length - (i + 1));
+ }
// Remove all elements
test_collection.clear ();
- assert (! test_collection.contains ("one"));
- assert (! test_collection.contains ("two"));
- assert (! test_collection.contains ("three"));
+ foreach (unowned string el in data) {
+ assert (! test_collection.contains (el));
+ }
assert (test_collection.size == 0);
assert (test_collection.is_empty);
}
@@ -336,16 +272,7 @@ public abstract class CollectionTests : Gee.TestCase {
// Check the collection exists
assert (test_collection != null);
- string[] to_add = {
- "one", "two", "three", "four", "five", "six", "seven", "eight",
- "nine", "ten", "eleven", "twelve", "thirteen", "fourteen",
- "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty",
- "twenty one", "twenty two", "twenty three", "twenty four",
- "twenty five", "twenty six", "twenty seven", "twenty eight",
- "twenty nine", "thirty", "thirty one", "thirty two", "thirty four",
- "thirty five", "thirty six", "thirty seven", "thirty eight",
- "thirty nine", "fourty"
- };
+ unowned string[] to_add = TestData.get_data ();
var expected_size = 0;
foreach (var a in to_add) {
@@ -373,16 +300,7 @@ public abstract class CollectionTests : Gee.TestCase {
// Check the collection exists
assert (test_collection != null);
- string[] to_add = {
- "one", "two", "three", "four", "five", "six", "seven", "eight",
- "nine", "ten", "eleven", "twelve", "thirteen", "fourteen",
- "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty",
- "twenty one", "twenty two", "twenty three", "twenty four",
- "twenty five", "twenty six", "twenty seven", "twenty eight",
- "twenty nine", "thirty", "thirty one", "thirty two", "thirty four",
- "thirty five", "thirty six", "thirty seven", "thirty eight",
- "thirty nine", "fourty"
- };
+ unowned string[] to_add = TestData.get_data ();
var expected_size = 0;
foreach (var a in to_add) {
@@ -718,19 +636,285 @@ public abstract class CollectionTests : Gee.TestCase {
assert (test_collection != null);
Value value;
- value = Value (typeof (Type));
- test_collection.get_property ("element-type", ref value);
- assert (value.get_gtype () == test_collection.element_type);
- value.unset ();
-
- value = Value (typeof (bool));
- test_collection.get_property ("is-empty", ref value);
- assert (value.get_boolean () == test_collection.is_empty);
- value.unset ();
-
value = Value (typeof (int));
test_collection.get_property ("size", ref value);
assert (value.get_int () == test_collection.size);
value.unset ();
}
+
+ public void test_fold () {
+ assert (test_collection.add ("one"));
+ assert (test_collection.add ("two"));
+ assert (test_collection.add ("three"));
+
+ int count;
+
+ count = test_collection.fold<int> ((x, y) => {return y + 1;}, 0);
+ assert (count == 3);
+
+ count = test_collection.iterator ().fold<int> ((x, y) => {return y + 1;}, 0);
+ assert (count == 3);
+
+ Iterator<string> iter = test_collection.iterator ();
+ assert (iter.next ());
+ count = iter.fold<int> ((x, y) => {return y + 1;}, 0);
+ assert (count == 3);
+ }
+
+ public void test_foreach () {
+ assert (test_collection.add ("one"));
+ assert (test_collection.add ("two"));
+ assert (test_collection.add ("three"));
+
+ int count = 0;
+
+ test_collection.foreach ((x) => {count++; return true;});
+ assert (count == 3);
+
+ test_collection.iterator ().foreach ((x) => {count++; return true;});
+ assert (count == 6);
+
+ Iterator<string> iter = test_collection.iterator ();
+ assert (iter.next ());
+ iter.foreach ((x) => {count++; return true;});
+ assert (count == 9);
+ }
+
+ public void test_map () {
+ assert (test_collection.add ("one"));
+ assert (test_collection.add ("two"));
+ assert (test_collection.add ("three"));
+
+ bool one = false;
+ bool two = false;
+ bool three = false;
+
+ int i = 0;
+ var iter = test_collection.iterator().map<int> ((str) => {
+ if (str == "one") {
+ assert (!one);
+ one = true;
+ } else if (str == "two") {
+ assert (!two);
+ two = true;
+ } else if (str == "three") {
+ assert (!three);
+ three = true;
+ } else {
+ assert_not_reached ();
+ }
+ return i++;
+ });
+ int j = 0;
+ while (iter.next ()) {
+ assert (i == j);
+ assert (j == iter.get ());
+ assert (j == iter.get ());
+ j++;
+ assert (i == j);
+ }
+
+ assert (i == j);
+ assert (i == test_collection.size);
+ assert (one);
+ assert (two);
+ assert (three);
+
+ one = two = three = false;
+ i = j = 0;
+
+ iter = test_collection.map<int> ((str) => {
+ if (str == "one") {
+ assert (!one);
+ one = true;
+ } else if (str == "two") {
+ assert (!two);
+ two = true;
+ } else if (str == "three") {
+ assert (!three);
+ three = true;
+ } else {
+ assert_not_reached ();
+ }
+ return i++;
+ });
+ while (iter.next ()) {
+ assert (i == j);
+ assert (j == iter.get ());
+ assert (j == iter.get ());
+ j++;
+ assert (i == j);
+ }
+
+ assert (i == j);
+ assert (i == test_collection.size);
+ assert (one);
+ assert (two);
+ assert (three);
+ }
+
+ public void test_scan () {
+ assert (test_collection.add ("one"));
+ assert (test_collection.add ("two"));
+ assert (test_collection.add ("three"));
+
+ bool one = false;
+ bool two = false;
+ bool three = false;
+
+ var iter = test_collection.iterator().scan<int> ((str, cur) => {
+ if (str == "one") {
+ assert (!one);
+ one = true;
+ } else if (str == "two") {
+ assert (!two);
+ two = true;
+ } else if (str == "three") {
+ assert (!three);
+ three = true;
+ } else {
+ assert_not_reached ();
+ }
+ return cur + 1;
+ }, 0);
+
+ int j = 0;
+ do {
+ assert (j == iter.get ());
+ assert (j == iter.get ());
+ j++;
+ } while (iter.next ());
+
+ assert (j == test_collection.size + 1);
+ assert (one);
+ assert (two);
+ assert (three);
+
+ one = two = three = false;
+ j = 0;
+
+ iter = test_collection.scan<int> ((str, cur) => {
+ if (str == "one") {
+ assert (!one);
+ one = true;
+ } else if (str == "two") {
+ assert (!two);
+ two = true;
+ } else if (str == "three") {
+ assert (!three);
+ three = true;
+ } else {
+ assert_not_reached ();
+ }
+ return cur + 1;
+ }, 0);
+
+ do {
+ assert (j == iter.get ());
+ assert (j == iter.get ());
+ j++;
+ } while (iter.next ());
+
+ assert (j == test_collection.size + 1);
+ assert (one);
+ assert (two);
+ assert (three);
+ }
+
+ public void test_filter () {
+ assert (test_collection.add ("one"));
+ assert (test_collection.add ("two"));
+ assert (test_collection.add ("three"));
+
+ bool one = false;
+ bool two = false;
+ bool three = false;
+
+ var iter = test_collection.iterator().filter ((str) => {
+ if (str == "one") {
+ assert (!one);
+ one = true;
+ } else if (str == "two") {
+ assert (!two);
+ two = true;
+ } else if (str == "three") {
+ assert (!three);
+ three = true;
+ } else {
+ assert_not_reached ();
+ }
+ return str != "two";
+ });
+
+ assert (!iter.valid);
+
+ int j = 0;
+ while (iter.next ()) {
+ assert(iter.get () != "two");
+ j++;
+ }
+ assert (j == 2);
+ assert (one);
+ assert (two);
+ assert (three);
+
+ one = two = three = false;
+ j = 0;
+
+ iter = test_collection.filter ((str) => {
+ if (str == "one") {
+ assert (!one);
+ one = true;
+ } else if (str == "two") {
+ assert (!two);
+ two = true;
+ } else if (str == "three") {
+ assert (!three);
+ three = true;
+ } else {
+ assert_not_reached ();
+ }
+ return str != "two";
+ });
+
+ assert (!iter.valid);
+
+ while (iter.next ()) {
+ assert(iter.get () != "two");
+ j++;
+ }
+ assert (j == 2);
+ assert (one);
+ assert (two);
+ assert (three);
+ }
+
+ public void test_chop () {
+ assert (test_collection.add ("one"));
+ assert (test_collection.add ("two"));
+ assert (test_collection.add ("three"));
+
+ var iter = test_collection.iterator().chop (1, 1);
+ assert (!iter.valid);
+ var iter2 = test_collection.iterator();
+
+ assert (iter2.next ());
+ assert (iter2.next ());
+ assert (iter.next ());
+ assert (iter2.get () == iter.get ());
+ assert (!iter.next ());
+ assert (iter2.next ());
+
+ iter = test_collection.chop (1, 1);
+ assert (!iter.valid);
+ iter2 = test_collection.iterator();
+
+ assert (iter2.next ());
+ assert (iter2.next ());
+ assert (iter.next ());
+ assert (iter2.get () == iter.get ());
+ assert (!iter.next ());
+ assert (iter2.next ());
+ }
}
+
diff --git a/tests/testcomparable.c b/tests/testcomparable.c
deleted file mode 100644
index 2241ca0..0000000
--- a/tests/testcomparable.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/* testcomparable.c generated by valac 0.18.0, the Vala compiler
- * generated from testcomparable.vala, do not modify */
-
-/* testcomparable.vala
- *
- * Copyright (C) 2009 Didier Villevalois
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Author:
- * Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
- */
-
-#include <glib.h>
-#include <glib-object.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gee.h>
-
-
-#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
-#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
-#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
-#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
-#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
-#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
-
-typedef struct _GeeTestCase GeeTestCase;
-typedef struct _GeeTestCaseClass GeeTestCaseClass;
-typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
-
-#define TYPE_COMPARABLE_TESTS (comparable_tests_get_type ())
-#define COMPARABLE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMPARABLE_TESTS, ComparableTests))
-#define COMPARABLE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMPARABLE_TESTS, ComparableTestsClass))
-#define IS_COMPARABLE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMPARABLE_TESTS))
-#define IS_COMPARABLE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMPARABLE_TESTS))
-#define COMPARABLE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMPARABLE_TESTS, ComparableTestsClass))
-
-typedef struct _ComparableTests ComparableTests;
-typedef struct _ComparableTestsClass ComparableTestsClass;
-typedef struct _ComparableTestsPrivate ComparableTestsPrivate;
-
-#define COMPARABLE_TESTS_TYPE_TEST_COMPARABLE (comparable_tests_test_comparable_get_type ())
-#define COMPARABLE_TESTS_TEST_COMPARABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COMPARABLE_TESTS_TYPE_TEST_COMPARABLE, ComparableTestsTestComparable))
-#define COMPARABLE_TESTS_TEST_COMPARABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), COMPARABLE_TESTS_TYPE_TEST_COMPARABLE, ComparableTestsTestComparableClass))
-#define COMPARABLE_TESTS_IS_TEST_COMPARABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), COMPARABLE_TESTS_TYPE_TEST_COMPARABLE))
-#define COMPARABLE_TESTS_IS_TEST_COMPARABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), COMPARABLE_TESTS_TYPE_TEST_COMPARABLE))
-#define COMPARABLE_TESTS_TEST_COMPARABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), COMPARABLE_TESTS_TYPE_TEST_COMPARABLE, ComparableTestsTestComparableClass))
-
-typedef struct _ComparableTestsTestComparable ComparableTestsTestComparable;
-typedef struct _ComparableTestsTestComparableClass ComparableTestsTestComparableClass;
-typedef struct _ComparableTestsTestComparablePrivate ComparableTestsTestComparablePrivate;
-#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
-
-struct _GeeTestCase {
- GObject parent_instance;
- GeeTestCasePrivate * priv;
-};
-
-struct _GeeTestCaseClass {
- GObjectClass parent_class;
- void (*set_up) (GeeTestCase* self);
- void (*tear_down) (GeeTestCase* self);
-};
-
-struct _ComparableTests {
- GeeTestCase parent_instance;
- ComparableTestsPrivate * priv;
-};
-
-struct _ComparableTestsClass {
- GeeTestCaseClass parent_class;
-};
-
-typedef void (*GeeTestCaseTestMethod) (void* user_data);
-struct _ComparableTestsTestComparable {
- GObject parent_instance;
- ComparableTestsTestComparablePrivate * priv;
- gint _a;
-};
-
-struct _ComparableTestsTestComparableClass {
- GObjectClass parent_class;
-};
-
-
-static gpointer comparable_tests_parent_class = NULL;
-static gpointer comparable_tests_test_comparable_parent_class = NULL;
-static GeeComparableIface* comparable_tests_test_comparable_gee_comparable_parent_iface = NULL;
-
-GType gee_test_case_get_type (void) G_GNUC_CONST;
-GType comparable_tests_get_type (void) G_GNUC_CONST;
-enum {
- COMPARABLE_TESTS_DUMMY_PROPERTY
-};
-ComparableTests* comparable_tests_new (void);
-ComparableTests* comparable_tests_construct (GType object_type);
-GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-void comparable_tests_test_selected_functions (ComparableTests* self);
-static void _comparable_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
-static ComparableTestsTestComparable* comparable_tests_test_comparable_new (gint a);
-static ComparableTestsTestComparable* comparable_tests_test_comparable_construct (GType object_type, gint a);
-static GType comparable_tests_test_comparable_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
-enum {
- COMPARABLE_TESTS_TEST_COMPARABLE_DUMMY_PROPERTY
-};
-static gint comparable_tests_test_comparable_real_compare_to (GeeComparable* base, ComparableTestsTestComparable* object);
-static void comparable_tests_test_comparable_finalize (GObject* obj);
-
-
-static void _comparable_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- comparable_tests_test_selected_functions (self);
-}
-
-
-ComparableTests* comparable_tests_construct (GType object_type) {
- ComparableTests * self = NULL;
- self = (ComparableTests*) gee_test_case_construct (object_type, "Comparable");
- gee_test_case_add_test ((GeeTestCase*) self, "[Comparable] selected functions", _comparable_tests_test_selected_functions_gee_test_case_test_method, self);
- return self;
-}
-
-
-ComparableTests* comparable_tests_new (void) {
- return comparable_tests_construct (TYPE_COMPARABLE_TESTS);
-}
-
-
-void comparable_tests_test_selected_functions (ComparableTests* self) {
- ComparableTestsTestComparable* _tmp0_;
- ComparableTestsTestComparable* o1;
- ComparableTestsTestComparable* _tmp1_;
- ComparableTestsTestComparable* o2;
- GCompareFunc _tmp2_ = NULL;
- GCompareFunc compare;
- gint _tmp3_ = 0;
- gint _tmp4_ = 0;
- g_return_if_fail (self != NULL);
- _tmp0_ = comparable_tests_test_comparable_new (10);
- o1 = _tmp0_;
- _tmp1_ = comparable_tests_test_comparable_new (20);
- o2 = _tmp1_;
- _tmp2_ = gee_functions_get_compare_func_for (COMPARABLE_TESTS_TYPE_TEST_COMPARABLE);
- compare = _tmp2_;
- _tmp3_ = compare (o1, o2);
- _vala_assert (_tmp3_ < 0, "compare (o1, o2) < 0");
- o1->_a = 42;
- _tmp4_ = compare (o1, o2);
- _vala_assert (_tmp4_ > 0, "compare (o1, o2) > 0");
- _g_object_unref0 (o2);
- _g_object_unref0 (o1);
-}
-
-
-static ComparableTestsTestComparable* comparable_tests_test_comparable_construct (GType object_type, gint a) {
- ComparableTestsTestComparable * self = NULL;
- gint _tmp0_;
- self = (ComparableTestsTestComparable*) g_object_new (object_type, NULL);
- _tmp0_ = a;
- self->_a = _tmp0_;
- return self;
-}
-
-
-static ComparableTestsTestComparable* comparable_tests_test_comparable_new (gint a) {
- return comparable_tests_test_comparable_construct (COMPARABLE_TESTS_TYPE_TEST_COMPARABLE, a);
-}
-
-
-static gint comparable_tests_test_comparable_real_compare_to (GeeComparable* base, ComparableTestsTestComparable* object) {
- ComparableTestsTestComparable * self;
- gint result = 0;
- gint _tmp0_;
- ComparableTestsTestComparable* _tmp1_;
- gint _tmp2_;
- self = (ComparableTestsTestComparable*) base;
- g_return_val_if_fail (object != NULL, 0);
- _tmp0_ = self->_a;
- _tmp1_ = object;
- _tmp2_ = _tmp1_->_a;
- result = _tmp0_ - _tmp2_;
- return result;
-}
-
-
-static void comparable_tests_test_comparable_class_init (ComparableTestsTestComparableClass * klass) {
- comparable_tests_test_comparable_parent_class = g_type_class_peek_parent (klass);
- G_OBJECT_CLASS (klass)->finalize = comparable_tests_test_comparable_finalize;
-}
-
-
-static void comparable_tests_test_comparable_gee_comparable_interface_init (GeeComparableIface * iface) {
- comparable_tests_test_comparable_gee_comparable_parent_iface = g_type_interface_peek_parent (iface);
- iface->compare_to = (gint (*)(GeeComparable*, gconstpointer)) comparable_tests_test_comparable_real_compare_to;
-}
-
-
-static void comparable_tests_test_comparable_instance_init (ComparableTestsTestComparable * self) {
-}
-
-
-static void comparable_tests_test_comparable_finalize (GObject* obj) {
- ComparableTestsTestComparable * self;
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, COMPARABLE_TESTS_TYPE_TEST_COMPARABLE, ComparableTestsTestComparable);
- G_OBJECT_CLASS (comparable_tests_test_comparable_parent_class)->finalize (obj);
-}
-
-
-static GType comparable_tests_test_comparable_get_type (void) {
- static volatile gsize comparable_tests_test_comparable_type_id__volatile = 0;
- if (g_once_init_enter (&comparable_tests_test_comparable_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (ComparableTestsTestComparableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) comparable_tests_test_comparable_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ComparableTestsTestComparable), 0, (GInstanceInitFunc) comparable_tests_test_comparable_instance_init, NULL };
- static const GInterfaceInfo gee_comparable_info = { (GInterfaceInitFunc) comparable_tests_test_comparable_gee_comparable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
- GType comparable_tests_test_comparable_type_id;
- comparable_tests_test_comparable_type_id = g_type_register_static (G_TYPE_OBJECT, "ComparableTestsTestComparable", &g_define_type_info, 0);
- g_type_add_interface_static (comparable_tests_test_comparable_type_id, GEE_TYPE_COMPARABLE, &gee_comparable_info);
- g_once_init_leave (&comparable_tests_test_comparable_type_id__volatile, comparable_tests_test_comparable_type_id);
- }
- return comparable_tests_test_comparable_type_id__volatile;
-}
-
-
-static void comparable_tests_class_init (ComparableTestsClass * klass) {
- comparable_tests_parent_class = g_type_class_peek_parent (klass);
-}
-
-
-static void comparable_tests_instance_init (ComparableTests * self) {
-}
-
-
-GType comparable_tests_get_type (void) {
- static volatile gsize comparable_tests_type_id__volatile = 0;
- if (g_once_init_enter (&comparable_tests_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (ComparableTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) comparable_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ComparableTests), 0, (GInstanceInitFunc) comparable_tests_instance_init, NULL };
- GType comparable_tests_type_id;
- comparable_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "ComparableTests", &g_define_type_info, 0);
- g_once_init_leave (&comparable_tests_type_id__volatile, comparable_tests_type_id);
- }
- return comparable_tests_type_id__volatile;
-}
-
-
-
diff --git a/tests/testcomparable.vala b/tests/testcomparable.vala
deleted file mode 100644
index de5c2ef..0000000
--- a/tests/testcomparable.vala
+++ /dev/null
@@ -1,54 +0,0 @@
-/* testcomparable.vala
- *
- * Copyright (C) 2009 Didier Villevalois
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Author:
- * Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
- */
-
-using Gee;
-
-public class ComparableTests : Gee.TestCase {
-
- public ComparableTests () {
- base ("Comparable");
- add_test ("[Comparable] selected functions", test_selected_functions);
- }
-
- private class TestComparable : Object, Comparable<TestComparable> {
- public int _a;
-
- public TestComparable (int a) {
- _a = a;
- }
-
- public int compare_to (TestComparable object) {
- return _a - object._a;
- }
- }
-
- public void test_selected_functions () {
- TestComparable o1 = new TestComparable (10);
- TestComparable o2 = new TestComparable (20);
-
- CompareFunc compare = Functions.get_compare_func_for (typeof (TestComparable));
- assert (compare (o1, o2) < 0);
-
- o1._a = 42;
- assert (compare (o1, o2) > 0);
- }
-}
diff --git a/tests/testconcurrentlist.c b/tests/testconcurrentlist.c
new file mode 100644
index 0000000..9ec4537
--- /dev/null
+++ b/tests/testconcurrentlist.c
@@ -0,0 +1,188 @@
+/* testconcurrentlist.c generated by valac 0.18.0, the Vala compiler
+ * generated from testconcurrentlist.vala, do not modify */
+
+/* testconcurrentlist.vala
+ *
+ * Copyright (C) 2011 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_COLLECTION_TESTS (collection_tests_get_type ())
+#define COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_TESTS, CollectionTests))
+#define COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+#define IS_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_TESTS))
+#define IS_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_TESTS))
+#define COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+
+typedef struct _CollectionTests CollectionTests;
+typedef struct _CollectionTestsClass CollectionTestsClass;
+typedef struct _CollectionTestsPrivate CollectionTestsPrivate;
+
+#define TYPE_LIST_TESTS (list_tests_get_type ())
+#define LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIST_TESTS, ListTests))
+#define LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIST_TESTS, ListTestsClass))
+#define IS_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIST_TESTS))
+#define IS_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIST_TESTS))
+#define LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIST_TESTS, ListTestsClass))
+
+typedef struct _ListTests ListTests;
+typedef struct _ListTestsClass ListTestsClass;
+typedef struct _ListTestsPrivate ListTestsPrivate;
+
+#define TYPE_CONCURRENT_LIST_TESTS (concurrent_list_tests_get_type ())
+#define CONCURRENT_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONCURRENT_LIST_TESTS, ConcurrentListTests))
+#define CONCURRENT_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONCURRENT_LIST_TESTS, ConcurrentListTestsClass))
+#define IS_CONCURRENT_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONCURRENT_LIST_TESTS))
+#define IS_CONCURRENT_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONCURRENT_LIST_TESTS))
+#define CONCURRENT_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONCURRENT_LIST_TESTS, ConcurrentListTestsClass))
+
+typedef struct _ConcurrentListTests ConcurrentListTests;
+typedef struct _ConcurrentListTestsClass ConcurrentListTestsClass;
+typedef struct _ConcurrentListTestsPrivate ConcurrentListTestsPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _CollectionTests {
+ GeeTestCase parent_instance;
+ CollectionTestsPrivate * priv;
+ GeeCollection* test_collection;
+};
+
+struct _CollectionTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _ListTests {
+ CollectionTests parent_instance;
+ ListTestsPrivate * priv;
+};
+
+struct _ListTestsClass {
+ CollectionTestsClass parent_class;
+ void (*test_duplicates_are_retained) (ListTests* self);
+};
+
+struct _ConcurrentListTests {
+ ListTests parent_instance;
+ ConcurrentListTestsPrivate * priv;
+};
+
+struct _ConcurrentListTestsClass {
+ ListTestsClass parent_class;
+};
+
+
+static gpointer concurrent_list_tests_parent_class = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType collection_tests_get_type (void) G_GNUC_CONST;
+GType list_tests_get_type (void) G_GNUC_CONST;
+GType concurrent_list_tests_get_type (void) G_GNUC_CONST;
+enum {
+ CONCURRENT_LIST_TESTS_DUMMY_PROPERTY
+};
+ConcurrentListTests* concurrent_list_tests_new (void);
+ConcurrentListTests* concurrent_list_tests_construct (GType object_type);
+ListTests* list_tests_construct (GType object_type, const gchar* name);
+static void concurrent_list_tests_real_set_up (GeeTestCase* base);
+static void concurrent_list_tests_real_tear_down (GeeTestCase* base);
+
+
+ConcurrentListTests* concurrent_list_tests_construct (GType object_type) {
+ ConcurrentListTests * self = NULL;
+ self = (ConcurrentListTests*) list_tests_construct (object_type, "ConcurrentList");
+ return self;
+}
+
+
+ConcurrentListTests* concurrent_list_tests_new (void) {
+ return concurrent_list_tests_construct (TYPE_CONCURRENT_LIST_TESTS);
+}
+
+
+static void concurrent_list_tests_real_set_up (GeeTestCase* base) {
+ ConcurrentListTests * self;
+ GeeConcurrentList* _tmp0_;
+ self = (ConcurrentListTests*) base;
+ _tmp0_ = gee_concurrent_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+ _g_object_unref0 (((CollectionTests*) self)->test_collection);
+ ((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
+}
+
+
+static void concurrent_list_tests_real_tear_down (GeeTestCase* base) {
+ ConcurrentListTests * self;
+ self = (ConcurrentListTests*) base;
+ _g_object_unref0 (((CollectionTests*) self)->test_collection);
+ ((CollectionTests*) self)->test_collection = NULL;
+}
+
+
+static void concurrent_list_tests_class_init (ConcurrentListTestsClass * klass) {
+ concurrent_list_tests_parent_class = g_type_class_peek_parent (klass);
+ GEE_TEST_CASE_CLASS (klass)->set_up = concurrent_list_tests_real_set_up;
+ GEE_TEST_CASE_CLASS (klass)->tear_down = concurrent_list_tests_real_tear_down;
+}
+
+
+static void concurrent_list_tests_instance_init (ConcurrentListTests * self) {
+}
+
+
+GType concurrent_list_tests_get_type (void) {
+ static volatile gsize concurrent_list_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&concurrent_list_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (ConcurrentListTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) concurrent_list_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConcurrentListTests), 0, (GInstanceInitFunc) concurrent_list_tests_instance_init, NULL };
+ GType concurrent_list_tests_type_id;
+ concurrent_list_tests_type_id = g_type_register_static (TYPE_LIST_TESTS, "ConcurrentListTests", &g_define_type_info, 0);
+ g_once_init_leave (&concurrent_list_tests_type_id__volatile, concurrent_list_tests_type_id);
+ }
+ return concurrent_list_tests_type_id__volatile;
+}
+
+
+
diff --git a/tests/testconcurrentlist.vala b/tests/testconcurrentlist.vala
new file mode 100644
index 0000000..3bc5039
--- /dev/null
+++ b/tests/testconcurrentlist.vala
@@ -0,0 +1,38 @@
+/* testconcurrentlist.vala
+ *
+ * Copyright (C) 2011 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+using Gee;
+
+public class ConcurrentListTests : ListTests {
+ public ConcurrentListTests () {
+ base ("ConcurrentList");
+ }
+
+ public override void set_up () {
+ test_collection = new Gee.ConcurrentList<string> ();
+ }
+
+ public override void tear_down () {
+ test_collection = null;
+ }
+}
+
diff --git a/tests/testconcurrentset.c b/tests/testconcurrentset.c
new file mode 100644
index 0000000..7c1a67f
--- /dev/null
+++ b/tests/testconcurrentset.c
@@ -0,0 +1,209 @@
+/* testconcurrentset.c generated by valac 0.18.0, the Vala compiler
+ * generated from testconcurrentset.vala, do not modify */
+
+/* testconcurrentset.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_COLLECTION_TESTS (collection_tests_get_type ())
+#define COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_TESTS, CollectionTests))
+#define COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+#define IS_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_TESTS))
+#define IS_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_TESTS))
+#define COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_TESTS, CollectionTestsClass))
+
+typedef struct _CollectionTests CollectionTests;
+typedef struct _CollectionTestsClass CollectionTestsClass;
+typedef struct _CollectionTestsPrivate CollectionTestsPrivate;
+
+#define TYPE_SET_TESTS (set_tests_get_type ())
+#define SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_TESTS, SetTests))
+#define SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_TESTS, SetTestsClass))
+#define IS_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_TESTS))
+#define IS_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_TESTS))
+#define SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_TESTS, SetTestsClass))
+
+typedef struct _SetTests SetTests;
+typedef struct _SetTestsClass SetTestsClass;
+typedef struct _SetTestsPrivate SetTestsPrivate;
+
+#define TYPE_SORTED_SET_TESTS (sorted_set_tests_get_type ())
+#define SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SORTED_SET_TESTS, SortedSetTests))
+#define SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
+#define IS_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SORTED_SET_TESTS))
+#define IS_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SORTED_SET_TESTS))
+#define SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
+
+typedef struct _SortedSetTests SortedSetTests;
+typedef struct _SortedSetTestsClass SortedSetTestsClass;
+typedef struct _SortedSetTestsPrivate SortedSetTestsPrivate;
+
+#define TYPE_CONCURRENT_SET_TESTS (concurrent_set_tests_get_type ())
+#define CONCURRENT_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTests))
+#define CONCURRENT_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTestsClass))
+#define IS_CONCURRENT_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONCURRENT_SET_TESTS))
+#define IS_CONCURRENT_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONCURRENT_SET_TESTS))
+#define CONCURRENT_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTestsClass))
+
+typedef struct _ConcurrentSetTests ConcurrentSetTests;
+typedef struct _ConcurrentSetTestsClass ConcurrentSetTestsClass;
+typedef struct _ConcurrentSetTestsPrivate ConcurrentSetTestsPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _CollectionTests {
+ GeeTestCase parent_instance;
+ CollectionTestsPrivate * priv;
+ GeeCollection* test_collection;
+};
+
+struct _CollectionTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _SetTests {
+ CollectionTests parent_instance;
+ SetTestsPrivate * priv;
+};
+
+struct _SetTestsClass {
+ CollectionTestsClass parent_class;
+ void (*test_duplicates_are_ignored) (SetTests* self);
+};
+
+struct _SortedSetTests {
+ SetTests parent_instance;
+ SortedSetTestsPrivate * priv;
+};
+
+struct _SortedSetTestsClass {
+ SetTestsClass parent_class;
+};
+
+struct _ConcurrentSetTests {
+ SortedSetTests parent_instance;
+ ConcurrentSetTestsPrivate * priv;
+};
+
+struct _ConcurrentSetTestsClass {
+ SortedSetTestsClass parent_class;
+};
+
+
+static gpointer concurrent_set_tests_parent_class = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType collection_tests_get_type (void) G_GNUC_CONST;
+GType set_tests_get_type (void) G_GNUC_CONST;
+GType sorted_set_tests_get_type (void) G_GNUC_CONST;
+GType concurrent_set_tests_get_type (void) G_GNUC_CONST;
+enum {
+ CONCURRENT_SET_TESTS_DUMMY_PROPERTY
+};
+ConcurrentSetTests* concurrent_set_tests_new (void);
+ConcurrentSetTests* concurrent_set_tests_construct (GType object_type);
+SortedSetTests* sorted_set_tests_construct (GType object_type, const gchar* name, gboolean strict);
+static void concurrent_set_tests_real_set_up (GeeTestCase* base);
+static void concurrent_set_tests_real_tear_down (GeeTestCase* base);
+
+
+ConcurrentSetTests* concurrent_set_tests_construct (GType object_type) {
+ ConcurrentSetTests * self = NULL;
+ self = (ConcurrentSetTests*) sorted_set_tests_construct (object_type, "ConcurrentSet", FALSE);
+ return self;
+}
+
+
+ConcurrentSetTests* concurrent_set_tests_new (void) {
+ return concurrent_set_tests_construct (TYPE_CONCURRENT_SET_TESTS);
+}
+
+
+static void concurrent_set_tests_real_set_up (GeeTestCase* base) {
+ ConcurrentSetTests * self;
+ GeeConcurrentSet* _tmp0_;
+ self = (ConcurrentSetTests*) base;
+ _tmp0_ = gee_concurrent_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+ _g_object_unref0 (((CollectionTests*) self)->test_collection);
+ ((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
+}
+
+
+static void concurrent_set_tests_real_tear_down (GeeTestCase* base) {
+ ConcurrentSetTests * self;
+ self = (ConcurrentSetTests*) base;
+ _g_object_unref0 (((CollectionTests*) self)->test_collection);
+ ((CollectionTests*) self)->test_collection = NULL;
+}
+
+
+static void concurrent_set_tests_class_init (ConcurrentSetTestsClass * klass) {
+ concurrent_set_tests_parent_class = g_type_class_peek_parent (klass);
+ GEE_TEST_CASE_CLASS (klass)->set_up = concurrent_set_tests_real_set_up;
+ GEE_TEST_CASE_CLASS (klass)->tear_down = concurrent_set_tests_real_tear_down;
+}
+
+
+static void concurrent_set_tests_instance_init (ConcurrentSetTests * self) {
+}
+
+
+GType concurrent_set_tests_get_type (void) {
+ static volatile gsize concurrent_set_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&concurrent_set_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (ConcurrentSetTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) concurrent_set_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConcurrentSetTests), 0, (GInstanceInitFunc) concurrent_set_tests_instance_init, NULL };
+ GType concurrent_set_tests_type_id;
+ concurrent_set_tests_type_id = g_type_register_static (TYPE_SORTED_SET_TESTS, "ConcurrentSetTests", &g_define_type_info, 0);
+ g_once_init_leave (&concurrent_set_tests_type_id__volatile, concurrent_set_tests_type_id);
+ }
+ return concurrent_set_tests_type_id__volatile;
+}
+
+
+
diff --git a/tests/testconcurrentset.vala b/tests/testconcurrentset.vala
new file mode 100644
index 0000000..0b23c4e
--- /dev/null
+++ b/tests/testconcurrentset.vala
@@ -0,0 +1,38 @@
+/* testconcurrentset.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+using Gee;
+
+public class ConcurrentSetTests : SortedSetTests {
+ public ConcurrentSetTests () {
+ base ("ConcurrentSet", false);
+ }
+
+ public override void set_up () {
+ test_collection = new Gee.ConcurrentSet<string> ();
+ }
+
+ public override void tear_down () {
+ test_collection = null;
+ }
+}
+
diff --git a/tests/testdata.c b/tests/testdata.c
new file mode 100644
index 0000000..acf8331
--- /dev/null
+++ b/tests/testdata.c
@@ -0,0 +1,1103 @@
+/* testdata.c generated by valac 0.18.0, the Vala compiler
+ * generated from testdata.vala, do not modify */
+
+/* testcollection.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_TEST_DATA (test_data_get_type ())
+#define TEST_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST_DATA, TestData))
+#define TEST_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEST_DATA, TestDataClass))
+#define IS_TEST_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST_DATA))
+#define IS_TEST_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEST_DATA))
+#define TEST_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEST_DATA, TestDataClass))
+
+typedef struct _TestData TestData;
+typedef struct _TestDataClass TestDataClass;
+typedef struct _TestDataPrivate TestDataPrivate;
+#define _g_type_class_unref0(var) ((var == NULL) ? NULL : (var = (g_type_class_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _ParamSpecTestData ParamSpecTestData;
+
+struct _TestData {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ TestDataPrivate * priv;
+};
+
+struct _TestDataClass {
+ GTypeClass parent_class;
+ void (*finalize) (TestData *self);
+};
+
+struct _ParamSpecTestData {
+ GParamSpec parent_instance;
+};
+
+
+static gpointer test_data_parent_class = NULL;
+static gchar** test_data_ones;
+static gint test_data_ones_length1;
+static gchar** test_data_ones = NULL;
+static gint test_data_ones_length1 = 0;
+static gint _test_data_ones_size_ = 0;
+static gchar** test_data_tens;
+static gint test_data_tens_length1;
+static gchar** test_data_tens = NULL;
+static gint test_data_tens_length1 = 0;
+static gint _test_data_tens_size_ = 0;
+static gchar* test_data_hundred;
+static gchar* test_data_hundred = NULL;
+static gchar** test_data_thousands;
+static gint test_data_thousands_length1;
+static gchar** test_data_thousands = NULL;
+static gint test_data_thousands_length1 = 0;
+static gint _test_data_thousands_size_ = 0;
+static guint test_data_DATA_SIZE;
+static guint test_data_DATA_SIZE = 0U;
+static gchar** test_data_data;
+static gint test_data_data_length1;
+static gchar** test_data_data = NULL;
+static gint test_data_data_length1 = 0;
+static gint _test_data_data_size_ = 0;
+static gchar** test_data_sorted_data;
+static gint test_data_sorted_data_length1;
+static gchar** test_data_sorted_data = NULL;
+static gint test_data_sorted_data_length1 = 0;
+static gint _test_data_sorted_data_size_ = 0;
+static guint* test_data_random_idx;
+static gint test_data_random_idx_length1;
+static guint* test_data_random_idx = NULL;
+static gint test_data_random_idx_length1 = 0;
+static gint _test_data_random_idx_size_ = 0;
+
+gpointer test_data_ref (gpointer instance);
+void test_data_unref (gpointer instance);
+GParamSpec* param_spec_test_data (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_test_data (GValue* value, gpointer v_object);
+void value_take_test_data (GValue* value, gpointer v_object);
+gpointer value_get_test_data (const GValue* value);
+GType test_data_get_type (void) G_GNUC_CONST;
+enum {
+ TEST_DATA_DUMMY_PROPERTY
+};
+static guint test_data_data_size (void);
+static gchar** test_data_create_data (guint count, int* result_length1);
+static gchar** test_data_sort_array (gchar** array, int array_length1, int* result_length1);
+static gchar** _vala_array_dup1 (gchar** self, int length);
+static guint* test_data_draw_numbers (guint n, guint k, int* result_length1);
+#define TEST_DATA_RND_IDX_SIZE ((guint) 8)
+gchar** test_data_get_data (int* result_length1);
+gchar** test_data_get_sorted_data (int* result_length1);
+guint* test_data_get_drawn_numbers (int* result_length1);
+static gchar* test_data_print3digit (guint n);
+static gint __lambda2_ (const gchar* a, const gchar* b);
+static gint ___lambda2__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
+TestData* test_data_new (void);
+TestData* test_data_construct (GType object_type);
+static void test_data_finalize (TestData* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+
+static gchar** _vala_array_dup1 (gchar** self, int length) {
+ gchar** result;
+ int i;
+ result = g_new0 (gchar*, length + 1);
+ for (i = 0; i < length; i++) {
+ gchar* _tmp0_;
+ _tmp0_ = g_strdup (self[i]);
+ result[i] = _tmp0_;
+ }
+ return result;
+}
+
+
+static guint test_data_data_size (void) {
+ guint result = 0U;
+ gint _tmp0_ = 0;
+ gboolean _tmp1_ = FALSE;
+ gint _tmp2_;
+ _tmp1_ = g_test_quick ();
+ if (_tmp1_) {
+ _tmp0_ = 128;
+ } else {
+ _tmp0_ = 1024;
+ }
+ _tmp2_ = _tmp0_;
+ result = (guint) _tmp2_;
+ return result;
+}
+
+
+gchar** test_data_get_data (int* result_length1) {
+ gchar** result = NULL;
+ GTypeClass* _tmp0_ = NULL;
+ GTypeClass* klass;
+ gchar** _tmp1_;
+ gint _tmp1__length1;
+ gchar** _tmp2_;
+ gint _tmp2__length1;
+ _tmp0_ = g_type_class_ref (TYPE_TEST_DATA);
+ klass = _tmp0_;
+ G_TYPE_FROM_CLASS (klass);
+ _tmp1_ = test_data_data;
+ _tmp1__length1 = test_data_data_length1;
+ _tmp2_ = _tmp1_;
+ _tmp2__length1 = _tmp1__length1;
+ if (result_length1) {
+ *result_length1 = _tmp2__length1;
+ }
+ result = _tmp2_;
+ _g_type_class_unref0 (klass);
+ return result;
+}
+
+
+gchar** test_data_get_sorted_data (int* result_length1) {
+ gchar** result = NULL;
+ GTypeClass* _tmp0_ = NULL;
+ GTypeClass* klass;
+ gchar** _tmp1_;
+ gint _tmp1__length1;
+ gchar** _tmp2_;
+ gint _tmp2__length1;
+ _tmp0_ = g_type_class_ref (TYPE_TEST_DATA);
+ klass = _tmp0_;
+ G_TYPE_FROM_CLASS (klass);
+ _tmp1_ = test_data_sorted_data;
+ _tmp1__length1 = test_data_sorted_data_length1;
+ _tmp2_ = _tmp1_;
+ _tmp2__length1 = _tmp1__length1;
+ if (result_length1) {
+ *result_length1 = _tmp2__length1;
+ }
+ result = _tmp2_;
+ _g_type_class_unref0 (klass);
+ return result;
+}
+
+
+guint* test_data_get_drawn_numbers (int* result_length1) {
+ guint* result = NULL;
+ GTypeClass* _tmp0_ = NULL;
+ GTypeClass* klass;
+ guint* _tmp1_;
+ gint _tmp1__length1;
+ guint* _tmp2_;
+ gint _tmp2__length1;
+ _tmp0_ = g_type_class_ref (TYPE_TEST_DATA);
+ klass = _tmp0_;
+ G_TYPE_FROM_CLASS (klass);
+ _tmp1_ = test_data_random_idx;
+ _tmp1__length1 = test_data_random_idx_length1;
+ _tmp2_ = _tmp1_;
+ _tmp2__length1 = _tmp1__length1;
+ if (result_length1) {
+ *result_length1 = _tmp2__length1;
+ }
+ result = _tmp2_;
+ _g_type_class_unref0 (klass);
+ return result;
+}
+
+
+static guint* test_data_draw_numbers (guint n, guint k, int* result_length1) {
+ guint* result = NULL;
+ guint _tmp0_;
+ guint* _tmp1_ = NULL;
+ guint* _result_;
+ gint _result__length1;
+ gint __result__size_;
+ guint _tmp31_;
+ gint _tmp32_ = 0;
+ guint* _tmp33_;
+ gint _tmp33__length1;
+ guint* _tmp34_;
+ gint _tmp34__length1;
+ _tmp0_ = n;
+ _tmp1_ = g_new0 (guint, _tmp0_);
+ _result_ = _tmp1_;
+ _result__length1 = _tmp0_;
+ __result__size_ = _result__length1;
+ {
+ guint i;
+ i = (guint) 0;
+ {
+ gboolean _tmp2_;
+ _tmp2_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp3_;
+ guint _tmp5_;
+ guint _tmp6_;
+ guint* _tmp7_;
+ gint _tmp7__length1;
+ guint _tmp8_;
+ guint _tmp9_;
+ guint _tmp10_;
+ _tmp3_ = _tmp2_;
+ if (!_tmp3_) {
+ guint _tmp4_;
+ _tmp4_ = i;
+ i = _tmp4_ + 1;
+ }
+ _tmp2_ = FALSE;
+ _tmp5_ = i;
+ _tmp6_ = n;
+ if (!(_tmp5_ < _tmp6_)) {
+ break;
+ }
+ _tmp7_ = _result_;
+ _tmp7__length1 = _result__length1;
+ _tmp8_ = i;
+ _tmp9_ = i;
+ _tmp7_[_tmp8_] = _tmp9_;
+ _tmp10_ = _tmp7_[_tmp8_];
+ }
+ }
+ }
+ {
+ guint _tmp11_;
+ guint i;
+ _tmp11_ = n;
+ i = _tmp11_ - 1;
+ {
+ gboolean _tmp12_;
+ _tmp12_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp13_;
+ guint _tmp15_;
+ guint _tmp16_;
+ gint32 _tmp17_ = 0;
+ gint j;
+ guint* _tmp18_;
+ gint _tmp18__length1;
+ guint _tmp19_;
+ guint _tmp20_;
+ guint tmp;
+ guint* _tmp21_;
+ gint _tmp21__length1;
+ guint _tmp22_;
+ guint* _tmp23_;
+ gint _tmp23__length1;
+ gint _tmp24_;
+ guint _tmp25_;
+ guint _tmp26_;
+ guint* _tmp27_;
+ gint _tmp27__length1;
+ gint _tmp28_;
+ guint _tmp29_;
+ guint _tmp30_;
+ _tmp13_ = _tmp12_;
+ if (!_tmp13_) {
+ guint _tmp14_;
+ _tmp14_ = i;
+ i = _tmp14_ - 1;
+ }
+ _tmp12_ = FALSE;
+ _tmp15_ = i;
+ if (!(_tmp15_ >= ((guint) 1))) {
+ break;
+ }
+ _tmp16_ = i;
+ _tmp17_ = g_test_rand_int_range ((gint32) 0, (gint32) (_tmp16_ + 1));
+ j = (gint) _tmp17_;
+ _tmp18_ = _result_;
+ _tmp18__length1 = _result__length1;
+ _tmp19_ = i;
+ _tmp20_ = _tmp18_[_tmp19_];
+ tmp = _tmp20_;
+ _tmp21_ = _result_;
+ _tmp21__length1 = _result__length1;
+ _tmp22_ = i;
+ _tmp23_ = _result_;
+ _tmp23__length1 = _result__length1;
+ _tmp24_ = j;
+ _tmp25_ = _tmp23_[_tmp24_];
+ _tmp21_[_tmp22_] = _tmp25_;
+ _tmp26_ = _tmp21_[_tmp22_];
+ _tmp27_ = _result_;
+ _tmp27__length1 = _result__length1;
+ _tmp28_ = j;
+ _tmp29_ = tmp;
+ _tmp27_[_tmp28_] = _tmp29_;
+ _tmp30_ = _tmp27_[_tmp28_];
+ }
+ }
+ }
+ _tmp31_ = k;
+ _tmp32_ = (gint) _tmp31_;
+ _result_ = g_renew (guint, _result_, (gint) _tmp31_);
+ (_tmp32_ > _result__length1) ? memset (_result_ + _result__length1, 0, sizeof (guint) * (_tmp32_ - _result__length1)) : NULL;
+ _result__length1 = _tmp32_;
+ __result__size_ = _tmp32_;
+ _tmp33_ = _result_;
+ _tmp33__length1 = _result__length1;
+ _result_ = NULL;
+ _tmp34_ = _tmp33_;
+ _tmp34__length1 = _tmp33__length1;
+ if (result_length1) {
+ *result_length1 = _tmp34__length1;
+ }
+ result = _tmp34_;
+ _result_ = (g_free (_result_), NULL);
+ return result;
+}
+
+
+static gchar* test_data_print3digit (guint n) {
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+ guint _tmp1_;
+ const gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar* h;
+ guint _tmp14_;
+ gchar** _tmp15_;
+ gint _tmp15__length1;
+ guint _tmp16_;
+ const gchar* _tmp17_;
+ const gchar* t;
+ guint _tmp18_ = 0U;
+ guint _tmp19_;
+ gchar** _tmp20_;
+ gint _tmp20__length1;
+ guint _tmp23_;
+ gchar** _tmp24_;
+ gint _tmp24__length1;
+ guint _tmp25_;
+ const gchar* _tmp26_;
+ const gchar* o;
+ const gchar* _tmp27_ = NULL;
+ const gchar* _tmp28_;
+ const gchar* _tmp30_ = NULL;
+ gboolean _tmp31_ = FALSE;
+ const gchar* _tmp32_;
+ gboolean _tmp37_;
+ const gchar* _tmp38_ = NULL;
+ const gchar* _tmp39_;
+ const gchar* _tmp41_ = NULL;
+ gboolean _tmp42_ = FALSE;
+ const gchar* _tmp43_;
+ gboolean _tmp45_;
+ const gchar* _tmp46_ = NULL;
+ const gchar* _tmp47_;
+ const gchar* _tmp49_;
+ const gchar* _tmp50_;
+ const gchar* _tmp51_;
+ const gchar* _tmp52_;
+ const gchar* _tmp53_;
+ gchar* _tmp54_ = NULL;
+ _tmp1_ = n;
+ if (_tmp1_ >= ((guint) 200)) {
+ gchar** _tmp2_;
+ gint _tmp2__length1;
+ guint _tmp3_;
+ const gchar* _tmp4_;
+ const gchar* _tmp5_;
+ gchar* _tmp6_ = NULL;
+ _tmp2_ = test_data_ones;
+ _tmp2__length1 = test_data_ones_length1;
+ _tmp3_ = n;
+ _tmp4_ = _tmp2_[_tmp3_ / 100];
+ _tmp5_ = test_data_hundred;
+ _tmp6_ = g_strdup_printf ("%s %s", _tmp4_, _tmp5_);
+ _g_free0 (_tmp0_);
+ _tmp0_ = _tmp6_;
+ } else {
+ const gchar* _tmp7_ = NULL;
+ guint _tmp8_;
+ const gchar* _tmp10_;
+ gchar* _tmp11_;
+ _tmp8_ = n;
+ if (_tmp8_ >= ((guint) 100)) {
+ const gchar* _tmp9_;
+ _tmp9_ = test_data_hundred;
+ _tmp7_ = _tmp9_;
+ } else {
+ _tmp7_ = NULL;
+ }
+ _tmp10_ = _tmp7_;
+ _tmp11_ = g_strdup (_tmp10_);
+ _g_free0 (_tmp0_);
+ _tmp0_ = _tmp11_;
+ }
+ _tmp12_ = _tmp0_;
+ _tmp13_ = g_strdup (_tmp12_);
+ h = _tmp13_;
+ _tmp14_ = n;
+ n = _tmp14_ % 100;
+ _tmp15_ = test_data_tens;
+ _tmp15__length1 = test_data_tens_length1;
+ _tmp16_ = n;
+ _tmp17_ = _tmp15_[_tmp16_ / 10];
+ t = _tmp17_;
+ _tmp19_ = n;
+ _tmp20_ = test_data_ones;
+ _tmp20__length1 = test_data_ones_length1;
+ if (_tmp19_ >= ((guint) _tmp20__length1)) {
+ guint _tmp21_;
+ _tmp21_ = n;
+ _tmp18_ = _tmp21_ % 10;
+ } else {
+ guint _tmp22_;
+ _tmp22_ = n;
+ _tmp18_ = _tmp22_;
+ }
+ _tmp23_ = _tmp18_;
+ n = _tmp23_;
+ _tmp24_ = test_data_ones;
+ _tmp24__length1 = test_data_ones_length1;
+ _tmp25_ = n;
+ _tmp26_ = _tmp24_[_tmp25_];
+ o = _tmp26_;
+ _tmp28_ = h;
+ if (_tmp28_ != NULL) {
+ const gchar* _tmp29_;
+ _tmp29_ = h;
+ _tmp27_ = _tmp29_;
+ } else {
+ _tmp27_ = "";
+ }
+ _tmp32_ = h;
+ if (_tmp32_ != NULL) {
+ gboolean _tmp33_ = FALSE;
+ const gchar* _tmp34_;
+ gboolean _tmp36_;
+ _tmp34_ = t;
+ if (_tmp34_ != NULL) {
+ _tmp33_ = TRUE;
+ } else {
+ const gchar* _tmp35_;
+ _tmp35_ = o;
+ _tmp33_ = _tmp35_ != NULL;
+ }
+ _tmp36_ = _tmp33_;
+ _tmp31_ = _tmp36_;
+ } else {
+ _tmp31_ = FALSE;
+ }
+ _tmp37_ = _tmp31_;
+ if (_tmp37_) {
+ _tmp30_ = " ";
+ } else {
+ _tmp30_ = "";
+ }
+ _tmp39_ = t;
+ if (_tmp39_ != NULL) {
+ const gchar* _tmp40_;
+ _tmp40_ = t;
+ _tmp38_ = _tmp40_;
+ } else {
+ _tmp38_ = "";
+ }
+ _tmp43_ = t;
+ if (_tmp43_ != NULL) {
+ const gchar* _tmp44_;
+ _tmp44_ = o;
+ _tmp42_ = _tmp44_ != NULL;
+ } else {
+ _tmp42_ = FALSE;
+ }
+ _tmp45_ = _tmp42_;
+ if (_tmp45_) {
+ _tmp41_ = "-";
+ } else {
+ _tmp41_ = "";
+ }
+ _tmp47_ = o;
+ if (_tmp47_ != NULL) {
+ const gchar* _tmp48_;
+ _tmp48_ = o;
+ _tmp46_ = _tmp48_;
+ } else {
+ _tmp46_ = "";
+ }
+ _tmp49_ = _tmp27_;
+ _tmp50_ = _tmp30_;
+ _tmp51_ = _tmp38_;
+ _tmp52_ = _tmp41_;
+ _tmp53_ = _tmp46_;
+ _tmp54_ = g_strdup_printf ("%s%s%s%s%s", _tmp49_, _tmp50_, _tmp51_, _tmp52_, _tmp53_);
+ result = _tmp54_;
+ _g_free0 (h);
+ _g_free0 (_tmp0_);
+ return result;
+}
+
+
+static gchar** test_data_create_data (guint count, int* result_length1) {
+ gchar** result = NULL;
+ guint _tmp0_;
+ gchar** _tmp1_ = NULL;
+ gchar** numbers;
+ gint numbers_length1;
+ gint _numbers_size_;
+ gchar** _tmp40_;
+ gint _tmp40__length1;
+ gchar** _tmp41_;
+ gint _tmp41__length1;
+ _tmp0_ = count;
+ _tmp1_ = g_new0 (gchar*, _tmp0_ + 1);
+ numbers = _tmp1_;
+ numbers_length1 = _tmp0_;
+ _numbers_size_ = numbers_length1;
+ {
+ guint idx;
+ idx = (guint) 0;
+ {
+ gboolean _tmp2_;
+ _tmp2_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp3_;
+ guint _tmp5_;
+ guint _tmp6_;
+ guint _tmp7_;
+ guint n;
+ gchar* num;
+ guint th;
+ const gchar* _tmp34_;
+ gchar** _tmp36_;
+ gint _tmp36__length1;
+ guint _tmp37_;
+ gchar* _tmp38_;
+ gchar* _tmp39_;
+ _tmp3_ = _tmp2_;
+ if (!_tmp3_) {
+ guint _tmp4_;
+ _tmp4_ = idx;
+ idx = _tmp4_ + 1;
+ }
+ _tmp2_ = FALSE;
+ _tmp5_ = idx;
+ _tmp6_ = count;
+ if (!(_tmp5_ < _tmp6_)) {
+ break;
+ }
+ _tmp7_ = idx;
+ n = _tmp7_ + 1;
+ num = NULL;
+ th = (guint) 0;
+ while (TRUE) {
+ guint _tmp8_;
+ guint _tmp9_;
+ guint _tmp32_;
+ guint _tmp33_;
+ _tmp8_ = n;
+ if (!(_tmp8_ != ((guint) 0))) {
+ break;
+ }
+ _tmp9_ = n;
+ if ((_tmp9_ % 1000) != ((guint) 0)) {
+ gchar** _tmp10_;
+ gint _tmp10__length1;
+ guint _tmp11_;
+ const gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar* t;
+ guint _tmp14_;
+ gchar* _tmp15_ = NULL;
+ gchar* c;
+ const gchar* _tmp16_ = NULL;
+ const gchar* _tmp17_;
+ const gchar* _tmp18_ = NULL;
+ const gchar* _tmp19_;
+ const gchar* _tmp21_ = NULL;
+ const gchar* _tmp22_;
+ const gchar* _tmp23_ = NULL;
+ const gchar* _tmp24_;
+ const gchar* _tmp26_;
+ const gchar* _tmp27_;
+ const gchar* _tmp28_;
+ const gchar* _tmp29_;
+ const gchar* _tmp30_;
+ gchar* _tmp31_ = NULL;
+ _tmp10_ = test_data_thousands;
+ _tmp10__length1 = test_data_thousands_length1;
+ _tmp11_ = th;
+ _tmp12_ = _tmp10_[_tmp11_];
+ _tmp13_ = g_strdup (_tmp12_);
+ t = _tmp13_;
+ _tmp14_ = n;
+ _tmp15_ = test_data_print3digit (_tmp14_ % 1000);
+ c = _tmp15_;
+ _tmp17_ = t;
+ if (_tmp17_ != NULL) {
+ _tmp16_ = " ";
+ } else {
+ _tmp16_ = "";
+ }
+ _tmp19_ = t;
+ if (_tmp19_ != NULL) {
+ const gchar* _tmp20_;
+ _tmp20_ = t;
+ _tmp18_ = _tmp20_;
+ } else {
+ _tmp18_ = "";
+ }
+ _tmp22_ = num;
+ if (_tmp22_ != NULL) {
+ _tmp21_ = " ";
+ } else {
+ _tmp21_ = "";
+ }
+ _tmp24_ = num;
+ if (_tmp24_ != NULL) {
+ const gchar* _tmp25_;
+ _tmp25_ = num;
+ _tmp23_ = _tmp25_;
+ } else {
+ _tmp23_ = "";
+ }
+ _tmp26_ = c;
+ _tmp27_ = _tmp16_;
+ _tmp28_ = _tmp18_;
+ _tmp29_ = _tmp21_;
+ _tmp30_ = _tmp23_;
+ _tmp31_ = g_strdup_printf ("%s%s%s%s%s", _tmp26_, _tmp27_, _tmp28_, _tmp29_, _tmp30_);
+ _g_free0 (num);
+ num = _tmp31_;
+ _g_free0 (c);
+ _g_free0 (t);
+ }
+ _tmp32_ = n;
+ n = _tmp32_ / 1000;
+ _tmp33_ = th;
+ th = _tmp33_ + 1;
+ }
+ _tmp34_ = num;
+ if (_tmp34_ == NULL) {
+ gchar* _tmp35_;
+ _tmp35_ = g_strdup ("zero");
+ _g_free0 (num);
+ num = _tmp35_;
+ }
+ _tmp36_ = numbers;
+ _tmp36__length1 = numbers_length1;
+ _tmp37_ = idx;
+ _tmp38_ = num;
+ num = NULL;
+ _g_free0 (_tmp36_[_tmp37_]);
+ _tmp36_[_tmp37_] = _tmp38_;
+ _tmp39_ = _tmp36_[_tmp37_];
+ _g_free0 (num);
+ }
+ }
+ }
+ _tmp40_ = numbers;
+ _tmp40__length1 = numbers_length1;
+ numbers = NULL;
+ _tmp41_ = _tmp40_;
+ _tmp41__length1 = _tmp40__length1;
+ if (result_length1) {
+ *result_length1 = _tmp41__length1;
+ }
+ result = _tmp41_;
+ numbers = (_vala_array_free (numbers, numbers_length1, (GDestroyNotify) g_free), NULL);
+ return result;
+}
+
+
+static gint __lambda2_ (const gchar* a, const gchar* b) {
+ gint result = 0;
+ GCompareFunc _tmp0_;
+ const gchar* _tmp1_;
+ const gchar* _tmp2_;
+ gint _tmp3_ = 0;
+ g_return_val_if_fail (a != NULL, 0);
+ g_return_val_if_fail (b != NULL, 0);
+ _tmp0_ = g_strcmp0;
+ _tmp1_ = a;
+ _tmp2_ = b;
+ _tmp3_ = _tmp0_ (*((const gchar**) _tmp1_), *((const gchar**) _tmp2_));
+ result = _tmp3_;
+ return result;
+}
+
+
+static gint ___lambda2__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
+ gint result;
+ result = __lambda2_ (a, b);
+ return result;
+}
+
+
+static gchar** test_data_sort_array (gchar** array, int array_length1, int* result_length1) {
+ gchar** result = NULL;
+ gchar** _tmp0_;
+ gint _tmp0__length1;
+ gchar** _tmp1_;
+ gint _tmp1__length1;
+ gchar** _tmp2_;
+ gint _tmp2__length1;
+ _tmp0_ = array;
+ _tmp0__length1 = array_length1;
+ g_qsort_with_data (_tmp0_, _tmp0__length1, (gsize) sizeof (gchar*), (GCompareDataFunc) ___lambda2__gcompare_data_func, NULL);
+ _tmp1_ = array;
+ _tmp1__length1 = array_length1;
+ array = NULL;
+ _tmp2_ = _tmp1_;
+ _tmp2__length1 = _tmp1__length1;
+ if (result_length1) {
+ *result_length1 = _tmp2__length1;
+ }
+ result = _tmp2_;
+ array = (_vala_array_free (array, array_length1, (GDestroyNotify) g_free), NULL);
+ return result;
+}
+
+
+TestData* test_data_construct (GType object_type) {
+ TestData* self = NULL;
+ self = (TestData*) g_type_create_instance (object_type);
+ return self;
+}
+
+
+TestData* test_data_new (void) {
+ return test_data_construct (TYPE_TEST_DATA);
+}
+
+
+static void value_test_data_init (GValue* value) {
+ value->data[0].v_pointer = NULL;
+}
+
+
+static void value_test_data_free_value (GValue* value) {
+ if (value->data[0].v_pointer) {
+ test_data_unref (value->data[0].v_pointer);
+ }
+}
+
+
+static void value_test_data_copy_value (const GValue* src_value, GValue* dest_value) {
+ if (src_value->data[0].v_pointer) {
+ dest_value->data[0].v_pointer = test_data_ref (src_value->data[0].v_pointer);
+ } else {
+ dest_value->data[0].v_pointer = NULL;
+ }
+}
+
+
+static gpointer value_test_data_peek_pointer (const GValue* value) {
+ return value->data[0].v_pointer;
+}
+
+
+static gchar* value_test_data_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ if (collect_values[0].v_pointer) {
+ TestData* object;
+ object = collect_values[0].v_pointer;
+ if (object->parent_instance.g_class == NULL) {
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+ return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+ }
+ value->data[0].v_pointer = test_data_ref (object);
+ } else {
+ value->data[0].v_pointer = NULL;
+ }
+ return NULL;
+}
+
+
+static gchar* value_test_data_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ TestData** object_p;
+ object_p = collect_values[0].v_pointer;
+ if (!object_p) {
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+ }
+ if (!value->data[0].v_pointer) {
+ *object_p = NULL;
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+ *object_p = value->data[0].v_pointer;
+ } else {
+ *object_p = test_data_ref (value->data[0].v_pointer);
+ }
+ return NULL;
+}
+
+
+GParamSpec* param_spec_test_data (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecTestData* spec;
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_TEST_DATA), NULL);
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+ G_PARAM_SPEC (spec)->value_type = object_type;
+ return G_PARAM_SPEC (spec);
+}
+
+
+gpointer value_get_test_data (const GValue* value) {
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_DATA), NULL);
+ return value->data[0].v_pointer;
+}
+
+
+void value_set_test_data (GValue* value, gpointer v_object) {
+ TestData* old;
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_DATA));
+ old = value->data[0].v_pointer;
+ if (v_object) {
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TEST_DATA));
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+ value->data[0].v_pointer = v_object;
+ test_data_ref (value->data[0].v_pointer);
+ } else {
+ value->data[0].v_pointer = NULL;
+ }
+ if (old) {
+ test_data_unref (old);
+ }
+}
+
+
+void value_take_test_data (GValue* value, gpointer v_object) {
+ TestData* old;
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_DATA));
+ old = value->data[0].v_pointer;
+ if (v_object) {
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TEST_DATA));
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+ value->data[0].v_pointer = v_object;
+ } else {
+ value->data[0].v_pointer = NULL;
+ }
+ if (old) {
+ test_data_unref (old);
+ }
+}
+
+
+static void test_data_class_init (TestDataClass * klass) {
+ gchar* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
+ gchar* _tmp3_;
+ gchar* _tmp4_;
+ gchar* _tmp5_;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
+ gchar* _tmp8_;
+ gchar* _tmp9_;
+ gchar* _tmp10_;
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar* _tmp14_;
+ gchar* _tmp15_;
+ gchar* _tmp16_;
+ gchar* _tmp17_;
+ gchar* _tmp18_;
+ gchar** _tmp19_ = NULL;
+ gchar* _tmp20_;
+ gchar* _tmp21_;
+ gchar* _tmp22_;
+ gchar* _tmp23_;
+ gchar* _tmp24_;
+ gchar* _tmp25_;
+ gchar* _tmp26_;
+ gchar* _tmp27_;
+ gchar** _tmp28_ = NULL;
+ gchar* _tmp29_;
+ gchar* _tmp30_;
+ gchar* _tmp31_;
+ gchar* _tmp32_;
+ gchar* _tmp33_;
+ gchar** _tmp34_ = NULL;
+ guint _tmp35_ = 0U;
+ guint _tmp36_;
+ gint _tmp37_ = 0;
+ gchar** _tmp38_ = NULL;
+ gchar** _tmp39_;
+ gint _tmp39__length1;
+ gchar** _tmp40_;
+ gint _tmp40__length1;
+ gint _tmp41_ = 0;
+ gchar** _tmp42_ = NULL;
+ guint _tmp43_;
+ gint _tmp44_ = 0;
+ guint* _tmp45_ = NULL;
+ test_data_parent_class = g_type_class_peek_parent (klass);
+ TEST_DATA_CLASS (klass)->finalize = test_data_finalize;
+ _tmp0_ = g_strdup ("one");
+ _tmp1_ = g_strdup ("two");
+ _tmp2_ = g_strdup ("three");
+ _tmp3_ = g_strdup ("four");
+ _tmp4_ = g_strdup ("five");
+ _tmp5_ = g_strdup ("six");
+ _tmp6_ = g_strdup ("seven");
+ _tmp7_ = g_strdup ("eight");
+ _tmp8_ = g_strdup ("nine");
+ _tmp9_ = g_strdup ("ten");
+ _tmp10_ = g_strdup ("eleven");
+ _tmp11_ = g_strdup ("twelve");
+ _tmp12_ = g_strdup ("thirteen");
+ _tmp13_ = g_strdup ("fourteen");
+ _tmp14_ = g_strdup ("fifteen");
+ _tmp15_ = g_strdup ("sixteen");
+ _tmp16_ = g_strdup ("seventeen");
+ _tmp17_ = g_strdup ("eighteen");
+ _tmp18_ = g_strdup ("nineteen");
+ _tmp19_ = g_new0 (gchar*, 20 + 1);
+ _tmp19_[0] = NULL;
+ _tmp19_[1] = _tmp0_;
+ _tmp19_[2] = _tmp1_;
+ _tmp19_[3] = _tmp2_;
+ _tmp19_[4] = _tmp3_;
+ _tmp19_[5] = _tmp4_;
+ _tmp19_[6] = _tmp5_;
+ _tmp19_[7] = _tmp6_;
+ _tmp19_[8] = _tmp7_;
+ _tmp19_[9] = _tmp8_;
+ _tmp19_[10] = _tmp9_;
+ _tmp19_[11] = _tmp10_;
+ _tmp19_[12] = _tmp11_;
+ _tmp19_[13] = _tmp12_;
+ _tmp19_[14] = _tmp13_;
+ _tmp19_[15] = _tmp14_;
+ _tmp19_[16] = _tmp15_;
+ _tmp19_[17] = _tmp16_;
+ _tmp19_[18] = _tmp17_;
+ _tmp19_[19] = _tmp18_;
+ test_data_ones = _tmp19_;
+ test_data_ones_length1 = 20;
+ _tmp20_ = g_strdup ("twenty");
+ _tmp21_ = g_strdup ("thirty");
+ _tmp22_ = g_strdup ("forty");
+ _tmp23_ = g_strdup ("fifty");
+ _tmp24_ = g_strdup ("sixty");
+ _tmp25_ = g_strdup ("seventy");
+ _tmp26_ = g_strdup ("eighty");
+ _tmp27_ = g_strdup ("ninety");
+ _tmp28_ = g_new0 (gchar*, 10 + 1);
+ _tmp28_[0] = NULL;
+ _tmp28_[1] = NULL;
+ _tmp28_[2] = _tmp20_;
+ _tmp28_[3] = _tmp21_;
+ _tmp28_[4] = _tmp22_;
+ _tmp28_[5] = _tmp23_;
+ _tmp28_[6] = _tmp24_;
+ _tmp28_[7] = _tmp25_;
+ _tmp28_[8] = _tmp26_;
+ _tmp28_[9] = _tmp27_;
+ test_data_tens = _tmp28_;
+ test_data_tens_length1 = 10;
+ _tmp29_ = g_strdup ("hundred");
+ test_data_hundred = _tmp29_;
+ _tmp30_ = g_strdup ("thousand");
+ _tmp31_ = g_strdup ("million");
+ _tmp32_ = g_strdup ("billion");
+ _tmp33_ = g_strdup ("trillion");
+ _tmp34_ = g_new0 (gchar*, 5 + 1);
+ _tmp34_[0] = NULL;
+ _tmp34_[1] = _tmp30_;
+ _tmp34_[2] = _tmp31_;
+ _tmp34_[3] = _tmp32_;
+ _tmp34_[4] = _tmp33_;
+ test_data_thousands = _tmp34_;
+ test_data_thousands_length1 = 5;
+ _tmp35_ = test_data_data_size ();
+ test_data_DATA_SIZE = _tmp35_;
+ _tmp36_ = test_data_DATA_SIZE;
+ _tmp38_ = test_data_create_data (_tmp36_, &_tmp37_);
+ test_data_data = _tmp38_;
+ _tmp39_ = test_data_data;
+ _tmp39__length1 = test_data_data_length1;
+ _tmp40_ = (_tmp39_ != NULL) ? _vala_array_dup1 (_tmp39_, _tmp39__length1) : ((gpointer) _tmp39_);
+ _tmp40__length1 = _tmp39__length1;
+ _tmp42_ = test_data_sort_array (_tmp40_, _tmp40__length1, &_tmp41_);
+ test_data_sorted_data = _tmp42_;
+ _tmp43_ = test_data_DATA_SIZE;
+ _tmp45_ = test_data_draw_numbers (_tmp43_, TEST_DATA_RND_IDX_SIZE, &_tmp44_);
+ test_data_random_idx = _tmp45_;
+}
+
+
+static void test_data_instance_init (TestData * self) {
+ self->ref_count = 1;
+}
+
+
+static void test_data_finalize (TestData* obj) {
+ TestData * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TEST_DATA, TestData);
+}
+
+
+GType test_data_get_type (void) {
+ static volatile gsize test_data_type_id__volatile = 0;
+ if (g_once_init_enter (&test_data_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_test_data_init, value_test_data_free_value, value_test_data_copy_value, value_test_data_peek_pointer, "p", value_test_data_collect_value, "p", value_test_data_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (TestDataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) test_data_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TestData), 0, (GInstanceInitFunc) test_data_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType test_data_type_id;
+ test_data_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TestData", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&test_data_type_id__volatile, test_data_type_id);
+ }
+ return test_data_type_id__volatile;
+}
+
+
+gpointer test_data_ref (gpointer instance) {
+ TestData* self;
+ self = instance;
+ g_atomic_int_inc (&self->ref_count);
+ return instance;
+}
+
+
+void test_data_unref (gpointer instance) {
+ TestData* self;
+ self = instance;
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+ TEST_DATA_GET_CLASS (self)->finalize (self);
+ g_type_free_instance ((GTypeInstance *) self);
+ }
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/tests/testdata.vala b/tests/testdata.vala
new file mode 100644
index 0000000..5f00c97
--- /dev/null
+++ b/tests/testdata.vala
@@ -0,0 +1,111 @@
+/* testcollection.vala
+ *
+ * Copyright (C) 2012 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+public class TestData {
+ private static string?[] ones = {null, "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
+ private static string[] tens = {null, null, "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"};
+ private static string hundred = "hundred";
+ private static string?[] thousands = {null, "thousand", "million", "billion", "trillion"};
+
+ private static uint data_size () {
+ return Test.quick() ? 128 : 1024;
+ }
+
+ private static uint DATA_SIZE = data_size ();
+ private static const uint RND_IDX_SIZE = 8;
+
+ private static string[] data = create_data (DATA_SIZE);
+ private static string[] sorted_data = sort_array (data);
+ private static uint[] random_idx = draw_numbers(DATA_SIZE, RND_IDX_SIZE);
+
+ public static unowned string[] get_data () {
+ TypeClass klass = typeof (TestData).class_ref ();
+ klass.get_type ();
+ return data;
+ }
+
+ public static unowned string[] get_sorted_data () {
+ TypeClass klass = typeof (TestData).class_ref ();
+ klass.get_type ();
+ return sorted_data;
+ }
+
+ public static unowned uint[] get_drawn_numbers () {
+ TypeClass klass = typeof (TestData).class_ref ();
+ klass.get_type ();
+ return random_idx;
+ }
+
+ private static uint[] draw_numbers (uint n, uint k) {
+ uint[] result = new uint[n];
+ // Initialize array
+ for (uint i = 0; i < n; i++) {
+ result[i] = i;
+ }
+ // Fisher-Yates shuffle algorithm. Possibly not the most efficient implementation but oh well
+ for (uint i = n - 1; i >= 1; i--) {
+ int j = Test.rand_int_range (0, (int32)(i + 1));
+ uint tmp = result[i];
+ result[i] = result[j];
+ result[j] = tmp;
+ }
+ result.resize ((int)k);
+ return (owned)result;
+ }
+
+ private static string print3digit (uint n) {
+ string? h = (n >= 200) ? "%s %s".printf(ones[n / 100], hundred) : ((n >= 100) ? hundred : null);
+ n = n % 100;
+ unowned string? t = tens[n / 10];
+ n = (n >= ones.length) ? n % 10 : n;
+ unowned string? o = ones[n];
+ return "%s%s%s%s%s".printf(h != null ? h : "", h != null && (t != null || o != null) ? " " : "", t != null ? t : "", t != null && o != null ? "-" : "", o != null ? o : "");
+ }
+
+ private static string[] create_data (uint count) {
+ string[] numbers = new string[count];
+ for (uint idx = 0; idx < count; idx++) {
+ uint n = idx + 1;
+ string? num = null;
+ uint th = 0;
+ while (n != 0) {
+ if (n % 1000 != 0) {
+ string? t = thousands[th];
+ string c = print3digit (n % 1000);
+ num = "%s%s%s%s%s".printf(c, t != null ? " " : "", t != null ? t : "", num != null ? " " : "", num != null ? num : "");
+ }
+ n /= 1000;
+ th++;
+ }
+ if (num == null) {
+ num = "zero";
+ }
+ numbers[idx] = (owned)num;
+ }
+ return (owned)numbers;
+ }
+
+ private static string[] sort_array (owned string[] array) {
+ qsort_with_data<string> (array, sizeof(string), (a, b) => {return strcmp(*(string **)a, *(string **)b);});
+ return (owned)array;
+ }
+}
+
diff --git a/tests/testdeque.c b/tests/testdeque.c
index 4af05df..8cea5a5 100644
--- a/tests/testdeque.c
+++ b/tests/testdeque.c
@@ -129,13 +129,15 @@ enum {
};
DequeTests* deque_tests_construct (GType object_type, const gchar* name);
QueueTests* queue_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void deque_tests_test_queue_use (DequeTests* self);
static void _deque_tests_test_queue_use_gee_test_case_test_method (gpointer self);
void deque_tests_test_stack_use (DequeTests* self);
static void _deque_tests_test_stack_use_gee_test_case_test_method (gpointer self);
void deque_tests_test_reversed_stack_use (DequeTests* self);
static void _deque_tests_test_reversed_stack_use_gee_test_case_test_method (gpointer self);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _deque_tests_test_queue_use_gee_test_case_test_method (gpointer self) {
@@ -159,9 +161,9 @@ DequeTests* deque_tests_construct (GType object_type, const gchar* name) {
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (DequeTests*) queue_tests_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[Deque] queue use", _deque_tests_test_queue_use_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Deque] stack use", _deque_tests_test_stack_use_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Deque] reversed stack use", _deque_tests_test_reversed_stack_use_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Deque] queue use", _deque_tests_test_queue_use_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Deque] stack use", _deque_tests_test_stack_use_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Deque] reversed stack use", _deque_tests_test_reversed_stack_use_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -177,221 +179,493 @@ void deque_tests_test_queue_use (DequeTests* self) {
GeeDeque* test_deque;
GeeArrayList* _tmp2_;
GeeArrayList* recipient;
- gboolean _tmp3_ = FALSE;
- gint _tmp4_;
- gint _tmp5_;
- gboolean _tmp6_ = FALSE;
- gint _tmp7_;
- gint _tmp8_;
- gboolean _tmp9_ = FALSE;
- gint _tmp10_;
- gint _tmp11_;
- gboolean _tmp12_ = FALSE;
- gint _tmp13_;
- gint _tmp14_;
- gpointer _tmp15_ = NULL;
+ GeeDeque* _tmp3_;
+ gchar* _tmp4_;
+ gchar* _tmp5_;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
+ gchar* _tmp8_;
+ gchar* _tmp9_;
+ gchar* _tmp10_;
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar* _tmp14_;
+ gchar* _tmp15_;
gchar* _tmp16_;
- gpointer _tmp17_ = NULL;
+ gchar* _tmp17_;
gchar* _tmp18_;
- gint _tmp19_;
- gint _tmp20_;
- gpointer _tmp21_ = NULL;
+ gchar* _tmp19_;
+ gchar* _tmp20_;
+ gchar* _tmp21_;
gchar* _tmp22_;
- gpointer _tmp23_ = NULL;
+ gchar* _tmp23_;
gchar* _tmp24_;
- gint _tmp25_;
- gint _tmp26_;
- gpointer _tmp27_ = NULL;
+ gchar* _tmp25_;
+ gchar* _tmp26_;
+ gchar* _tmp27_;
gchar* _tmp28_;
- gpointer _tmp29_ = NULL;
+ gchar* _tmp29_;
gchar* _tmp30_;
- gint _tmp31_;
- gint _tmp32_;
- gpointer _tmp33_ = NULL;
+ gchar* _tmp31_;
+ gchar* _tmp32_;
+ gchar* _tmp33_;
gchar* _tmp34_;
- gpointer _tmp35_ = NULL;
+ gchar* _tmp35_;
gchar* _tmp36_;
- gint _tmp37_;
- gint _tmp38_;
- gpointer _tmp39_ = NULL;
+ gchar* _tmp37_;
+ gchar* _tmp38_;
+ gchar* _tmp39_;
gchar* _tmp40_;
- gpointer _tmp41_ = NULL;
+ gchar* _tmp41_;
gchar* _tmp42_;
- gboolean _tmp43_ = FALSE;
- gboolean _tmp44_ = FALSE;
- gboolean _tmp45_ = FALSE;
- gboolean _tmp46_ = FALSE;
- gint _tmp47_;
- gint _tmp48_;
- gint _tmp49_ = 0;
- gint _tmp50_;
- gint _tmp51_;
- gint _tmp52_;
- gint _tmp53_;
- gpointer _tmp54_ = NULL;
- gchar* _tmp55_;
- gint _tmp56_ = 0;
- gint _tmp57_;
- gint _tmp58_;
- gint _tmp59_;
- gint _tmp60_;
- gpointer _tmp61_ = NULL;
- gchar* _tmp62_;
- gpointer _tmp63_ = NULL;
- gchar* _tmp64_;
- gpointer _tmp65_ = NULL;
- gchar* _tmp66_;
- gint _tmp67_ = 0;
- gint _tmp68_;
- gint _tmp69_;
- gint _tmp70_;
- gint _tmp71_;
- gint _tmp72_ = 0;
- gint _tmp73_;
- gint _tmp74_;
- gint _tmp75_;
- gint _tmp76_;
+ gchar** _tmp43_ = NULL;
+ gchar** to_offer;
+ gint to_offer_length1;
+ gint _to_offer_size_;
+ GeeDeque* _tmp80_;
+ gpointer _tmp81_ = NULL;
+ gchar* _tmp82_;
+ GeeDeque* _tmp83_;
+ gpointer _tmp84_ = NULL;
+ gchar* _tmp85_;
+ GeeArrayList* _tmp86_;
+ GeeDeque* _tmp97_;
+ gint _tmp98_;
+ gint _tmp99_;
+ gchar** _tmp100_;
+ gint _tmp100__length1;
+ GeeDeque* _tmp101_;
+ GeeArrayList* _tmp102_;
+ gint _tmp103_ = 0;
+ GeeDeque* _tmp104_;
+ gint _tmp105_;
+ gint _tmp106_;
+ gchar** _tmp107_;
+ gint _tmp107__length1;
+ GeeArrayList* _tmp108_;
+ gint _tmp109_;
+ gint _tmp110_;
+ GeeArrayList* _tmp111_;
+ gpointer _tmp112_ = NULL;
+ gchar* _tmp113_;
+ gchar** _tmp114_;
+ gint _tmp114__length1;
+ const gchar* _tmp115_;
+ GeeDeque* _tmp116_;
+ GeeArrayList* _tmp117_;
+ gint _tmp118_ = 0;
+ gchar** _tmp119_;
+ gint _tmp119__length1;
+ GeeDeque* _tmp120_;
+ gint _tmp121_;
+ gint _tmp122_;
+ GeeArrayList* _tmp123_;
+ gint _tmp124_;
+ gint _tmp125_;
+ gchar** _tmp126_;
+ gint _tmp126__length1;
+ GeeArrayList* _tmp139_;
+ GeeDeque* _tmp140_;
+ GeeArrayList* _tmp141_;
+ gint _tmp142_ = 0;
+ GeeDeque* _tmp143_;
+ gint _tmp144_;
+ gint _tmp145_;
+ GeeArrayList* _tmp146_;
+ gint _tmp147_;
+ gint _tmp148_;
+ GeeArrayList* _tmp149_;
+ GeeDeque* _tmp150_;
+ GeeArrayList* _tmp151_;
+ gint _tmp152_ = 0;
+ GeeDeque* _tmp153_;
+ gint _tmp154_;
+ gint _tmp155_;
+ GeeArrayList* _tmp156_;
+ gint _tmp157_;
+ gint _tmp158_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
test_deque = _tmp1_;
- _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
recipient = _tmp2_;
- _vala_assert (test_deque != NULL, "test_deque != null");
- _tmp3_ = gee_deque_offer_tail (test_deque, "one");
- _vala_assert (_tmp3_, "test_deque.offer_tail (\"one\")");
- _tmp4_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp5_ = _tmp4_;
- _vala_assert (_tmp5_ == 1, "test_deque.size == 1");
- _tmp6_ = gee_deque_offer_tail (test_deque, "two");
- _vala_assert (_tmp6_, "test_deque.offer_tail (\"two\")");
- _tmp7_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp8_ = _tmp7_;
- _vala_assert (_tmp8_ == 2, "test_deque.size == 2");
- _tmp9_ = gee_deque_offer_tail (test_deque, "three");
- _vala_assert (_tmp9_, "test_deque.offer_tail (\"three\")");
- _tmp10_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp11_ = _tmp10_;
- _vala_assert (_tmp11_ == 3, "test_deque.size == 3");
- _tmp12_ = gee_deque_offer_tail (test_deque, "four");
- _vala_assert (_tmp12_, "test_deque.offer_tail (\"four\")");
- _tmp13_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp14_ = _tmp13_;
- _vala_assert (_tmp14_ == 4, "test_deque.size == 4");
- _tmp15_ = gee_deque_peek_head (test_deque);
- _tmp16_ = (gchar*) _tmp15_;
- _vala_assert (g_strcmp0 (_tmp16_, "one") == 0, "test_deque.peek_head () == \"one\"");
- _g_free0 (_tmp16_);
- _tmp17_ = gee_deque_poll_head (test_deque);
- _tmp18_ = (gchar*) _tmp17_;
- _vala_assert (g_strcmp0 (_tmp18_, "one") == 0, "test_deque.poll_head () == \"one\"");
- _g_free0 (_tmp18_);
- _tmp19_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp20_ = _tmp19_;
- _vala_assert (_tmp20_ == 3, "test_deque.size == 3");
- _tmp21_ = gee_deque_peek_head (test_deque);
- _tmp22_ = (gchar*) _tmp21_;
- _vala_assert (g_strcmp0 (_tmp22_, "two") == 0, "test_deque.peek_head () == \"two\"");
- _g_free0 (_tmp22_);
- _tmp23_ = gee_deque_poll_head (test_deque);
- _tmp24_ = (gchar*) _tmp23_;
- _vala_assert (g_strcmp0 (_tmp24_, "two") == 0, "test_deque.poll_head () == \"two\"");
- _g_free0 (_tmp24_);
- _tmp25_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp26_ = _tmp25_;
- _vala_assert (_tmp26_ == 2, "test_deque.size == 2");
- _tmp27_ = gee_deque_peek_head (test_deque);
- _tmp28_ = (gchar*) _tmp27_;
- _vala_assert (g_strcmp0 (_tmp28_, "three") == 0, "test_deque.peek_head () == \"three\"");
- _g_free0 (_tmp28_);
- _tmp29_ = gee_deque_poll_head (test_deque);
- _tmp30_ = (gchar*) _tmp29_;
- _vala_assert (g_strcmp0 (_tmp30_, "three") == 0, "test_deque.poll_head () == \"three\"");
- _g_free0 (_tmp30_);
- _tmp31_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp32_ = _tmp31_;
- _vala_assert (_tmp32_ == 1, "test_deque.size == 1");
- _tmp33_ = gee_deque_peek_head (test_deque);
- _tmp34_ = (gchar*) _tmp33_;
- _vala_assert (g_strcmp0 (_tmp34_, "four") == 0, "test_deque.peek_head () == \"four\"");
- _g_free0 (_tmp34_);
- _tmp35_ = gee_deque_poll_head (test_deque);
- _tmp36_ = (gchar*) _tmp35_;
- _vala_assert (g_strcmp0 (_tmp36_, "four") == 0, "test_deque.poll_head () == \"four\"");
- _g_free0 (_tmp36_);
- _tmp37_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp38_ = _tmp37_;
- _vala_assert (_tmp38_ == 0, "test_deque.size == 0");
- _tmp39_ = gee_deque_peek_head (test_deque);
- _tmp40_ = (gchar*) _tmp39_;
- _vala_assert (_tmp40_ == NULL, "test_deque.peek_head () == null");
- _g_free0 (_tmp40_);
- _tmp41_ = gee_deque_poll_head (test_deque);
- _tmp42_ = (gchar*) _tmp41_;
- _vala_assert (_tmp42_ == NULL, "test_deque.poll_head () == null");
- _g_free0 (_tmp42_);
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp43_ = gee_deque_offer_tail (test_deque, "one");
- _vala_assert (_tmp43_, "test_deque.offer_tail (\"one\")");
- _tmp44_ = gee_deque_offer_tail (test_deque, "two");
- _vala_assert (_tmp44_, "test_deque.offer_tail (\"two\")");
- _tmp45_ = gee_deque_offer_tail (test_deque, "three");
- _vala_assert (_tmp45_, "test_deque.offer_tail (\"three\")");
- _tmp46_ = gee_deque_offer_tail (test_deque, "four");
- _vala_assert (_tmp46_, "test_deque.offer_tail (\"four\")");
- _tmp47_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp48_ = _tmp47_;
- _vala_assert (_tmp48_ == 4, "test_deque.size == 4");
- _tmp49_ = gee_deque_drain_head (test_deque, (GeeCollection*) recipient, 1);
- _vala_assert (_tmp49_ == 1, "test_deque.drain_head (recipient, 1) == 1");
- _tmp50_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp51_ = _tmp50_;
- _vala_assert (_tmp51_ == 3, "test_deque.size == 3");
- _tmp52_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp53_ = _tmp52_;
- _vala_assert (_tmp53_ == 1, "recipient.size == 1");
- _tmp54_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 0);
- _tmp55_ = (gchar*) _tmp54_;
- _vala_assert (g_strcmp0 (_tmp55_, "one") == 0, "recipient.get (0) == \"one\"");
- _g_free0 (_tmp55_);
- _tmp56_ = gee_deque_drain_head (test_deque, (GeeCollection*) recipient, -1);
- _vala_assert (_tmp56_ == 3, "test_deque.drain_head (recipient) == 3");
- _tmp57_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp58_ = _tmp57_;
- _vala_assert (_tmp58_ == 0, "test_deque.size == 0");
- _tmp59_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp60_ = _tmp59_;
- _vala_assert (_tmp60_ == 4, "recipient.size == 4");
- _tmp61_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 1);
- _tmp62_ = (gchar*) _tmp61_;
- _vala_assert (g_strcmp0 (_tmp62_, "two") == 0, "recipient.get (1) == \"two\"");
- _g_free0 (_tmp62_);
- _tmp63_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 2);
- _tmp64_ = (gchar*) _tmp63_;
- _vala_assert (g_strcmp0 (_tmp64_, "three") == 0, "recipient.get (2) == \"three\"");
- _g_free0 (_tmp64_);
- _tmp65_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 3);
- _tmp66_ = (gchar*) _tmp65_;
- _vala_assert (g_strcmp0 (_tmp66_, "four") == 0, "recipient.get (3) == \"four\"");
- _g_free0 (_tmp66_);
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp67_ = gee_deque_drain_head (test_deque, (GeeCollection*) recipient, 1);
- _vala_assert (_tmp67_ == 0, "test_deque.drain_head (recipient, 1) == 0");
- _tmp68_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp69_ = _tmp68_;
- _vala_assert (_tmp69_ == 0, "test_deque.size == 0");
- _tmp70_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp71_ = _tmp70_;
- _vala_assert (_tmp71_ == 0, "recipient.size == 0");
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp72_ = gee_deque_drain_head (test_deque, (GeeCollection*) recipient, -1);
- _vala_assert (_tmp72_ == 0, "test_deque.drain_head (recipient) == 0");
- _tmp73_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp74_ = _tmp73_;
- _vala_assert (_tmp74_ == 0, "test_deque.size == 0");
- _tmp75_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp76_ = _tmp75_;
- _vala_assert (_tmp76_ == 0, "recipient.size == 0");
+ _tmp3_ = test_deque;
+ _vala_assert (_tmp3_ != NULL, "test_deque != null");
+ _tmp4_ = g_strdup ("one");
+ _tmp5_ = g_strdup ("two");
+ _tmp6_ = g_strdup ("three");
+ _tmp7_ = g_strdup ("four");
+ _tmp8_ = g_strdup ("five");
+ _tmp9_ = g_strdup ("six");
+ _tmp10_ = g_strdup ("seven");
+ _tmp11_ = g_strdup ("\neight");
+ _tmp12_ = g_strdup ("nine");
+ _tmp13_ = g_strdup ("ten");
+ _tmp14_ = g_strdup ("eleven");
+ _tmp15_ = g_strdup ("twelve");
+ _tmp16_ = g_strdup ("thirteen");
+ _tmp17_ = g_strdup ("fourteen\n");
+ _tmp18_ = g_strdup ("fifteen");
+ _tmp19_ = g_strdup ("sixteen");
+ _tmp20_ = g_strdup ("seventeen");
+ _tmp21_ = g_strdup ("eighteen");
+ _tmp22_ = g_strdup ("nineteen\n");
+ _tmp23_ = g_strdup ("twenty");
+ _tmp24_ = g_strdup ("twenty one");
+ _tmp25_ = g_strdup ("twenty two");
+ _tmp26_ = g_strdup ("twenty three");
+ _tmp27_ = g_strdup ("twenty four");
+ _tmp28_ = g_strdup ("twenty five");
+ _tmp29_ = g_strdup ("twenty six");
+ _tmp30_ = g_strdup ("twenty seven");
+ _tmp31_ = g_strdup ("twenty eight");
+ _tmp32_ = g_strdup ("twenty nine");
+ _tmp33_ = g_strdup ("thirty");
+ _tmp34_ = g_strdup ("thirty one");
+ _tmp35_ = g_strdup ("thirty two");
+ _tmp36_ = g_strdup ("thirty four");
+ _tmp37_ = g_strdup ("thirty five");
+ _tmp38_ = g_strdup ("thirty six");
+ _tmp39_ = g_strdup ("thirty seven");
+ _tmp40_ = g_strdup ("thirty eight");
+ _tmp41_ = g_strdup ("thirty nine");
+ _tmp42_ = g_strdup ("fourty");
+ _tmp43_ = g_new0 (gchar*, 39 + 1);
+ _tmp43_[0] = _tmp4_;
+ _tmp43_[1] = _tmp5_;
+ _tmp43_[2] = _tmp6_;
+ _tmp43_[3] = _tmp7_;
+ _tmp43_[4] = _tmp8_;
+ _tmp43_[5] = _tmp9_;
+ _tmp43_[6] = _tmp10_;
+ _tmp43_[7] = _tmp11_;
+ _tmp43_[8] = _tmp12_;
+ _tmp43_[9] = _tmp13_;
+ _tmp43_[10] = _tmp14_;
+ _tmp43_[11] = _tmp15_;
+ _tmp43_[12] = _tmp16_;
+ _tmp43_[13] = _tmp17_;
+ _tmp43_[14] = _tmp18_;
+ _tmp43_[15] = _tmp19_;
+ _tmp43_[16] = _tmp20_;
+ _tmp43_[17] = _tmp21_;
+ _tmp43_[18] = _tmp22_;
+ _tmp43_[19] = _tmp23_;
+ _tmp43_[20] = _tmp24_;
+ _tmp43_[21] = _tmp25_;
+ _tmp43_[22] = _tmp26_;
+ _tmp43_[23] = _tmp27_;
+ _tmp43_[24] = _tmp28_;
+ _tmp43_[25] = _tmp29_;
+ _tmp43_[26] = _tmp30_;
+ _tmp43_[27] = _tmp31_;
+ _tmp43_[28] = _tmp32_;
+ _tmp43_[29] = _tmp33_;
+ _tmp43_[30] = _tmp34_;
+ _tmp43_[31] = _tmp35_;
+ _tmp43_[32] = _tmp36_;
+ _tmp43_[33] = _tmp37_;
+ _tmp43_[34] = _tmp38_;
+ _tmp43_[35] = _tmp39_;
+ _tmp43_[36] = _tmp40_;
+ _tmp43_[37] = _tmp41_;
+ _tmp43_[38] = _tmp42_;
+ to_offer = _tmp43_;
+ to_offer_length1 = 39;
+ _to_offer_size_ = to_offer_length1;
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp44_;
+ _tmp44_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp45_;
+ gint _tmp47_;
+ gchar** _tmp48_;
+ gint _tmp48__length1;
+ GeeDeque* _tmp49_;
+ gchar** _tmp50_;
+ gint _tmp50__length1;
+ gint _tmp51_;
+ const gchar* _tmp52_;
+ gboolean _tmp53_ = FALSE;
+ GeeDeque* _tmp54_;
+ gint _tmp55_;
+ gint _tmp56_;
+ gint _tmp57_;
+ _tmp45_ = _tmp44_;
+ if (!_tmp45_) {
+ gint _tmp46_;
+ _tmp46_ = i;
+ i = _tmp46_ + 1;
+ }
+ _tmp44_ = FALSE;
+ _tmp47_ = i;
+ _tmp48_ = to_offer;
+ _tmp48__length1 = to_offer_length1;
+ if (!(_tmp47_ < _tmp48__length1)) {
+ break;
+ }
+ _tmp49_ = test_deque;
+ _tmp50_ = to_offer;
+ _tmp50__length1 = to_offer_length1;
+ _tmp51_ = i;
+ _tmp52_ = _tmp50_[_tmp51_];
+ _tmp53_ = gee_deque_offer_tail (_tmp49_, _tmp52_);
+ _vala_assert (_tmp53_, "test_deque.offer_tail (to_offer[i])");
+ _tmp54_ = test_deque;
+ _tmp55_ = gee_collection_get_size ((GeeCollection*) _tmp54_);
+ _tmp56_ = _tmp55_;
+ _tmp57_ = i;
+ _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
+ }
+ }
+ }
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp58_;
+ _tmp58_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp59_;
+ gint _tmp61_;
+ gchar** _tmp62_;
+ gint _tmp62__length1;
+ GeeDeque* _tmp63_;
+ gpointer _tmp64_ = NULL;
+ gchar* _tmp65_;
+ gchar** _tmp66_;
+ gint _tmp66__length1;
+ gint _tmp67_;
+ const gchar* _tmp68_;
+ GeeDeque* _tmp69_;
+ gpointer _tmp70_ = NULL;
+ gchar* _tmp71_;
+ gchar** _tmp72_;
+ gint _tmp72__length1;
+ gint _tmp73_;
+ const gchar* _tmp74_;
+ GeeDeque* _tmp75_;
+ gint _tmp76_;
+ gint _tmp77_;
+ gchar** _tmp78_;
+ gint _tmp78__length1;
+ gint _tmp79_;
+ _tmp59_ = _tmp58_;
+ if (!_tmp59_) {
+ gint _tmp60_;
+ _tmp60_ = i;
+ i = _tmp60_ + 1;
+ }
+ _tmp58_ = FALSE;
+ _tmp61_ = i;
+ _tmp62_ = to_offer;
+ _tmp62__length1 = to_offer_length1;
+ if (!(_tmp61_ < _tmp62__length1)) {
+ break;
+ }
+ _tmp63_ = test_deque;
+ _tmp64_ = gee_deque_peek_head (_tmp63_);
+ _tmp65_ = (gchar*) _tmp64_;
+ _tmp66_ = to_offer;
+ _tmp66__length1 = to_offer_length1;
+ _tmp67_ = i;
+ _tmp68_ = _tmp66_[_tmp67_];
+ _vala_assert (g_strcmp0 (_tmp65_, _tmp68_) == 0, "test_deque.peek_head () == to_offer[i]");
+ _g_free0 (_tmp65_);
+ _tmp69_ = test_deque;
+ _tmp70_ = gee_deque_poll_head (_tmp69_);
+ _tmp71_ = (gchar*) _tmp70_;
+ _tmp72_ = to_offer;
+ _tmp72__length1 = to_offer_length1;
+ _tmp73_ = i;
+ _tmp74_ = _tmp72_[_tmp73_];
+ _vala_assert (g_strcmp0 (_tmp71_, _tmp74_) == 0, "test_deque.poll_head () == to_offer[i]");
+ _g_free0 (_tmp71_);
+ _tmp75_ = test_deque;
+ _tmp76_ = gee_collection_get_size ((GeeCollection*) _tmp75_);
+ _tmp77_ = _tmp76_;
+ _tmp78_ = to_offer;
+ _tmp78__length1 = to_offer_length1;
+ _tmp79_ = i;
+ _vala_assert (_tmp77_ == ((_tmp78__length1 - _tmp79_) - 1), "test_deque.size == to_offer.length - i - 1");
+ }
+ }
+ }
+ _tmp80_ = test_deque;
+ _tmp81_ = gee_deque_peek_head (_tmp80_);
+ _tmp82_ = (gchar*) _tmp81_;
+ _vala_assert (_tmp82_ == NULL, "test_deque.peek_head () == null");
+ _g_free0 (_tmp82_);
+ _tmp83_ = test_deque;
+ _tmp84_ = gee_deque_poll_head (_tmp83_);
+ _tmp85_ = (gchar*) _tmp84_;
+ _vala_assert (_tmp85_ == NULL, "test_deque.poll_head () == null");
+ _g_free0 (_tmp85_);
+ _tmp86_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp86_);
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp87_;
+ _tmp87_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp88_;
+ gint _tmp90_;
+ gchar** _tmp91_;
+ gint _tmp91__length1;
+ GeeDeque* _tmp92_;
+ gchar** _tmp93_;
+ gint _tmp93__length1;
+ gint _tmp94_;
+ const gchar* _tmp95_;
+ gboolean _tmp96_ = FALSE;
+ _tmp88_ = _tmp87_;
+ if (!_tmp88_) {
+ gint _tmp89_;
+ _tmp89_ = i;
+ i = _tmp89_ + 1;
+ }
+ _tmp87_ = FALSE;
+ _tmp90_ = i;
+ _tmp91_ = to_offer;
+ _tmp91__length1 = to_offer_length1;
+ if (!(_tmp90_ < _tmp91__length1)) {
+ break;
+ }
+ _tmp92_ = test_deque;
+ _tmp93_ = to_offer;
+ _tmp93__length1 = to_offer_length1;
+ _tmp94_ = i;
+ _tmp95_ = _tmp93_[_tmp94_];
+ _tmp96_ = gee_deque_offer_tail (_tmp92_, _tmp95_);
+ _vala_assert (_tmp96_, "test_deque.offer_tail (to_offer[i])");
+ }
+ }
+ }
+ _tmp97_ = test_deque;
+ _tmp98_ = gee_collection_get_size ((GeeCollection*) _tmp97_);
+ _tmp99_ = _tmp98_;
+ _tmp100_ = to_offer;
+ _tmp100__length1 = to_offer_length1;
+ _vala_assert (_tmp99_ == _tmp100__length1, "test_deque.size == to_offer.length");
+ _tmp101_ = test_deque;
+ _tmp102_ = recipient;
+ _tmp103_ = gee_deque_drain_head (_tmp101_, (GeeCollection*) _tmp102_, 1);
+ _vala_assert (_tmp103_ == 1, "test_deque.drain_head (recipient, 1) == 1");
+ _tmp104_ = test_deque;
+ _tmp105_ = gee_collection_get_size ((GeeCollection*) _tmp104_);
+ _tmp106_ = _tmp105_;
+ _tmp107_ = to_offer;
+ _tmp107__length1 = to_offer_length1;
+ _vala_assert (_tmp106_ == (_tmp107__length1 - 1), "test_deque.size == to_offer.length - 1");
+ _tmp108_ = recipient;
+ _tmp109_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp108_);
+ _tmp110_ = _tmp109_;
+ _vala_assert (_tmp110_ == 1, "recipient.size == 1");
+ _tmp111_ = recipient;
+ _tmp112_ = gee_abstract_list_get ((GeeAbstractList*) _tmp111_, 0);
+ _tmp113_ = (gchar*) _tmp112_;
+ _tmp114_ = to_offer;
+ _tmp114__length1 = to_offer_length1;
+ _tmp115_ = _tmp114_[0];
+ _vala_assert (g_strcmp0 (_tmp113_, _tmp115_) == 0, "recipient.get (0) == to_offer[0]");
+ _g_free0 (_tmp113_);
+ _tmp116_ = test_deque;
+ _tmp117_ = recipient;
+ _tmp118_ = gee_deque_drain_head (_tmp116_, (GeeCollection*) _tmp117_, -1);
+ _tmp119_ = to_offer;
+ _tmp119__length1 = to_offer_length1;
+ _vala_assert (_tmp118_ == (_tmp119__length1 - 1), "test_deque.drain_head (recipient) == to_offer.length - 1");
+ _tmp120_ = test_deque;
+ _tmp121_ = gee_collection_get_size ((GeeCollection*) _tmp120_);
+ _tmp122_ = _tmp121_;
+ _vala_assert (_tmp122_ == 0, "test_deque.size == 0");
+ _tmp123_ = recipient;
+ _tmp124_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp123_);
+ _tmp125_ = _tmp124_;
+ _tmp126_ = to_offer;
+ _tmp126__length1 = to_offer_length1;
+ _vala_assert (_tmp125_ == _tmp126__length1, "recipient.size == to_offer.length");
+ {
+ gint i;
+ i = 1;
+ {
+ gboolean _tmp127_;
+ _tmp127_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp128_;
+ gint _tmp130_;
+ gchar** _tmp131_;
+ gint _tmp131__length1;
+ GeeArrayList* _tmp132_;
+ gint _tmp133_;
+ gpointer _tmp134_ = NULL;
+ gchar* _tmp135_;
+ gchar** _tmp136_;
+ gint _tmp136__length1;
+ gint _tmp137_;
+ const gchar* _tmp138_;
+ _tmp128_ = _tmp127_;
+ if (!_tmp128_) {
+ gint _tmp129_;
+ _tmp129_ = i;
+ i = _tmp129_ + 1;
+ }
+ _tmp127_ = FALSE;
+ _tmp130_ = i;
+ _tmp131_ = to_offer;
+ _tmp131__length1 = to_offer_length1;
+ if (!(_tmp130_ < _tmp131__length1)) {
+ break;
+ }
+ _tmp132_ = recipient;
+ _tmp133_ = i;
+ _tmp134_ = gee_abstract_list_get ((GeeAbstractList*) _tmp132_, _tmp133_);
+ _tmp135_ = (gchar*) _tmp134_;
+ _tmp136_ = to_offer;
+ _tmp136__length1 = to_offer_length1;
+ _tmp137_ = i;
+ _tmp138_ = _tmp136_[_tmp137_];
+ _vala_assert (g_strcmp0 (_tmp135_, _tmp138_) == 0, "recipient.get (i) == to_offer[i]");
+ _g_free0 (_tmp135_);
+ }
+ }
+ }
+ _tmp139_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp139_);
+ _tmp140_ = test_deque;
+ _tmp141_ = recipient;
+ _tmp142_ = gee_deque_drain_head (_tmp140_, (GeeCollection*) _tmp141_, 1);
+ _vala_assert (_tmp142_ == 0, "test_deque.drain_head (recipient, 1) == 0");
+ _tmp143_ = test_deque;
+ _tmp144_ = gee_collection_get_size ((GeeCollection*) _tmp143_);
+ _tmp145_ = _tmp144_;
+ _vala_assert (_tmp145_ == 0, "test_deque.size == 0");
+ _tmp146_ = recipient;
+ _tmp147_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp146_);
+ _tmp148_ = _tmp147_;
+ _vala_assert (_tmp148_ == 0, "recipient.size == 0");
+ _tmp149_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp149_);
+ _tmp150_ = test_deque;
+ _tmp151_ = recipient;
+ _tmp152_ = gee_deque_drain_head (_tmp150_, (GeeCollection*) _tmp151_, -1);
+ _vala_assert (_tmp152_ == 0, "test_deque.drain_head (recipient) == 0");
+ _tmp153_ = test_deque;
+ _tmp154_ = gee_collection_get_size ((GeeCollection*) _tmp153_);
+ _tmp155_ = _tmp154_;
+ _vala_assert (_tmp155_ == 0, "test_deque.size == 0");
+ _tmp156_ = recipient;
+ _tmp157_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp156_);
+ _tmp158_ = _tmp157_;
+ _vala_assert (_tmp158_ == 0, "recipient.size == 0");
+ to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
_g_object_unref0 (recipient);
_g_object_unref0 (test_deque);
}
@@ -403,221 +677,497 @@ void deque_tests_test_stack_use (DequeTests* self) {
GeeDeque* test_deque;
GeeArrayList* _tmp2_;
GeeArrayList* recipient;
- gboolean _tmp3_ = FALSE;
- gint _tmp4_;
- gint _tmp5_;
- gboolean _tmp6_ = FALSE;
- gint _tmp7_;
- gint _tmp8_;
- gboolean _tmp9_ = FALSE;
- gint _tmp10_;
- gint _tmp11_;
- gboolean _tmp12_ = FALSE;
- gint _tmp13_;
- gint _tmp14_;
- gpointer _tmp15_ = NULL;
+ gchar* _tmp3_;
+ gchar* _tmp4_;
+ gchar* _tmp5_;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
+ gchar* _tmp8_;
+ gchar* _tmp9_;
+ gchar* _tmp10_;
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar* _tmp14_;
+ gchar* _tmp15_;
gchar* _tmp16_;
- gpointer _tmp17_ = NULL;
+ gchar* _tmp17_;
gchar* _tmp18_;
- gint _tmp19_;
- gint _tmp20_;
- gpointer _tmp21_ = NULL;
+ gchar* _tmp19_;
+ gchar* _tmp20_;
+ gchar* _tmp21_;
gchar* _tmp22_;
- gpointer _tmp23_ = NULL;
+ gchar* _tmp23_;
gchar* _tmp24_;
- gint _tmp25_;
- gint _tmp26_;
- gpointer _tmp27_ = NULL;
+ gchar* _tmp25_;
+ gchar* _tmp26_;
+ gchar* _tmp27_;
gchar* _tmp28_;
- gpointer _tmp29_ = NULL;
+ gchar* _tmp29_;
gchar* _tmp30_;
- gint _tmp31_;
- gint _tmp32_;
- gpointer _tmp33_ = NULL;
+ gchar* _tmp31_;
+ gchar* _tmp32_;
+ gchar* _tmp33_;
gchar* _tmp34_;
- gpointer _tmp35_ = NULL;
+ gchar* _tmp35_;
gchar* _tmp36_;
- gint _tmp37_;
- gint _tmp38_;
- gpointer _tmp39_ = NULL;
+ gchar* _tmp37_;
+ gchar* _tmp38_;
+ gchar* _tmp39_;
gchar* _tmp40_;
- gpointer _tmp41_ = NULL;
- gchar* _tmp42_;
- gboolean _tmp43_ = FALSE;
- gboolean _tmp44_ = FALSE;
- gboolean _tmp45_ = FALSE;
- gboolean _tmp46_ = FALSE;
- gint _tmp47_;
- gint _tmp48_;
- gint _tmp49_ = 0;
- gint _tmp50_;
- gint _tmp51_;
- gint _tmp52_;
- gint _tmp53_;
- gpointer _tmp54_ = NULL;
- gchar* _tmp55_;
- gint _tmp56_ = 0;
- gint _tmp57_;
- gint _tmp58_;
- gint _tmp59_;
- gint _tmp60_;
- gpointer _tmp61_ = NULL;
- gchar* _tmp62_;
- gpointer _tmp63_ = NULL;
- gchar* _tmp64_;
- gpointer _tmp65_ = NULL;
- gchar* _tmp66_;
- gint _tmp67_ = 0;
- gint _tmp68_;
- gint _tmp69_;
- gint _tmp70_;
- gint _tmp71_;
- gint _tmp72_ = 0;
- gint _tmp73_;
- gint _tmp74_;
- gint _tmp75_;
- gint _tmp76_;
+ gchar* _tmp41_;
+ gchar** _tmp42_ = NULL;
+ gchar** to_offer;
+ gint to_offer_length1;
+ gint _to_offer_size_;
+ GeeDeque* _tmp43_;
+ GeeDeque* _tmp79_;
+ gpointer _tmp80_ = NULL;
+ gchar* _tmp81_;
+ GeeDeque* _tmp82_;
+ gpointer _tmp83_ = NULL;
+ gchar* _tmp84_;
+ GeeArrayList* _tmp85_;
+ GeeDeque* _tmp96_;
+ gint _tmp97_;
+ gint _tmp98_;
+ gchar** _tmp99_;
+ gint _tmp99__length1;
+ GeeDeque* _tmp100_;
+ GeeArrayList* _tmp101_;
+ gint _tmp102_ = 0;
+ GeeDeque* _tmp103_;
+ gint _tmp104_;
+ gint _tmp105_;
+ gchar** _tmp106_;
+ gint _tmp106__length1;
+ GeeArrayList* _tmp107_;
+ gint _tmp108_;
+ gint _tmp109_;
+ GeeArrayList* _tmp110_;
+ gpointer _tmp111_ = NULL;
+ gchar* _tmp112_;
+ gchar** _tmp113_;
+ gint _tmp113__length1;
+ gchar** _tmp114_;
+ gint _tmp114__length1;
+ const gchar* _tmp115_;
+ GeeDeque* _tmp116_;
+ GeeArrayList* _tmp117_;
+ gint _tmp118_ = 0;
+ gchar** _tmp119_;
+ gint _tmp119__length1;
+ GeeDeque* _tmp120_;
+ gint _tmp121_;
+ gint _tmp122_;
+ GeeArrayList* _tmp123_;
+ gint _tmp124_;
+ gint _tmp125_;
+ gchar** _tmp126_;
+ gint _tmp126__length1;
+ GeeArrayList* _tmp140_;
+ GeeDeque* _tmp141_;
+ GeeArrayList* _tmp142_;
+ gint _tmp143_ = 0;
+ GeeDeque* _tmp144_;
+ gint _tmp145_;
+ gint _tmp146_;
+ GeeArrayList* _tmp147_;
+ gint _tmp148_;
+ gint _tmp149_;
+ GeeArrayList* _tmp150_;
+ GeeDeque* _tmp151_;
+ GeeArrayList* _tmp152_;
+ gint _tmp153_ = 0;
+ GeeDeque* _tmp154_;
+ gint _tmp155_;
+ gint _tmp156_;
+ GeeArrayList* _tmp157_;
+ gint _tmp158_;
+ gint _tmp159_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
test_deque = _tmp1_;
- _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
recipient = _tmp2_;
- _vala_assert (test_deque != NULL, "test_deque != null");
- _tmp3_ = gee_deque_offer_head (test_deque, "one");
- _vala_assert (_tmp3_, "test_deque.offer_head (\"one\")");
- _tmp4_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp5_ = _tmp4_;
- _vala_assert (_tmp5_ == 1, "test_deque.size == 1");
- _tmp6_ = gee_deque_offer_head (test_deque, "two");
- _vala_assert (_tmp6_, "test_deque.offer_head (\"two\")");
- _tmp7_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp8_ = _tmp7_;
- _vala_assert (_tmp8_ == 2, "test_deque.size == 2");
- _tmp9_ = gee_deque_offer_head (test_deque, "three");
- _vala_assert (_tmp9_, "test_deque.offer_head (\"three\")");
- _tmp10_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp11_ = _tmp10_;
- _vala_assert (_tmp11_ == 3, "test_deque.size == 3");
- _tmp12_ = gee_deque_offer_head (test_deque, "four");
- _vala_assert (_tmp12_, "test_deque.offer_head (\"four\")");
- _tmp13_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp14_ = _tmp13_;
- _vala_assert (_tmp14_ == 4, "test_deque.size == 4");
- _tmp15_ = gee_deque_peek_head (test_deque);
- _tmp16_ = (gchar*) _tmp15_;
- _vala_assert (g_strcmp0 (_tmp16_, "four") == 0, "test_deque.peek_head () == \"four\"");
- _g_free0 (_tmp16_);
- _tmp17_ = gee_deque_poll_head (test_deque);
- _tmp18_ = (gchar*) _tmp17_;
- _vala_assert (g_strcmp0 (_tmp18_, "four") == 0, "test_deque.poll_head () == \"four\"");
- _g_free0 (_tmp18_);
- _tmp19_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp20_ = _tmp19_;
- _vala_assert (_tmp20_ == 3, "test_deque.size == 3");
- _tmp21_ = gee_deque_peek_head (test_deque);
- _tmp22_ = (gchar*) _tmp21_;
- _vala_assert (g_strcmp0 (_tmp22_, "three") == 0, "test_deque.peek_head () == \"three\"");
- _g_free0 (_tmp22_);
- _tmp23_ = gee_deque_poll_head (test_deque);
- _tmp24_ = (gchar*) _tmp23_;
- _vala_assert (g_strcmp0 (_tmp24_, "three") == 0, "test_deque.poll_head () == \"three\"");
- _g_free0 (_tmp24_);
- _tmp25_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp26_ = _tmp25_;
- _vala_assert (_tmp26_ == 2, "test_deque.size == 2");
- _tmp27_ = gee_deque_peek_head (test_deque);
- _tmp28_ = (gchar*) _tmp27_;
- _vala_assert (g_strcmp0 (_tmp28_, "two") == 0, "test_deque.peek_head () == \"two\"");
- _g_free0 (_tmp28_);
- _tmp29_ = gee_deque_poll_head (test_deque);
- _tmp30_ = (gchar*) _tmp29_;
- _vala_assert (g_strcmp0 (_tmp30_, "two") == 0, "test_deque.poll_head () == \"two\"");
- _g_free0 (_tmp30_);
- _tmp31_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp32_ = _tmp31_;
- _vala_assert (_tmp32_ == 1, "test_deque.size == 1");
- _tmp33_ = gee_deque_peek_head (test_deque);
- _tmp34_ = (gchar*) _tmp33_;
- _vala_assert (g_strcmp0 (_tmp34_, "one") == 0, "test_deque.peek_head () == \"one\"");
- _g_free0 (_tmp34_);
- _tmp35_ = gee_deque_poll_head (test_deque);
- _tmp36_ = (gchar*) _tmp35_;
- _vala_assert (g_strcmp0 (_tmp36_, "one") == 0, "test_deque.poll_head () == \"one\"");
- _g_free0 (_tmp36_);
- _tmp37_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp38_ = _tmp37_;
- _vala_assert (_tmp38_ == 0, "test_deque.size == 0");
- _tmp39_ = gee_deque_peek_head (test_deque);
- _tmp40_ = (gchar*) _tmp39_;
- _vala_assert (_tmp40_ == NULL, "test_deque.peek_head () == null");
- _g_free0 (_tmp40_);
- _tmp41_ = gee_deque_poll_head (test_deque);
- _tmp42_ = (gchar*) _tmp41_;
- _vala_assert (_tmp42_ == NULL, "test_deque.poll_head () == null");
- _g_free0 (_tmp42_);
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp43_ = gee_deque_offer_head (test_deque, "one");
- _vala_assert (_tmp43_, "test_deque.offer_head (\"one\")");
- _tmp44_ = gee_deque_offer_head (test_deque, "two");
- _vala_assert (_tmp44_, "test_deque.offer_head (\"two\")");
- _tmp45_ = gee_deque_offer_head (test_deque, "three");
- _vala_assert (_tmp45_, "test_deque.offer_head (\"three\")");
- _tmp46_ = gee_deque_offer_head (test_deque, "four");
- _vala_assert (_tmp46_, "test_deque.offer_head (\"four\")");
- _tmp47_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp48_ = _tmp47_;
- _vala_assert (_tmp48_ == 4, "test_deque.size == 4");
- _tmp49_ = gee_deque_drain_head (test_deque, (GeeCollection*) recipient, 1);
- _vala_assert (_tmp49_ == 1, "test_deque.drain_head (recipient, 1) == 1");
- _tmp50_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp51_ = _tmp50_;
- _vala_assert (_tmp51_ == 3, "test_deque.size == 3");
- _tmp52_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp53_ = _tmp52_;
- _vala_assert (_tmp53_ == 1, "recipient.size == 1");
- _tmp54_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 0);
- _tmp55_ = (gchar*) _tmp54_;
- _vala_assert (g_strcmp0 (_tmp55_, "four") == 0, "recipient.get (0) == \"four\"");
- _g_free0 (_tmp55_);
- _tmp56_ = gee_deque_drain_head (test_deque, (GeeCollection*) recipient, -1);
- _vala_assert (_tmp56_ == 3, "test_deque.drain_head (recipient) == 3");
- _tmp57_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp58_ = _tmp57_;
- _vala_assert (_tmp58_ == 0, "test_deque.size == 0");
- _tmp59_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp60_ = _tmp59_;
- _vala_assert (_tmp60_ == 4, "recipient.size == 4");
- _tmp61_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 1);
- _tmp62_ = (gchar*) _tmp61_;
- _vala_assert (g_strcmp0 (_tmp62_, "three") == 0, "recipient.get (1) == \"three\"");
- _g_free0 (_tmp62_);
- _tmp63_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 2);
- _tmp64_ = (gchar*) _tmp63_;
- _vala_assert (g_strcmp0 (_tmp64_, "two") == 0, "recipient.get (2) == \"two\"");
- _g_free0 (_tmp64_);
- _tmp65_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 3);
- _tmp66_ = (gchar*) _tmp65_;
- _vala_assert (g_strcmp0 (_tmp66_, "one") == 0, "recipient.get (3) == \"one\"");
- _g_free0 (_tmp66_);
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp67_ = gee_deque_drain_head (test_deque, (GeeCollection*) recipient, 1);
- _vala_assert (_tmp67_ == 0, "test_deque.drain_head (recipient, 1) == 0");
- _tmp68_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp69_ = _tmp68_;
- _vala_assert (_tmp69_ == 0, "test_deque.size == 0");
- _tmp70_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp71_ = _tmp70_;
- _vala_assert (_tmp71_ == 0, "recipient.size == 0");
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp72_ = gee_deque_drain_head (test_deque, (GeeCollection*) recipient, -1);
- _vala_assert (_tmp72_ == 0, "test_deque.drain_head (recipient) == 0");
- _tmp73_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp74_ = _tmp73_;
- _vala_assert (_tmp74_ == 0, "test_deque.size == 0");
- _tmp75_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp76_ = _tmp75_;
- _vala_assert (_tmp76_ == 0, "recipient.size == 0");
+ _tmp3_ = g_strdup ("one");
+ _tmp4_ = g_strdup ("two");
+ _tmp5_ = g_strdup ("three");
+ _tmp6_ = g_strdup ("four");
+ _tmp7_ = g_strdup ("five");
+ _tmp8_ = g_strdup ("six");
+ _tmp9_ = g_strdup ("seven");
+ _tmp10_ = g_strdup ("\neight");
+ _tmp11_ = g_strdup ("nine");
+ _tmp12_ = g_strdup ("ten");
+ _tmp13_ = g_strdup ("eleven");
+ _tmp14_ = g_strdup ("twelve");
+ _tmp15_ = g_strdup ("thirteen");
+ _tmp16_ = g_strdup ("fourteen\n");
+ _tmp17_ = g_strdup ("fifteen");
+ _tmp18_ = g_strdup ("sixteen");
+ _tmp19_ = g_strdup ("seventeen");
+ _tmp20_ = g_strdup ("eighteen");
+ _tmp21_ = g_strdup ("nineteen\n");
+ _tmp22_ = g_strdup ("twenty");
+ _tmp23_ = g_strdup ("twenty one");
+ _tmp24_ = g_strdup ("twenty two");
+ _tmp25_ = g_strdup ("twenty three");
+ _tmp26_ = g_strdup ("twenty four");
+ _tmp27_ = g_strdup ("twenty five");
+ _tmp28_ = g_strdup ("twenty six");
+ _tmp29_ = g_strdup ("twenty seven");
+ _tmp30_ = g_strdup ("twenty eight");
+ _tmp31_ = g_strdup ("twenty nine");
+ _tmp32_ = g_strdup ("thirty");
+ _tmp33_ = g_strdup ("thirty one");
+ _tmp34_ = g_strdup ("thirty two");
+ _tmp35_ = g_strdup ("thirty four");
+ _tmp36_ = g_strdup ("thirty five");
+ _tmp37_ = g_strdup ("thirty six");
+ _tmp38_ = g_strdup ("thirty seven");
+ _tmp39_ = g_strdup ("thirty eight");
+ _tmp40_ = g_strdup ("thirty nine");
+ _tmp41_ = g_strdup ("fourty");
+ _tmp42_ = g_new0 (gchar*, 39 + 1);
+ _tmp42_[0] = _tmp3_;
+ _tmp42_[1] = _tmp4_;
+ _tmp42_[2] = _tmp5_;
+ _tmp42_[3] = _tmp6_;
+ _tmp42_[4] = _tmp7_;
+ _tmp42_[5] = _tmp8_;
+ _tmp42_[6] = _tmp9_;
+ _tmp42_[7] = _tmp10_;
+ _tmp42_[8] = _tmp11_;
+ _tmp42_[9] = _tmp12_;
+ _tmp42_[10] = _tmp13_;
+ _tmp42_[11] = _tmp14_;
+ _tmp42_[12] = _tmp15_;
+ _tmp42_[13] = _tmp16_;
+ _tmp42_[14] = _tmp17_;
+ _tmp42_[15] = _tmp18_;
+ _tmp42_[16] = _tmp19_;
+ _tmp42_[17] = _tmp20_;
+ _tmp42_[18] = _tmp21_;
+ _tmp42_[19] = _tmp22_;
+ _tmp42_[20] = _tmp23_;
+ _tmp42_[21] = _tmp24_;
+ _tmp42_[22] = _tmp25_;
+ _tmp42_[23] = _tmp26_;
+ _tmp42_[24] = _tmp27_;
+ _tmp42_[25] = _tmp28_;
+ _tmp42_[26] = _tmp29_;
+ _tmp42_[27] = _tmp30_;
+ _tmp42_[28] = _tmp31_;
+ _tmp42_[29] = _tmp32_;
+ _tmp42_[30] = _tmp33_;
+ _tmp42_[31] = _tmp34_;
+ _tmp42_[32] = _tmp35_;
+ _tmp42_[33] = _tmp36_;
+ _tmp42_[34] = _tmp37_;
+ _tmp42_[35] = _tmp38_;
+ _tmp42_[36] = _tmp39_;
+ _tmp42_[37] = _tmp40_;
+ _tmp42_[38] = _tmp41_;
+ to_offer = _tmp42_;
+ to_offer_length1 = 39;
+ _to_offer_size_ = to_offer_length1;
+ _tmp43_ = test_deque;
+ _vala_assert (_tmp43_ != NULL, "test_deque != null");
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp44_;
+ _tmp44_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp45_;
+ gint _tmp47_;
+ gchar** _tmp48_;
+ gint _tmp48__length1;
+ GeeDeque* _tmp49_;
+ gchar** _tmp50_;
+ gint _tmp50__length1;
+ gint _tmp51_;
+ const gchar* _tmp52_;
+ gboolean _tmp53_ = FALSE;
+ GeeDeque* _tmp54_;
+ gint _tmp55_;
+ gint _tmp56_;
+ gint _tmp57_;
+ _tmp45_ = _tmp44_;
+ if (!_tmp45_) {
+ gint _tmp46_;
+ _tmp46_ = i;
+ i = _tmp46_ + 1;
+ }
+ _tmp44_ = FALSE;
+ _tmp47_ = i;
+ _tmp48_ = to_offer;
+ _tmp48__length1 = to_offer_length1;
+ if (!(_tmp47_ < _tmp48__length1)) {
+ break;
+ }
+ _tmp49_ = test_deque;
+ _tmp50_ = to_offer;
+ _tmp50__length1 = to_offer_length1;
+ _tmp51_ = i;
+ _tmp52_ = _tmp50_[_tmp51_];
+ _tmp53_ = gee_deque_offer_head (_tmp49_, _tmp52_);
+ _vala_assert (_tmp53_, "test_deque.offer_head (to_offer[i])");
+ _tmp54_ = test_deque;
+ _tmp55_ = gee_collection_get_size ((GeeCollection*) _tmp54_);
+ _tmp56_ = _tmp55_;
+ _tmp57_ = i;
+ _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
+ }
+ }
+ }
+ {
+ gchar** _tmp58_;
+ gint _tmp58__length1;
+ gint i;
+ _tmp58_ = to_offer;
+ _tmp58__length1 = to_offer_length1;
+ i = _tmp58__length1 - 1;
+ {
+ gboolean _tmp59_;
+ _tmp59_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp60_;
+ gint _tmp62_;
+ GeeDeque* _tmp63_;
+ gpointer _tmp64_ = NULL;
+ gchar* _tmp65_;
+ gchar** _tmp66_;
+ gint _tmp66__length1;
+ gint _tmp67_;
+ const gchar* _tmp68_;
+ GeeDeque* _tmp69_;
+ gpointer _tmp70_ = NULL;
+ gchar* _tmp71_;
+ gchar** _tmp72_;
+ gint _tmp72__length1;
+ gint _tmp73_;
+ const gchar* _tmp74_;
+ GeeDeque* _tmp75_;
+ gint _tmp76_;
+ gint _tmp77_;
+ gint _tmp78_;
+ _tmp60_ = _tmp59_;
+ if (!_tmp60_) {
+ gint _tmp61_;
+ _tmp61_ = i;
+ i = _tmp61_ - 1;
+ }
+ _tmp59_ = FALSE;
+ _tmp62_ = i;
+ if (!(_tmp62_ >= 0)) {
+ break;
+ }
+ _tmp63_ = test_deque;
+ _tmp64_ = gee_deque_peek_head (_tmp63_);
+ _tmp65_ = (gchar*) _tmp64_;
+ _tmp66_ = to_offer;
+ _tmp66__length1 = to_offer_length1;
+ _tmp67_ = i;
+ _tmp68_ = _tmp66_[_tmp67_];
+ _vala_assert (g_strcmp0 (_tmp65_, _tmp68_) == 0, "test_deque.peek_head () == to_offer[i]");
+ _g_free0 (_tmp65_);
+ _tmp69_ = test_deque;
+ _tmp70_ = gee_deque_poll_head (_tmp69_);
+ _tmp71_ = (gchar*) _tmp70_;
+ _tmp72_ = to_offer;
+ _tmp72__length1 = to_offer_length1;
+ _tmp73_ = i;
+ _tmp74_ = _tmp72_[_tmp73_];
+ _vala_assert (g_strcmp0 (_tmp71_, _tmp74_) == 0, "test_deque.poll_head () == to_offer[i]");
+ _g_free0 (_tmp71_);
+ _tmp75_ = test_deque;
+ _tmp76_ = gee_collection_get_size ((GeeCollection*) _tmp75_);
+ _tmp77_ = _tmp76_;
+ _tmp78_ = i;
+ _vala_assert (_tmp77_ == _tmp78_, "test_deque.size == i");
+ }
+ }
+ }
+ _tmp79_ = test_deque;
+ _tmp80_ = gee_deque_peek_head (_tmp79_);
+ _tmp81_ = (gchar*) _tmp80_;
+ _vala_assert (_tmp81_ == NULL, "test_deque.peek_head () == null");
+ _g_free0 (_tmp81_);
+ _tmp82_ = test_deque;
+ _tmp83_ = gee_deque_poll_head (_tmp82_);
+ _tmp84_ = (gchar*) _tmp83_;
+ _vala_assert (_tmp84_ == NULL, "test_deque.poll_head () == null");
+ _g_free0 (_tmp84_);
+ _tmp85_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp85_);
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp86_;
+ _tmp86_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp87_;
+ gint _tmp89_;
+ gchar** _tmp90_;
+ gint _tmp90__length1;
+ GeeDeque* _tmp91_;
+ gchar** _tmp92_;
+ gint _tmp92__length1;
+ gint _tmp93_;
+ const gchar* _tmp94_;
+ gboolean _tmp95_ = FALSE;
+ _tmp87_ = _tmp86_;
+ if (!_tmp87_) {
+ gint _tmp88_;
+ _tmp88_ = i;
+ i = _tmp88_ + 1;
+ }
+ _tmp86_ = FALSE;
+ _tmp89_ = i;
+ _tmp90_ = to_offer;
+ _tmp90__length1 = to_offer_length1;
+ if (!(_tmp89_ < _tmp90__length1)) {
+ break;
+ }
+ _tmp91_ = test_deque;
+ _tmp92_ = to_offer;
+ _tmp92__length1 = to_offer_length1;
+ _tmp93_ = i;
+ _tmp94_ = _tmp92_[_tmp93_];
+ _tmp95_ = gee_deque_offer_head (_tmp91_, _tmp94_);
+ _vala_assert (_tmp95_, "test_deque.offer_head (to_offer[i])");
+ }
+ }
+ }
+ _tmp96_ = test_deque;
+ _tmp97_ = gee_collection_get_size ((GeeCollection*) _tmp96_);
+ _tmp98_ = _tmp97_;
+ _tmp99_ = to_offer;
+ _tmp99__length1 = to_offer_length1;
+ _vala_assert (_tmp98_ == _tmp99__length1, "test_deque.size == to_offer.length");
+ _tmp100_ = test_deque;
+ _tmp101_ = recipient;
+ _tmp102_ = gee_deque_drain_head (_tmp100_, (GeeCollection*) _tmp101_, 1);
+ _vala_assert (_tmp102_ == 1, "test_deque.drain_head (recipient, 1) == 1");
+ _tmp103_ = test_deque;
+ _tmp104_ = gee_collection_get_size ((GeeCollection*) _tmp103_);
+ _tmp105_ = _tmp104_;
+ _tmp106_ = to_offer;
+ _tmp106__length1 = to_offer_length1;
+ _vala_assert (_tmp105_ == (_tmp106__length1 - 1), "test_deque.size == to_offer.length - 1");
+ _tmp107_ = recipient;
+ _tmp108_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp107_);
+ _tmp109_ = _tmp108_;
+ _vala_assert (_tmp109_ == 1, "recipient.size == 1");
+ _tmp110_ = recipient;
+ _tmp111_ = gee_abstract_list_get ((GeeAbstractList*) _tmp110_, 0);
+ _tmp112_ = (gchar*) _tmp111_;
+ _tmp113_ = to_offer;
+ _tmp113__length1 = to_offer_length1;
+ _tmp114_ = to_offer;
+ _tmp114__length1 = to_offer_length1;
+ _tmp115_ = _tmp113_[_tmp114__length1 - 1];
+ _vala_assert (g_strcmp0 (_tmp112_, _tmp115_) == 0, "recipient.get (0) == to_offer[to_offer.length - 1]");
+ _g_free0 (_tmp112_);
+ _tmp116_ = test_deque;
+ _tmp117_ = recipient;
+ _tmp118_ = gee_deque_drain_head (_tmp116_, (GeeCollection*) _tmp117_, -1);
+ _tmp119_ = to_offer;
+ _tmp119__length1 = to_offer_length1;
+ _vala_assert (_tmp118_ == (_tmp119__length1 - 1), "test_deque.drain_head (recipient) == to_offer.length - 1");
+ _tmp120_ = test_deque;
+ _tmp121_ = gee_collection_get_size ((GeeCollection*) _tmp120_);
+ _tmp122_ = _tmp121_;
+ _vala_assert (_tmp122_ == 0, "test_deque.size == 0");
+ _tmp123_ = recipient;
+ _tmp124_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp123_);
+ _tmp125_ = _tmp124_;
+ _tmp126_ = to_offer;
+ _tmp126__length1 = to_offer_length1;
+ _vala_assert (_tmp125_ == _tmp126__length1, "recipient.size == to_offer.length");
+ {
+ gint i;
+ i = 1;
+ {
+ gboolean _tmp127_;
+ _tmp127_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp128_;
+ gint _tmp130_;
+ gchar** _tmp131_;
+ gint _tmp131__length1;
+ GeeArrayList* _tmp132_;
+ gint _tmp133_;
+ gpointer _tmp134_ = NULL;
+ gchar* _tmp135_;
+ gchar** _tmp136_;
+ gint _tmp136__length1;
+ gchar** _tmp137_;
+ gint _tmp137__length1;
+ gint _tmp138_;
+ const gchar* _tmp139_;
+ _tmp128_ = _tmp127_;
+ if (!_tmp128_) {
+ gint _tmp129_;
+ _tmp129_ = i;
+ i = _tmp129_ + 1;
+ }
+ _tmp127_ = FALSE;
+ _tmp130_ = i;
+ _tmp131_ = to_offer;
+ _tmp131__length1 = to_offer_length1;
+ if (!(_tmp130_ < _tmp131__length1)) {
+ break;
+ }
+ _tmp132_ = recipient;
+ _tmp133_ = i;
+ _tmp134_ = gee_abstract_list_get ((GeeAbstractList*) _tmp132_, _tmp133_);
+ _tmp135_ = (gchar*) _tmp134_;
+ _tmp136_ = to_offer;
+ _tmp136__length1 = to_offer_length1;
+ _tmp137_ = to_offer;
+ _tmp137__length1 = to_offer_length1;
+ _tmp138_ = i;
+ _tmp139_ = _tmp136_[(_tmp137__length1 - _tmp138_) - 1];
+ _vala_assert (g_strcmp0 (_tmp135_, _tmp139_) == 0, "recipient.get (i) == to_offer[to_offer.length - i - 1]");
+ _g_free0 (_tmp135_);
+ }
+ }
+ }
+ _tmp140_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp140_);
+ _tmp141_ = test_deque;
+ _tmp142_ = recipient;
+ _tmp143_ = gee_deque_drain_head (_tmp141_, (GeeCollection*) _tmp142_, 1);
+ _vala_assert (_tmp143_ == 0, "test_deque.drain_head (recipient, 1) == 0");
+ _tmp144_ = test_deque;
+ _tmp145_ = gee_collection_get_size ((GeeCollection*) _tmp144_);
+ _tmp146_ = _tmp145_;
+ _vala_assert (_tmp146_ == 0, "test_deque.size == 0");
+ _tmp147_ = recipient;
+ _tmp148_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp147_);
+ _tmp149_ = _tmp148_;
+ _vala_assert (_tmp149_ == 0, "recipient.size == 0");
+ _tmp150_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp150_);
+ _tmp151_ = test_deque;
+ _tmp152_ = recipient;
+ _tmp153_ = gee_deque_drain_head (_tmp151_, (GeeCollection*) _tmp152_, -1);
+ _vala_assert (_tmp153_ == 0, "test_deque.drain_head (recipient) == 0");
+ _tmp154_ = test_deque;
+ _tmp155_ = gee_collection_get_size ((GeeCollection*) _tmp154_);
+ _tmp156_ = _tmp155_;
+ _vala_assert (_tmp156_ == 0, "test_deque.size == 0");
+ _tmp157_ = recipient;
+ _tmp158_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp157_);
+ _tmp159_ = _tmp158_;
+ _vala_assert (_tmp159_ == 0, "recipient.size == 0");
+ to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
_g_object_unref0 (recipient);
_g_object_unref0 (test_deque);
}
@@ -629,221 +1179,509 @@ void deque_tests_test_reversed_stack_use (DequeTests* self) {
GeeDeque* test_deque;
GeeArrayList* _tmp2_;
GeeArrayList* recipient;
- gboolean _tmp3_ = FALSE;
- gint _tmp4_;
- gint _tmp5_;
- gboolean _tmp6_ = FALSE;
- gint _tmp7_;
- gint _tmp8_;
- gboolean _tmp9_ = FALSE;
- gint _tmp10_;
- gint _tmp11_;
- gboolean _tmp12_ = FALSE;
- gint _tmp13_;
- gint _tmp14_;
- gpointer _tmp15_ = NULL;
+ gchar* _tmp3_;
+ gchar* _tmp4_;
+ gchar* _tmp5_;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
+ gchar* _tmp8_;
+ gchar* _tmp9_;
+ gchar* _tmp10_;
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar* _tmp14_;
+ gchar* _tmp15_;
gchar* _tmp16_;
- gpointer _tmp17_ = NULL;
+ gchar* _tmp17_;
gchar* _tmp18_;
- gint _tmp19_;
- gint _tmp20_;
- gpointer _tmp21_ = NULL;
+ gchar* _tmp19_;
+ gchar* _tmp20_;
+ gchar* _tmp21_;
gchar* _tmp22_;
- gpointer _tmp23_ = NULL;
+ gchar* _tmp23_;
gchar* _tmp24_;
- gint _tmp25_;
- gint _tmp26_;
- gpointer _tmp27_ = NULL;
+ gchar* _tmp25_;
+ gchar* _tmp26_;
+ gchar* _tmp27_;
gchar* _tmp28_;
- gpointer _tmp29_ = NULL;
+ gchar* _tmp29_;
gchar* _tmp30_;
- gint _tmp31_;
- gint _tmp32_;
- gpointer _tmp33_ = NULL;
+ gchar* _tmp31_;
+ gchar* _tmp32_;
+ gchar* _tmp33_;
gchar* _tmp34_;
- gpointer _tmp35_ = NULL;
+ gchar* _tmp35_;
gchar* _tmp36_;
- gint _tmp37_;
- gint _tmp38_;
- gpointer _tmp39_ = NULL;
+ gchar* _tmp37_;
+ gchar* _tmp38_;
+ gchar* _tmp39_;
gchar* _tmp40_;
- gpointer _tmp41_ = NULL;
- gchar* _tmp42_;
- gboolean _tmp43_ = FALSE;
- gboolean _tmp44_ = FALSE;
- gboolean _tmp45_ = FALSE;
- gboolean _tmp46_ = FALSE;
- gint _tmp47_;
- gint _tmp48_;
- gint _tmp49_ = 0;
- gint _tmp50_;
- gint _tmp51_;
- gint _tmp52_;
- gint _tmp53_;
- gpointer _tmp54_ = NULL;
- gchar* _tmp55_;
- gint _tmp56_ = 0;
- gint _tmp57_;
- gint _tmp58_;
- gint _tmp59_;
- gint _tmp60_;
- gpointer _tmp61_ = NULL;
- gchar* _tmp62_;
- gpointer _tmp63_ = NULL;
- gchar* _tmp64_;
- gpointer _tmp65_ = NULL;
- gchar* _tmp66_;
- gint _tmp67_ = 0;
- gint _tmp68_;
- gint _tmp69_;
- gint _tmp70_;
- gint _tmp71_;
- gint _tmp72_ = 0;
- gint _tmp73_;
- gint _tmp74_;
- gint _tmp75_;
- gint _tmp76_;
+ gchar* _tmp41_;
+ gchar** _tmp42_ = NULL;
+ gchar** to_offer;
+ gint to_offer_length1;
+ gint _to_offer_size_;
+ GeeDeque* _tmp43_;
+ GeeDeque* _tmp82_;
+ gpointer _tmp83_ = NULL;
+ gchar* _tmp84_;
+ GeeDeque* _tmp85_;
+ gpointer _tmp86_ = NULL;
+ gchar* _tmp87_;
+ GeeArrayList* _tmp88_;
+ GeeDeque* _tmp99_;
+ gint _tmp100_;
+ gint _tmp101_;
+ gchar** _tmp102_;
+ gint _tmp102__length1;
+ GeeDeque* _tmp103_;
+ GeeArrayList* _tmp104_;
+ gint _tmp105_ = 0;
+ GeeDeque* _tmp106_;
+ gint _tmp107_;
+ gint _tmp108_;
+ gchar** _tmp109_;
+ gint _tmp109__length1;
+ GeeArrayList* _tmp110_;
+ gint _tmp111_;
+ gint _tmp112_;
+ GeeArrayList* _tmp113_;
+ gpointer _tmp114_ = NULL;
+ gchar* _tmp115_;
+ gchar** _tmp116_;
+ gint _tmp116__length1;
+ gchar** _tmp117_;
+ gint _tmp117__length1;
+ const gchar* _tmp118_;
+ GeeDeque* _tmp119_;
+ GeeArrayList* _tmp120_;
+ gint _tmp121_ = 0;
+ gchar** _tmp122_;
+ gint _tmp122__length1;
+ GeeDeque* _tmp123_;
+ gint _tmp124_;
+ gint _tmp125_;
+ GeeArrayList* _tmp126_;
+ gint _tmp127_;
+ gint _tmp128_;
+ gchar** _tmp129_;
+ gint _tmp129__length1;
+ GeeArrayList* _tmp143_;
+ GeeDeque* _tmp144_;
+ GeeArrayList* _tmp145_;
+ gint _tmp146_ = 0;
+ GeeDeque* _tmp147_;
+ gint _tmp148_;
+ gint _tmp149_;
+ GeeArrayList* _tmp150_;
+ gint _tmp151_;
+ gint _tmp152_;
+ GeeArrayList* _tmp153_;
+ GeeDeque* _tmp154_;
+ GeeArrayList* _tmp155_;
+ gint _tmp156_ = 0;
+ GeeDeque* _tmp157_;
+ gint _tmp158_;
+ gint _tmp159_;
+ GeeArrayList* _tmp160_;
+ gint _tmp161_;
+ gint _tmp162_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_DEQUE) ? ((GeeDeque*) _tmp0_) : NULL);
test_deque = _tmp1_;
- _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
recipient = _tmp2_;
- _vala_assert (test_deque != NULL, "test_deque != null");
- _tmp3_ = gee_deque_offer_tail (test_deque, "one");
- _vala_assert (_tmp3_, "test_deque.offer_tail (\"one\")");
- _tmp4_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp5_ = _tmp4_;
- _vala_assert (_tmp5_ == 1, "test_deque.size == 1");
- _tmp6_ = gee_deque_offer_tail (test_deque, "two");
- _vala_assert (_tmp6_, "test_deque.offer_tail (\"two\")");
- _tmp7_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp8_ = _tmp7_;
- _vala_assert (_tmp8_ == 2, "test_deque.size == 2");
- _tmp9_ = gee_deque_offer_tail (test_deque, "three");
- _vala_assert (_tmp9_, "test_deque.offer_tail (\"three\")");
- _tmp10_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp11_ = _tmp10_;
- _vala_assert (_tmp11_ == 3, "test_deque.size == 3");
- _tmp12_ = gee_deque_offer_tail (test_deque, "four");
- _vala_assert (_tmp12_, "test_deque.offer_tail (\"four\")");
- _tmp13_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp14_ = _tmp13_;
- _vala_assert (_tmp14_ == 4, "test_deque.size == 4");
- _tmp15_ = gee_deque_peek_tail (test_deque);
- _tmp16_ = (gchar*) _tmp15_;
- _vala_assert (g_strcmp0 (_tmp16_, "four") == 0, "test_deque.peek_tail () == \"four\"");
- _g_free0 (_tmp16_);
- _tmp17_ = gee_deque_poll_tail (test_deque);
- _tmp18_ = (gchar*) _tmp17_;
- _vala_assert (g_strcmp0 (_tmp18_, "four") == 0, "test_deque.poll_tail () == \"four\"");
- _g_free0 (_tmp18_);
- _tmp19_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp20_ = _tmp19_;
- _vala_assert (_tmp20_ == 3, "test_deque.size == 3");
- _tmp21_ = gee_deque_peek_tail (test_deque);
- _tmp22_ = (gchar*) _tmp21_;
- _vala_assert (g_strcmp0 (_tmp22_, "three") == 0, "test_deque.peek_tail () == \"three\"");
- _g_free0 (_tmp22_);
- _tmp23_ = gee_deque_poll_tail (test_deque);
- _tmp24_ = (gchar*) _tmp23_;
- _vala_assert (g_strcmp0 (_tmp24_, "three") == 0, "test_deque.poll_tail () == \"three\"");
- _g_free0 (_tmp24_);
- _tmp25_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp26_ = _tmp25_;
- _vala_assert (_tmp26_ == 2, "test_deque.size == 2");
- _tmp27_ = gee_deque_peek_tail (test_deque);
- _tmp28_ = (gchar*) _tmp27_;
- _vala_assert (g_strcmp0 (_tmp28_, "two") == 0, "test_deque.peek_tail () == \"two\"");
- _g_free0 (_tmp28_);
- _tmp29_ = gee_deque_poll_tail (test_deque);
- _tmp30_ = (gchar*) _tmp29_;
- _vala_assert (g_strcmp0 (_tmp30_, "two") == 0, "test_deque.poll_tail () == \"two\"");
- _g_free0 (_tmp30_);
- _tmp31_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp32_ = _tmp31_;
- _vala_assert (_tmp32_ == 1, "test_deque.size == 1");
- _tmp33_ = gee_deque_peek_tail (test_deque);
- _tmp34_ = (gchar*) _tmp33_;
- _vala_assert (g_strcmp0 (_tmp34_, "one") == 0, "test_deque.peek_tail () == \"one\"");
- _g_free0 (_tmp34_);
- _tmp35_ = gee_deque_poll_tail (test_deque);
- _tmp36_ = (gchar*) _tmp35_;
- _vala_assert (g_strcmp0 (_tmp36_, "one") == 0, "test_deque.poll_tail () == \"one\"");
- _g_free0 (_tmp36_);
- _tmp37_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp38_ = _tmp37_;
- _vala_assert (_tmp38_ == 0, "test_deque.size == 0");
- _tmp39_ = gee_deque_peek_tail (test_deque);
- _tmp40_ = (gchar*) _tmp39_;
- _vala_assert (_tmp40_ == NULL, "test_deque.peek_tail () == null");
- _g_free0 (_tmp40_);
- _tmp41_ = gee_deque_poll_tail (test_deque);
- _tmp42_ = (gchar*) _tmp41_;
- _vala_assert (_tmp42_ == NULL, "test_deque.poll_tail () == null");
- _g_free0 (_tmp42_);
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp43_ = gee_deque_offer_tail (test_deque, "one");
- _vala_assert (_tmp43_, "test_deque.offer_tail (\"one\")");
- _tmp44_ = gee_deque_offer_tail (test_deque, "two");
- _vala_assert (_tmp44_, "test_deque.offer_tail (\"two\")");
- _tmp45_ = gee_deque_offer_tail (test_deque, "three");
- _vala_assert (_tmp45_, "test_deque.offer_tail (\"three\")");
- _tmp46_ = gee_deque_offer_tail (test_deque, "four");
- _vala_assert (_tmp46_, "test_deque.offer_tail (\"four\")");
- _tmp47_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp48_ = _tmp47_;
- _vala_assert (_tmp48_ == 4, "test_deque.size == 4");
- _tmp49_ = gee_deque_drain_tail (test_deque, (GeeCollection*) recipient, 1);
- _vala_assert (_tmp49_ == 1, "test_deque.drain_tail (recipient, 1) == 1");
- _tmp50_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp51_ = _tmp50_;
- _vala_assert (_tmp51_ == 3, "test_deque.size == 3");
- _tmp52_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp53_ = _tmp52_;
- _vala_assert (_tmp53_ == 1, "recipient.size == 1");
- _tmp54_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 0);
- _tmp55_ = (gchar*) _tmp54_;
- _vala_assert (g_strcmp0 (_tmp55_, "four") == 0, "recipient.get (0) == \"four\"");
- _g_free0 (_tmp55_);
- _tmp56_ = gee_deque_drain_tail (test_deque, (GeeCollection*) recipient, -1);
- _vala_assert (_tmp56_ == 3, "test_deque.drain_tail (recipient) == 3");
- _tmp57_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp58_ = _tmp57_;
- _vala_assert (_tmp58_ == 0, "test_deque.size == 0");
- _tmp59_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp60_ = _tmp59_;
- _vala_assert (_tmp60_ == 4, "recipient.size == 4");
- _tmp61_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 1);
- _tmp62_ = (gchar*) _tmp61_;
- _vala_assert (g_strcmp0 (_tmp62_, "three") == 0, "recipient.get (1) == \"three\"");
- _g_free0 (_tmp62_);
- _tmp63_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 2);
- _tmp64_ = (gchar*) _tmp63_;
- _vala_assert (g_strcmp0 (_tmp64_, "two") == 0, "recipient.get (2) == \"two\"");
- _g_free0 (_tmp64_);
- _tmp65_ = gee_abstract_list_get ((GeeAbstractList*) recipient, 3);
- _tmp66_ = (gchar*) _tmp65_;
- _vala_assert (g_strcmp0 (_tmp66_, "one") == 0, "recipient.get (3) == \"one\"");
- _g_free0 (_tmp66_);
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp67_ = gee_deque_drain_tail (test_deque, (GeeCollection*) recipient, 1);
- _vala_assert (_tmp67_ == 0, "test_deque.drain_tail (recipient, 1) == 0");
- _tmp68_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp69_ = _tmp68_;
- _vala_assert (_tmp69_ == 0, "test_deque.size == 0");
- _tmp70_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp71_ = _tmp70_;
- _vala_assert (_tmp71_ == 0, "recipient.size == 0");
- gee_abstract_collection_clear ((GeeAbstractCollection*) recipient);
- _tmp72_ = gee_deque_drain_tail (test_deque, (GeeCollection*) recipient, -1);
- _vala_assert (_tmp72_ == 0, "test_deque.drain_tail (recipient) == 0");
- _tmp73_ = gee_collection_get_size ((GeeCollection*) test_deque);
- _tmp74_ = _tmp73_;
- _vala_assert (_tmp74_ == 0, "test_deque.size == 0");
- _tmp75_ = gee_abstract_collection_get_size ((GeeCollection*) recipient);
- _tmp76_ = _tmp75_;
- _vala_assert (_tmp76_ == 0, "recipient.size == 0");
+ _tmp3_ = g_strdup ("one");
+ _tmp4_ = g_strdup ("two");
+ _tmp5_ = g_strdup ("three");
+ _tmp6_ = g_strdup ("four");
+ _tmp7_ = g_strdup ("five");
+ _tmp8_ = g_strdup ("six");
+ _tmp9_ = g_strdup ("seven");
+ _tmp10_ = g_strdup ("\neight");
+ _tmp11_ = g_strdup ("nine");
+ _tmp12_ = g_strdup ("ten");
+ _tmp13_ = g_strdup ("eleven");
+ _tmp14_ = g_strdup ("twelve");
+ _tmp15_ = g_strdup ("thirteen");
+ _tmp16_ = g_strdup ("fourteen\n");
+ _tmp17_ = g_strdup ("fifteen");
+ _tmp18_ = g_strdup ("sixteen");
+ _tmp19_ = g_strdup ("seventeen");
+ _tmp20_ = g_strdup ("eighteen");
+ _tmp21_ = g_strdup ("nineteen\n");
+ _tmp22_ = g_strdup ("twenty");
+ _tmp23_ = g_strdup ("twenty one");
+ _tmp24_ = g_strdup ("twenty two");
+ _tmp25_ = g_strdup ("twenty three");
+ _tmp26_ = g_strdup ("twenty four");
+ _tmp27_ = g_strdup ("twenty five");
+ _tmp28_ = g_strdup ("twenty six");
+ _tmp29_ = g_strdup ("twenty seven");
+ _tmp30_ = g_strdup ("twenty eight");
+ _tmp31_ = g_strdup ("twenty nine");
+ _tmp32_ = g_strdup ("thirty");
+ _tmp33_ = g_strdup ("thirty one");
+ _tmp34_ = g_strdup ("thirty two");
+ _tmp35_ = g_strdup ("thirty four");
+ _tmp36_ = g_strdup ("thirty five");
+ _tmp37_ = g_strdup ("thirty six");
+ _tmp38_ = g_strdup ("thirty seven");
+ _tmp39_ = g_strdup ("thirty eight");
+ _tmp40_ = g_strdup ("thirty nine");
+ _tmp41_ = g_strdup ("fourty");
+ _tmp42_ = g_new0 (gchar*, 39 + 1);
+ _tmp42_[0] = _tmp3_;
+ _tmp42_[1] = _tmp4_;
+ _tmp42_[2] = _tmp5_;
+ _tmp42_[3] = _tmp6_;
+ _tmp42_[4] = _tmp7_;
+ _tmp42_[5] = _tmp8_;
+ _tmp42_[6] = _tmp9_;
+ _tmp42_[7] = _tmp10_;
+ _tmp42_[8] = _tmp11_;
+ _tmp42_[9] = _tmp12_;
+ _tmp42_[10] = _tmp13_;
+ _tmp42_[11] = _tmp14_;
+ _tmp42_[12] = _tmp15_;
+ _tmp42_[13] = _tmp16_;
+ _tmp42_[14] = _tmp17_;
+ _tmp42_[15] = _tmp18_;
+ _tmp42_[16] = _tmp19_;
+ _tmp42_[17] = _tmp20_;
+ _tmp42_[18] = _tmp21_;
+ _tmp42_[19] = _tmp22_;
+ _tmp42_[20] = _tmp23_;
+ _tmp42_[21] = _tmp24_;
+ _tmp42_[22] = _tmp25_;
+ _tmp42_[23] = _tmp26_;
+ _tmp42_[24] = _tmp27_;
+ _tmp42_[25] = _tmp28_;
+ _tmp42_[26] = _tmp29_;
+ _tmp42_[27] = _tmp30_;
+ _tmp42_[28] = _tmp31_;
+ _tmp42_[29] = _tmp32_;
+ _tmp42_[30] = _tmp33_;
+ _tmp42_[31] = _tmp34_;
+ _tmp42_[32] = _tmp35_;
+ _tmp42_[33] = _tmp36_;
+ _tmp42_[34] = _tmp37_;
+ _tmp42_[35] = _tmp38_;
+ _tmp42_[36] = _tmp39_;
+ _tmp42_[37] = _tmp40_;
+ _tmp42_[38] = _tmp41_;
+ to_offer = _tmp42_;
+ to_offer_length1 = 39;
+ _to_offer_size_ = to_offer_length1;
+ _tmp43_ = test_deque;
+ _vala_assert (_tmp43_ != NULL, "test_deque != null");
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp44_;
+ _tmp44_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp45_;
+ gint _tmp47_;
+ gchar** _tmp48_;
+ gint _tmp48__length1;
+ GeeDeque* _tmp49_;
+ gchar** _tmp50_;
+ gint _tmp50__length1;
+ gint _tmp51_;
+ const gchar* _tmp52_;
+ gboolean _tmp53_ = FALSE;
+ GeeDeque* _tmp54_;
+ gint _tmp55_;
+ gint _tmp56_;
+ gint _tmp57_;
+ _tmp45_ = _tmp44_;
+ if (!_tmp45_) {
+ gint _tmp46_;
+ _tmp46_ = i;
+ i = _tmp46_ + 1;
+ }
+ _tmp44_ = FALSE;
+ _tmp47_ = i;
+ _tmp48_ = to_offer;
+ _tmp48__length1 = to_offer_length1;
+ if (!(_tmp47_ < _tmp48__length1)) {
+ break;
+ }
+ _tmp49_ = test_deque;
+ _tmp50_ = to_offer;
+ _tmp50__length1 = to_offer_length1;
+ _tmp51_ = i;
+ _tmp52_ = _tmp50_[_tmp51_];
+ _tmp53_ = gee_deque_offer_tail (_tmp49_, _tmp52_);
+ _vala_assert (_tmp53_, "test_deque.offer_tail (to_offer[i])");
+ _tmp54_ = test_deque;
+ _tmp55_ = gee_collection_get_size ((GeeCollection*) _tmp54_);
+ _tmp56_ = _tmp55_;
+ _tmp57_ = i;
+ _vala_assert (_tmp56_ == (_tmp57_ + 1), "test_deque.size == i + 1");
+ }
+ }
+ }
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp58_;
+ _tmp58_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp59_;
+ gint _tmp61_;
+ gchar** _tmp62_;
+ gint _tmp62__length1;
+ GeeDeque* _tmp63_;
+ gpointer _tmp64_ = NULL;
+ gchar* _tmp65_;
+ gchar** _tmp66_;
+ gint _tmp66__length1;
+ gchar** _tmp67_;
+ gint _tmp67__length1;
+ gint _tmp68_;
+ const gchar* _tmp69_;
+ GeeDeque* _tmp70_;
+ gpointer _tmp71_ = NULL;
+ gchar* _tmp72_;
+ gchar** _tmp73_;
+ gint _tmp73__length1;
+ gchar** _tmp74_;
+ gint _tmp74__length1;
+ gint _tmp75_;
+ const gchar* _tmp76_;
+ GeeDeque* _tmp77_;
+ gint _tmp78_;
+ gint _tmp79_;
+ gchar** _tmp80_;
+ gint _tmp80__length1;
+ gint _tmp81_;
+ _tmp59_ = _tmp58_;
+ if (!_tmp59_) {
+ gint _tmp60_;
+ _tmp60_ = i;
+ i = _tmp60_ + 1;
+ }
+ _tmp58_ = FALSE;
+ _tmp61_ = i;
+ _tmp62_ = to_offer;
+ _tmp62__length1 = to_offer_length1;
+ if (!(_tmp61_ < _tmp62__length1)) {
+ break;
+ }
+ _tmp63_ = test_deque;
+ _tmp64_ = gee_deque_peek_tail (_tmp63_);
+ _tmp65_ = (gchar*) _tmp64_;
+ _tmp66_ = to_offer;
+ _tmp66__length1 = to_offer_length1;
+ _tmp67_ = to_offer;
+ _tmp67__length1 = to_offer_length1;
+ _tmp68_ = i;
+ _tmp69_ = _tmp66_[(_tmp67__length1 - _tmp68_) - 1];
+ _vala_assert (g_strcmp0 (_tmp65_, _tmp69_) == 0, "test_deque.peek_tail () == to_offer[to_offer.length - i - 1]");
+ _g_free0 (_tmp65_);
+ _tmp70_ = test_deque;
+ _tmp71_ = gee_deque_poll_tail (_tmp70_);
+ _tmp72_ = (gchar*) _tmp71_;
+ _tmp73_ = to_offer;
+ _tmp73__length1 = to_offer_length1;
+ _tmp74_ = to_offer;
+ _tmp74__length1 = to_offer_length1;
+ _tmp75_ = i;
+ _tmp76_ = _tmp73_[(_tmp74__length1 - _tmp75_) - 1];
+ _vala_assert (g_strcmp0 (_tmp72_, _tmp76_) == 0, "test_deque.poll_tail () == to_offer[to_offer.length - i - 1]");
+ _g_free0 (_tmp72_);
+ _tmp77_ = test_deque;
+ _tmp78_ = gee_collection_get_size ((GeeCollection*) _tmp77_);
+ _tmp79_ = _tmp78_;
+ _tmp80_ = to_offer;
+ _tmp80__length1 = to_offer_length1;
+ _tmp81_ = i;
+ _vala_assert (_tmp79_ == ((_tmp80__length1 - _tmp81_) - 1), "test_deque.size == to_offer.length - i - 1");
+ }
+ }
+ }
+ _tmp82_ = test_deque;
+ _tmp83_ = gee_deque_peek_tail (_tmp82_);
+ _tmp84_ = (gchar*) _tmp83_;
+ _vala_assert (_tmp84_ == NULL, "test_deque.peek_tail () == null");
+ _g_free0 (_tmp84_);
+ _tmp85_ = test_deque;
+ _tmp86_ = gee_deque_poll_tail (_tmp85_);
+ _tmp87_ = (gchar*) _tmp86_;
+ _vala_assert (_tmp87_ == NULL, "test_deque.poll_tail () == null");
+ _g_free0 (_tmp87_);
+ _tmp88_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp88_);
+ {
+ gint i;
+ i = 0;
+ {
+ gboolean _tmp89_;
+ _tmp89_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp90_;
+ gint _tmp92_;
+ gchar** _tmp93_;
+ gint _tmp93__length1;
+ GeeDeque* _tmp94_;
+ gchar** _tmp95_;
+ gint _tmp95__length1;
+ gint _tmp96_;
+ const gchar* _tmp97_;
+ gboolean _tmp98_ = FALSE;
+ _tmp90_ = _tmp89_;
+ if (!_tmp90_) {
+ gint _tmp91_;
+ _tmp91_ = i;
+ i = _tmp91_ + 1;
+ }
+ _tmp89_ = FALSE;
+ _tmp92_ = i;
+ _tmp93_ = to_offer;
+ _tmp93__length1 = to_offer_length1;
+ if (!(_tmp92_ < _tmp93__length1)) {
+ break;
+ }
+ _tmp94_ = test_deque;
+ _tmp95_ = to_offer;
+ _tmp95__length1 = to_offer_length1;
+ _tmp96_ = i;
+ _tmp97_ = _tmp95_[_tmp96_];
+ _tmp98_ = gee_deque_offer_tail (_tmp94_, _tmp97_);
+ _vala_assert (_tmp98_, "test_deque.offer_tail (to_offer[i])");
+ }
+ }
+ }
+ _tmp99_ = test_deque;
+ _tmp100_ = gee_collection_get_size ((GeeCollection*) _tmp99_);
+ _tmp101_ = _tmp100_;
+ _tmp102_ = to_offer;
+ _tmp102__length1 = to_offer_length1;
+ _vala_assert (_tmp101_ == _tmp102__length1, "test_deque.size == to_offer.length");
+ _tmp103_ = test_deque;
+ _tmp104_ = recipient;
+ _tmp105_ = gee_deque_drain_tail (_tmp103_, (GeeCollection*) _tmp104_, 1);
+ _vala_assert (_tmp105_ == 1, "test_deque.drain_tail (recipient, 1) == 1");
+ _tmp106_ = test_deque;
+ _tmp107_ = gee_collection_get_size ((GeeCollection*) _tmp106_);
+ _tmp108_ = _tmp107_;
+ _tmp109_ = to_offer;
+ _tmp109__length1 = to_offer_length1;
+ _vala_assert (_tmp108_ == (_tmp109__length1 - 1), "test_deque.size == to_offer.length - 1");
+ _tmp110_ = recipient;
+ _tmp111_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp110_);
+ _tmp112_ = _tmp111_;
+ _vala_assert (_tmp112_ == 1, "recipient.size == 1");
+ _tmp113_ = recipient;
+ _tmp114_ = gee_abstract_list_get ((GeeAbstractList*) _tmp113_, 0);
+ _tmp115_ = (gchar*) _tmp114_;
+ _tmp116_ = to_offer;
+ _tmp116__length1 = to_offer_length1;
+ _tmp117_ = to_offer;
+ _tmp117__length1 = to_offer_length1;
+ _tmp118_ = _tmp116_[_tmp117__length1 - 1];
+ _vala_assert (g_strcmp0 (_tmp115_, _tmp118_) == 0, "recipient.get (0) == to_offer[to_offer.length - 1]");
+ _g_free0 (_tmp115_);
+ _tmp119_ = test_deque;
+ _tmp120_ = recipient;
+ _tmp121_ = gee_deque_drain_tail (_tmp119_, (GeeCollection*) _tmp120_, -1);
+ _tmp122_ = to_offer;
+ _tmp122__length1 = to_offer_length1;
+ _vala_assert (_tmp121_ == (_tmp122__length1 - 1), "test_deque.drain_tail (recipient) == to_offer.length - 1");
+ _tmp123_ = test_deque;
+ _tmp124_ = gee_collection_get_size ((GeeCollection*) _tmp123_);
+ _tmp125_ = _tmp124_;
+ _vala_assert (_tmp125_ == 0, "test_deque.size == 0");
+ _tmp126_ = recipient;
+ _tmp127_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp126_);
+ _tmp128_ = _tmp127_;
+ _tmp129_ = to_offer;
+ _tmp129__length1 = to_offer_length1;
+ _vala_assert (_tmp128_ == _tmp129__length1, "recipient.size == to_offer.length");
+ {
+ gint i;
+ i = 1;
+ {
+ gboolean _tmp130_;
+ _tmp130_ = TRUE;
+ while (TRUE) {
+ gboolean _tmp131_;
+ gint _tmp133_;
+ gchar** _tmp134_;
+ gint _tmp134__length1;
+ GeeArrayList* _tmp135_;
+ gint _tmp136_;
+ gpointer _tmp137_ = NULL;
+ gchar* _tmp138_;
+ gchar** _tmp139_;
+ gint _tmp139__length1;
+ gchar** _tmp140_;
+ gint _tmp140__length1;
+ gint _tmp141_;
+ const gchar* _tmp142_;
+ _tmp131_ = _tmp130_;
+ if (!_tmp131_) {
+ gint _tmp132_;
+ _tmp132_ = i;
+ i = _tmp132_ + 1;
+ }
+ _tmp130_ = FALSE;
+ _tmp133_ = i;
+ _tmp134_ = to_offer;
+ _tmp134__length1 = to_offer_length1;
+ if (!(_tmp133_ < _tmp134__length1)) {
+ break;
+ }
+ _tmp135_ = recipient;
+ _tmp136_ = i;
+ _tmp137_ = gee_abstract_list_get ((GeeAbstractList*) _tmp135_, _tmp136_);
+ _tmp138_ = (gchar*) _tmp137_;
+ _tmp139_ = to_offer;
+ _tmp139__length1 = to_offer_length1;
+ _tmp140_ = to_offer;
+ _tmp140__length1 = to_offer_length1;
+ _tmp141_ = i;
+ _tmp142_ = _tmp139_[(_tmp140__length1 - _tmp141_) - 1];
+ _vala_assert (g_strcmp0 (_tmp138_, _tmp142_) == 0, "recipient.get (i) == to_offer[to_offer.length - i - 1]");
+ _g_free0 (_tmp138_);
+ }
+ }
+ }
+ _tmp143_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp143_);
+ _tmp144_ = test_deque;
+ _tmp145_ = recipient;
+ _tmp146_ = gee_deque_drain_tail (_tmp144_, (GeeCollection*) _tmp145_, 1);
+ _vala_assert (_tmp146_ == 0, "test_deque.drain_tail (recipient, 1) == 0");
+ _tmp147_ = test_deque;
+ _tmp148_ = gee_collection_get_size ((GeeCollection*) _tmp147_);
+ _tmp149_ = _tmp148_;
+ _vala_assert (_tmp149_ == 0, "test_deque.size == 0");
+ _tmp150_ = recipient;
+ _tmp151_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp150_);
+ _tmp152_ = _tmp151_;
+ _vala_assert (_tmp152_ == 0, "recipient.size == 0");
+ _tmp153_ = recipient;
+ gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp153_);
+ _tmp154_ = test_deque;
+ _tmp155_ = recipient;
+ _tmp156_ = gee_deque_drain_tail (_tmp154_, (GeeCollection*) _tmp155_, -1);
+ _vala_assert (_tmp156_ == 0, "test_deque.drain_tail (recipient) == 0");
+ _tmp157_ = test_deque;
+ _tmp158_ = gee_collection_get_size ((GeeCollection*) _tmp157_);
+ _tmp159_ = _tmp158_;
+ _vala_assert (_tmp159_ == 0, "test_deque.size == 0");
+ _tmp160_ = recipient;
+ _tmp161_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp160_);
+ _tmp162_ = _tmp161_;
+ _vala_assert (_tmp162_ == 0, "recipient.size == 0");
+ to_offer = (_vala_array_free (to_offer, to_offer_length1, (GDestroyNotify) g_free), NULL);
_g_object_unref0 (recipient);
_g_object_unref0 (test_deque);
}
@@ -870,4 +1708,22 @@ GType deque_tests_get_type (void) {
}
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
diff --git a/tests/testdeque.vala b/tests/testdeque.vala
index d100ce0..ff2d320 100644
--- a/tests/testdeque.vala
+++ b/tests/testdeque.vala
@@ -37,28 +37,30 @@ public abstract class DequeTests : QueueTests {
// Check the test deque is not null
assert (test_deque != null);
+ string[] to_offer = {
+ "one", "two", "three", "four", "five", "six", "seven", "
+eight",
+ "nine", "ten", "eleven", "twelve", "thirteen", "fourteen
+",
+ "fifteen", "sixteen", "seventeen", "eighteen", "nineteen
+", "twenty",
+ "twenty one", "twenty two", "twenty three", "twenty four",
+ "twenty five", "twenty six", "twenty seven", "twenty eight",
+ "twenty nine", "thirty", "thirty one", "thirty two", "thirty four",
+ "thirty five", "thirty six", "thirty seven", "thirty eight",
+ "thirty nine", "fourty"
+ };
// Check normal FIFO behavior
- assert (test_deque.offer_tail ("one"));
- assert (test_deque.size == 1);
- assert (test_deque.offer_tail ("two"));
- assert (test_deque.size == 2);
- assert (test_deque.offer_tail ("three"));
- assert (test_deque.size == 3);
- assert (test_deque.offer_tail ("four"));
- assert (test_deque.size == 4);
- assert (test_deque.peek_head () == "one");
- assert (test_deque.poll_head () == "one");
- assert (test_deque.size == 3);
- assert (test_deque.peek_head () == "two");
- assert (test_deque.poll_head () == "two");
- assert (test_deque.size == 2);
- assert (test_deque.peek_head () == "three");
- assert (test_deque.poll_head () == "three");
- assert (test_deque.size == 1);
- assert (test_deque.peek_head () == "four");
- assert (test_deque.poll_head () == "four");
- assert (test_deque.size == 0);
+ for (int i = 0; i < to_offer.length; i++) {
+ assert (test_deque.offer_tail (to_offer[i]));
+ assert (test_deque.size == i + 1);
+ }
+ for (int i = 0; i < to_offer.length; i++) {
+ assert (test_deque.peek_head () == to_offer[i]);
+ assert (test_deque.poll_head () == to_offer[i]);
+ assert (test_deque.size == to_offer.length - i - 1);
+ }
// Check normal behavior when no element
assert (test_deque.peek_head () == null);
@@ -66,21 +68,20 @@ public abstract class DequeTests : QueueTests {
// Check drain with FIFO behavior
recipient.clear ();
- assert (test_deque.offer_tail ("one"));
- assert (test_deque.offer_tail ("two"));
- assert (test_deque.offer_tail ("three"));
- assert (test_deque.offer_tail ("four"));
- assert (test_deque.size == 4);
+ for (int i = 0; i < to_offer.length; i++) {
+ assert (test_deque.offer_tail (to_offer[i]));
+ }
+ assert (test_deque.size == to_offer.length);
assert (test_deque.drain_head (recipient, 1) == 1);
- assert (test_deque.size == 3);
+ assert (test_deque.size == to_offer.length - 1);
assert (recipient.size == 1);
- assert (recipient.get (0) == "one");
- assert (test_deque.drain_head (recipient) == 3);
+ assert (recipient.get (0) == to_offer[0]);
+ assert (test_deque.drain_head (recipient) == to_offer.length - 1);
assert (test_deque.size == 0);
- assert (recipient.size == 4);
- assert (recipient.get (1) == "two");
- assert (recipient.get (2) == "three");
- assert (recipient.get (3) == "four");
+ assert (recipient.size == to_offer.length);
+ for (int i = 1; i < to_offer.length; i++) {
+ assert (recipient.get (i) == to_offer[i]);
+ }
// Check drain one when no element
recipient.clear ();
@@ -98,31 +99,33 @@ public abstract class DequeTests : QueueTests {
public void test_stack_use () {
var test_deque = test_collection as Gee.Deque<string>;
ArrayList<string> recipient = new ArrayList<string> ();
+ string[] to_offer = {
+ "one", "two", "three", "four", "five", "six", "seven", "
+eight",
+ "nine", "ten", "eleven", "twelve", "thirteen", "fourteen
+",
+ "fifteen", "sixteen", "seventeen", "eighteen", "nineteen
+", "twenty",
+ "twenty one", "twenty two", "twenty three", "twenty four",
+ "twenty five", "twenty six", "twenty seven", "twenty eight",
+ "twenty nine", "thirty", "thirty one", "thirty two", "thirty four",
+ "thirty five", "thirty six", "thirty seven", "thirty eight",
+ "thirty nine", "fourty"
+ };
// Check the test deque is not null
assert (test_deque != null);
// Check normal LIFO behavior
- assert (test_deque.offer_head ("one"));
- assert (test_deque.size == 1);
- assert (test_deque.offer_head ("two"));
- assert (test_deque.size == 2);
- assert (test_deque.offer_head ("three"));
- assert (test_deque.size == 3);
- assert (test_deque.offer_head ("four"));
- assert (test_deque.size == 4);
- assert (test_deque.peek_head () == "four");
- assert (test_deque.poll_head () == "four");
- assert (test_deque.size == 3);
- assert (test_deque.peek_head () == "three");
- assert (test_deque.poll_head () == "three");
- assert (test_deque.size == 2);
- assert (test_deque.peek_head () == "two");
- assert (test_deque.poll_head () == "two");
- assert (test_deque.size == 1);
- assert (test_deque.peek_head () == "one");
- assert (test_deque.poll_head () == "one");
- assert (test_deque.size == 0);
+ for (int i = 0; i < to_offer.length; i++) {
+ assert (test_deque.offer_head (to_offer[i]));
+ assert (test_deque.size == i + 1);
+ }
+ for (int i = to_offer.length - 1; i >= 0; i--) {
+ assert (test_deque.peek_head () == to_offer[i]);
+ assert (test_deque.poll_head () == to_offer[i]);
+ assert (test_deque.size == i);
+ }
// Check normal behavior when no element
assert (test_deque.peek_head () == null);
@@ -130,21 +133,20 @@ public abstract class DequeTests : QueueTests {
// Check drain with LIFO behavior
recipient.clear ();
- assert (test_deque.offer_head ("one"));
- assert (test_deque.offer_head ("two"));
- assert (test_deque.offer_head ("three"));
- assert (test_deque.offer_head ("four"));
- assert (test_deque.size == 4);
+ for (int i = 0; i < to_offer.length; i++) {
+ assert (test_deque.offer_head (to_offer[i]));
+ }
+ assert (test_deque.size == to_offer.length);
assert (test_deque.drain_head (recipient, 1) == 1);
- assert (test_deque.size == 3);
+ assert (test_deque.size == to_offer.length - 1);
assert (recipient.size == 1);
- assert (recipient.get (0) == "four");
- assert (test_deque.drain_head (recipient) == 3);
+ assert (recipient.get (0) == to_offer[to_offer.length - 1]);
+ assert (test_deque.drain_head (recipient) == to_offer.length - 1);
assert (test_deque.size == 0);
- assert (recipient.size == 4);
- assert (recipient.get (1) == "three");
- assert (recipient.get (2) == "two");
- assert (recipient.get (3) == "one");
+ assert (recipient.size == to_offer.length);
+ for (int i = 1; i < to_offer.length; i++) {
+ assert (recipient.get (i) == to_offer[to_offer.length - i - 1]);
+ }
// Check drain one when no element
recipient.clear ();
@@ -162,31 +164,33 @@ public abstract class DequeTests : QueueTests {
public void test_reversed_stack_use () {
var test_deque = test_collection as Gee.Deque<string>;
ArrayList<string> recipient = new ArrayList<string> ();
+ string[] to_offer = {
+ "one", "two", "three", "four", "five", "six", "seven", "
+eight",
+ "nine", "ten", "eleven", "twelve", "thirteen", "fourteen
+",
+ "fifteen", "sixteen", "seventeen", "eighteen", "nineteen
+", "twenty",
+ "twenty one", "twenty two", "twenty three", "twenty four",
+ "twenty five", "twenty six", "twenty seven", "twenty eight",
+ "twenty nine", "thirty", "thirty one", "thirty two", "thirty four",
+ "thirty five", "thirty six", "thirty seven", "thirty eight",
+ "thirty nine", "fourty"
+ };
// Check the test deque is not null
assert (test_deque != null);
// Check normal LIFO behavior
- assert (test_deque.offer_tail ("one"));
- assert (test_deque.size == 1);
- assert (test_deque.offer_tail ("two"));
- assert (test_deque.size == 2);
- assert (test_deque.offer_tail ("three"));
- assert (test_deque.size == 3);
- assert (test_deque.offer_tail ("four"));
- assert (test_deque.size == 4);
- assert (test_deque.peek_tail () == "four");
- assert (test_deque.poll_tail () == "four");
- assert (test_deque.size == 3);
- assert (test_deque.peek_tail () == "three");
- assert (test_deque.poll_tail () == "three");
- assert (test_deque.size == 2);
- assert (test_deque.peek_tail () == "two");
- assert (test_deque.poll_tail () == "two");
- assert (test_deque.size == 1);
- assert (test_deque.peek_tail () == "one");
- assert (test_deque.poll_tail () == "one");
- assert (test_deque.size == 0);
+ for (int i = 0; i < to_offer.length; i++) {
+ assert (test_deque.offer_tail (to_offer[i]));
+ assert (test_deque.size == i + 1);
+ }
+ for (int i = 0; i < to_offer.length; i++) {
+ assert (test_deque.peek_tail () == to_offer[to_offer.length - i - 1]);
+ assert (test_deque.poll_tail () == to_offer[to_offer.length - i - 1]);
+ assert (test_deque.size == to_offer.length - i - 1);
+ }
// Check normal behavior when no element
assert (test_deque.peek_tail () == null);
@@ -194,21 +198,20 @@ public abstract class DequeTests : QueueTests {
// Check drain with LIFO behavior
recipient.clear ();
- assert (test_deque.offer_tail ("one"));
- assert (test_deque.offer_tail ("two"));
- assert (test_deque.offer_tail ("three"));
- assert (test_deque.offer_tail ("four"));
- assert (test_deque.size == 4);
+ for (int i = 0; i < to_offer.length; i++) {
+ assert (test_deque.offer_tail (to_offer[i]));
+ }
+ assert (test_deque.size == to_offer.length);
assert (test_deque.drain_tail (recipient, 1) == 1);
- assert (test_deque.size == 3);
+ assert (test_deque.size == to_offer.length - 1);
assert (recipient.size == 1);
- assert (recipient.get (0) == "four");
- assert (test_deque.drain_tail (recipient) == 3);
+ assert (recipient.get (0) == to_offer[to_offer.length - 1]);
+ assert (test_deque.drain_tail (recipient) == to_offer.length - 1);
assert (test_deque.size == 0);
- assert (recipient.size == 4);
- assert (recipient.get (1) == "three");
- assert (recipient.get (2) == "two");
- assert (recipient.get (3) == "one");
+ assert (recipient.size == to_offer.length);
+ for (int i = 1; i < to_offer.length; i++) {
+ assert (recipient.get (i) == to_offer[to_offer.length - i - 1]);
+ }
// Check drain one when no element
recipient.clear ();
@@ -223,3 +226,4 @@ public abstract class DequeTests : QueueTests {
assert (recipient.size == 0);
}
}
+
diff --git a/tests/testfunctions.c b/tests/testfunctions.c
new file mode 100644
index 0000000..21a5ed2
--- /dev/null
+++ b/tests/testfunctions.c
@@ -0,0 +1,1203 @@
+/* testfunctions.c generated by valac 0.18.0, the Vala compiler
+ * generated from testfunctions.vala, do not modify */
+
+/* testfunctions.vala
+ *
+ * Copyright (C) 2010 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gee.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_FUNCTIONS_TESTS (functions_tests_get_type ())
+#define FUNCTIONS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FUNCTIONS_TESTS, FunctionsTests))
+#define FUNCTIONS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FUNCTIONS_TESTS, FunctionsTestsClass))
+#define IS_FUNCTIONS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FUNCTIONS_TESTS))
+#define IS_FUNCTIONS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FUNCTIONS_TESTS))
+#define FUNCTIONS_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FUNCTIONS_TESTS, FunctionsTestsClass))
+
+typedef struct _FunctionsTests FunctionsTests;
+typedef struct _FunctionsTestsClass FunctionsTestsClass;
+typedef struct _FunctionsTestsPrivate FunctionsTestsPrivate;
+#define _g_free0(var) (var = (g_free (var), NULL))
+
+#define FUNCTIONS_TESTS_TYPE_MY_COMPARABLE (functions_tests_my_comparable_get_type ())
+#define FUNCTIONS_TESTS_MY_COMPARABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FUNCTIONS_TESTS_TYPE_MY_COMPARABLE, FunctionsTestsMyComparable))
+#define FUNCTIONS_TESTS_MY_COMPARABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FUNCTIONS_TESTS_TYPE_MY_COMPARABLE, FunctionsTestsMyComparableClass))
+#define FUNCTIONS_TESTS_IS_MY_COMPARABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FUNCTIONS_TESTS_TYPE_MY_COMPARABLE))
+#define FUNCTIONS_TESTS_IS_MY_COMPARABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FUNCTIONS_TESTS_TYPE_MY_COMPARABLE))
+#define FUNCTIONS_TESTS_MY_COMPARABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FUNCTIONS_TESTS_TYPE_MY_COMPARABLE, FunctionsTestsMyComparableClass))
+
+typedef struct _FunctionsTestsMyComparable FunctionsTestsMyComparable;
+typedef struct _FunctionsTestsMyComparableClass FunctionsTestsMyComparableClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+#define FUNCTIONS_TESTS_TYPE_MY_HASHABLE (functions_tests_my_hashable_get_type ())
+#define FUNCTIONS_TESTS_MY_HASHABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FUNCTIONS_TESTS_TYPE_MY_HASHABLE, FunctionsTestsMyHashable))
+#define FUNCTIONS_TESTS_MY_HASHABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FUNCTIONS_TESTS_TYPE_MY_HASHABLE, FunctionsTestsMyHashableClass))
+#define FUNCTIONS_TESTS_IS_MY_HASHABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FUNCTIONS_TESTS_TYPE_MY_HASHABLE))
+#define FUNCTIONS_TESTS_IS_MY_HASHABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FUNCTIONS_TESTS_TYPE_MY_HASHABLE))
+#define FUNCTIONS_TESTS_MY_HASHABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FUNCTIONS_TESTS_TYPE_MY_HASHABLE, FunctionsTestsMyHashableClass))
+
+typedef struct _FunctionsTestsMyHashable FunctionsTestsMyHashable;
+typedef struct _FunctionsTestsMyHashableClass FunctionsTestsMyHashableClass;
+typedef struct _Block5Data Block5Data;
+typedef struct _Block6Data Block6Data;
+typedef struct _Block7Data Block7Data;
+typedef struct _Block8Data Block8Data;
+typedef struct _FunctionsTestsMyComparablePrivate FunctionsTestsMyComparablePrivate;
+typedef struct _FunctionsTestsMyHashablePrivate FunctionsTestsMyHashablePrivate;
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _FunctionsTests {
+ GeeTestCase parent_instance;
+ FunctionsTestsPrivate * priv;
+};
+
+struct _FunctionsTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+typedef void (*GeeTestCaseTestMethod) (void* user_data);
+struct _Block5Data {
+ int _ref_count_;
+ FunctionsTests * self;
+ gint i;
+ gint j;
+};
+
+struct _Block6Data {
+ int _ref_count_;
+ Block5Data * _data5_;
+ gint k;
+};
+
+struct _Block7Data {
+ int _ref_count_;
+ FunctionsTests * self;
+ gint i;
+};
+
+struct _Block8Data {
+ int _ref_count_;
+ Block7Data * _data7_;
+ gint j;
+ gint start;
+};
+
+struct _FunctionsTestsMyComparable {
+ GObject parent_instance;
+ FunctionsTestsMyComparablePrivate * priv;
+};
+
+struct _FunctionsTestsMyComparableClass {
+ GObjectClass parent_class;
+};
+
+struct _FunctionsTestsMyComparablePrivate {
+ gint i;
+};
+
+struct _FunctionsTestsMyHashable {
+ GObject parent_instance;
+ FunctionsTestsMyHashablePrivate * priv;
+};
+
+struct _FunctionsTestsMyHashableClass {
+ GObjectClass parent_class;
+};
+
+struct _FunctionsTestsMyHashablePrivate {
+ gint i;
+};
+
+
+static gpointer functions_tests_parent_class = NULL;
+static gpointer functions_tests_my_comparable_parent_class = NULL;
+static GeeComparableIface* functions_tests_my_comparable_gee_comparable_parent_iface = NULL;
+static gpointer functions_tests_my_hashable_parent_class = NULL;
+static GeeComparableIface* functions_tests_my_hashable_gee_comparable_parent_iface = NULL;
+static GeeHashableIface* functions_tests_my_hashable_gee_hashable_parent_iface = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType functions_tests_get_type (void) G_GNUC_CONST;
+enum {
+ FUNCTIONS_TESTS_DUMMY_PROPERTY
+};
+FunctionsTests* functions_tests_new (void);
+FunctionsTests* functions_tests_construct (GType object_type);
+GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
+void functions_tests_test_string_func (FunctionsTests* self);
+static void _functions_tests_test_string_func_gee_test_case_test_method (gpointer self);
+void functions_tests_test_int_func (FunctionsTests* self);
+static void _functions_tests_test_int_func_gee_test_case_test_method (gpointer self);
+void functions_tests_test_compare_func (FunctionsTests* self);
+static void _functions_tests_test_compare_func_gee_test_case_test_method (gpointer self);
+void functions_tests_test_hash_func (FunctionsTests* self);
+static void _functions_tests_test_hash_func_gee_test_case_test_method (gpointer self);
+void functions_tests_test_unfold (FunctionsTests* self);
+static void _functions_tests_test_unfold_gee_test_case_test_method (gpointer self);
+void functions_tests_test_concat (FunctionsTests* self);
+static void _functions_tests_test_concat_gee_test_case_test_method (gpointer self);
+static FunctionsTestsMyComparable* functions_tests_my_comparable_new (gint i);
+static FunctionsTestsMyComparable* functions_tests_my_comparable_construct (GType object_type, gint i);
+static GType functions_tests_my_comparable_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
+static FunctionsTestsMyHashable* functions_tests_my_hashable_new (gint i);
+static FunctionsTestsMyHashable* functions_tests_my_hashable_construct (GType object_type, gint i);
+static GType functions_tests_my_hashable_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
+static Block5Data* block5_data_ref (Block5Data* _data5_);
+static void block5_data_unref (void * _userdata_);
+static GeeLazy* __lambda19_ (Block5Data* _data5_);
+static Block6Data* block6_data_ref (Block6Data* _data6_);
+static void block6_data_unref (void * _userdata_);
+static gint __lambda20_ (Block6Data* _data6_);
+static gpointer ___lambda20__gee_lazy_func (gpointer self);
+static GeeLazy* ___lambda19__gee_unfold_func (gpointer self);
+static Block7Data* block7_data_ref (Block7Data* _data7_);
+static void block7_data_unref (void * _userdata_);
+static GeeLazy* __lambda21_ (Block7Data* _data7_);
+static Block8Data* block8_data_ref (Block8Data* _data8_);
+static void block8_data_unref (void * _userdata_);
+static GeeLazy* __lambda22_ (Block8Data* _data8_);
+static GeeLazy* ___lambda22__gee_unfold_func (gpointer self);
+static GeeLazy* ___lambda21__gee_unfold_func (gpointer self);
+#define FUNCTIONS_TESTS_MY_COMPARABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FUNCTIONS_TESTS_TYPE_MY_COMPARABLE, FunctionsTestsMyComparablePrivate))
+enum {
+ FUNCTIONS_TESTS_MY_COMPARABLE_DUMMY_PROPERTY
+};
+static gint functions_tests_my_comparable_real_compare_to (GeeComparable* base, FunctionsTestsMyComparable* cmp);
+static void functions_tests_my_comparable_finalize (GObject* obj);
+#define FUNCTIONS_TESTS_MY_HASHABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FUNCTIONS_TESTS_TYPE_MY_HASHABLE, FunctionsTestsMyHashablePrivate))
+enum {
+ FUNCTIONS_TESTS_MY_HASHABLE_DUMMY_PROPERTY
+};
+static gint functions_tests_my_hashable_real_compare_to (GeeComparable* base, FunctionsTestsMyHashable* cmp);
+static guint functions_tests_my_hashable_real_hash (GeeHashable* base);
+static gboolean functions_tests_my_hashable_real_equal_to (GeeHashable* base, FunctionsTestsMyHashable* hash);
+static void functions_tests_my_hashable_finalize (GObject* obj);
+
+
+static void _functions_tests_test_string_func_gee_test_case_test_method (gpointer self) {
+ functions_tests_test_string_func (self);
+}
+
+
+static void _functions_tests_test_int_func_gee_test_case_test_method (gpointer self) {
+ functions_tests_test_int_func (self);
+}
+
+
+static void _functions_tests_test_compare_func_gee_test_case_test_method (gpointer self) {
+ functions_tests_test_compare_func (self);
+}
+
+
+static void _functions_tests_test_hash_func_gee_test_case_test_method (gpointer self) {
+ functions_tests_test_hash_func (self);
+}
+
+
+static void _functions_tests_test_unfold_gee_test_case_test_method (gpointer self) {
+ functions_tests_test_unfold (self);
+}
+
+
+static void _functions_tests_test_concat_gee_test_case_test_method (gpointer self) {
+ functions_tests_test_concat (self);
+}
+
+
+FunctionsTests* functions_tests_construct (GType object_type) {
+ FunctionsTests * self = NULL;
+ self = (FunctionsTests*) gee_test_case_construct (object_type, "Functions");
+ gee_test_case_add_test ((GeeTestCase*) self, "[Functions] comparing and hashing strings", _functions_tests_test_string_func_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Functions] comparing and hashing int", _functions_tests_test_int_func_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Functions] comparing instances of Comparable", _functions_tests_test_compare_func_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Functions] comparing and hashing instances of Hashable", _functions_tests_test_hash_func_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Iterator] unfold", _functions_tests_test_unfold_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Iterator] concat", _functions_tests_test_concat_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ return self;
+}
+
+
+FunctionsTests* functions_tests_new (void) {
+ return functions_tests_construct (TYPE_FUNCTIONS_TESTS);
+}
+
+
+void functions_tests_test_string_func (FunctionsTests* self) {
+ gchar* _tmp0_;
+ gchar* one;
+ gchar* _tmp1_;
+ gchar* two;
+ gchar* _tmp2_ = NULL;
+ gchar* two_copy;
+ void* _tmp3_ = NULL;
+ GDestroyNotify _tmp4_ = NULL;
+ GeeEqualDataFunc _tmp5_ = NULL;
+ GeeEqualDataFunc eq;
+ void* eq_target;
+ GDestroyNotify eq_target_destroy_notify;
+ void* _tmp6_ = NULL;
+ GDestroyNotify _tmp7_ = NULL;
+ GCompareDataFunc _tmp8_ = NULL;
+ GCompareDataFunc cmp;
+ void* cmp_target;
+ GDestroyNotify cmp_target_destroy_notify;
+ void* _tmp9_ = NULL;
+ GDestroyNotify _tmp10_ = NULL;
+ GeeHashDataFunc _tmp11_ = NULL;
+ GeeHashDataFunc hash;
+ void* hash_target;
+ GDestroyNotify hash_target_destroy_notify;
+ gboolean _tmp12_ = FALSE;
+ gint _tmp13_ = 0;
+ guint _tmp14_ = 0U;
+ guint _tmp15_ = 0U;
+ gboolean _tmp16_ = FALSE;
+ gint _tmp17_ = 0;
+ guint _tmp18_ = 0U;
+ guint _tmp19_ = 0U;
+ gboolean _tmp20_ = FALSE;
+ gint _tmp21_ = 0;
+ gboolean _tmp22_ = FALSE;
+ gint _tmp23_ = 0;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = g_strdup ("one");
+ one = _tmp0_;
+ _tmp1_ = g_strdup ("two");
+ two = _tmp1_;
+ _tmp2_ = g_strdup (two);
+ two_copy = _tmp2_;
+ _tmp5_ = gee_functions_get_equal_func_for (G_TYPE_STRING, &_tmp3_, &_tmp4_);
+ eq = _tmp5_;
+ eq_target = _tmp3_;
+ eq_target_destroy_notify = _tmp4_;
+ _tmp8_ = gee_functions_get_compare_func_for (G_TYPE_STRING, &_tmp6_, &_tmp7_);
+ cmp = _tmp8_;
+ cmp_target = _tmp6_;
+ cmp_target_destroy_notify = _tmp7_;
+ _tmp11_ = gee_functions_get_hash_func_for (G_TYPE_STRING, &_tmp9_, &_tmp10_);
+ hash = _tmp11_;
+ hash_target = _tmp9_;
+ hash_target_destroy_notify = _tmp10_;
+ _vala_assert (eq != NULL, "eq != null");
+ _vala_assert (cmp != NULL, "cmp != null");
+ _vala_assert (hash != NULL, "hash != null");
+ _tmp12_ = eq (two, two, eq_target);
+ _vala_assert (_tmp12_, "eq (two, two)");
+ _tmp13_ = cmp (two, two, cmp_target);
+ _vala_assert (_tmp13_ == 0, "cmp (two, two) == 0");
+ _tmp14_ = hash (two, hash_target);
+ _tmp15_ = hash (two, hash_target);
+ _vala_assert (_tmp14_ == _tmp15_, "hash (two) == hash (two)");
+ _tmp16_ = eq (two, two_copy, eq_target);
+ _vala_assert (_tmp16_, "eq (two, two_copy)");
+ _tmp17_ = cmp (two, two_copy, cmp_target);
+ _vala_assert (_tmp17_ == 0, "cmp (two, two_copy) == 0");
+ _tmp18_ = hash (two, hash_target);
+ _tmp19_ = hash (two_copy, hash_target);
+ _vala_assert (_tmp18_ == _tmp19_, "hash (two) == hash (two_copy)");
+ _tmp20_ = eq (one, two, eq_target);
+ _vala_assert (!_tmp20_, "!eq (one, two)");
+ _tmp21_ = cmp (one, two, cmp_target);
+ _vala_assert (_tmp21_ < 0, "cmp (one, two) < 0");
+ _tmp22_ = eq (two, one, eq_target);
+ _vala_assert (!_tmp22_, "!eq (two, one)");
+ _tmp23_ = cmp (two, one, cmp_target);
+ _vala_assert (_tmp23_ > 0, "cmp (two, one) > 0");
+ (hash_target_destroy_notify == NULL) ? NULL : (hash_target_destroy_notify (hash_target), NULL);
+ hash = NULL;
+ hash_target = NULL;
+ hash_target_destroy_notify = NULL;
+ (cmp_target_destroy_notify == NULL) ? NULL : (cmp_target_destroy_notify (cmp_target), NULL);
+ cmp = NULL;
+ cmp_target = NULL;
+ cmp_target_destroy_notify = NULL;
+ (eq_target_destroy_notify == NULL) ? NULL : (eq_target_destroy_notify (eq_target), NULL);
+ eq = NULL;
+ eq_target = NULL;
+ eq_target_destroy_notify = NULL;
+ _g_free0 (two_copy);
+ _g_free0 (two);
+ _g_free0 (one);
+}
+
+
+void functions_tests_test_int_func (FunctionsTests* self) {
+ void* one;
+ void* two;
+ void* _tmp0_ = NULL;
+ GDestroyNotify _tmp1_ = NULL;
+ GeeEqualDataFunc _tmp2_ = NULL;
+ GeeEqualDataFunc eq;
+ void* eq_target;
+ GDestroyNotify eq_target_destroy_notify;
+ void* _tmp3_ = NULL;
+ GDestroyNotify _tmp4_ = NULL;
+ GCompareDataFunc _tmp5_ = NULL;
+ GCompareDataFunc cmp;
+ void* cmp_target;
+ GDestroyNotify cmp_target_destroy_notify;
+ void* _tmp6_ = NULL;
+ GDestroyNotify _tmp7_ = NULL;
+ GeeHashDataFunc _tmp8_ = NULL;
+ GeeHashDataFunc hash;
+ void* hash_target;
+ GDestroyNotify hash_target_destroy_notify;
+ gboolean _tmp9_ = FALSE;
+ gint _tmp10_ = 0;
+ guint _tmp11_ = 0U;
+ guint _tmp12_ = 0U;
+ gboolean _tmp13_ = FALSE;
+ gint _tmp14_ = 0;
+ gboolean _tmp15_ = FALSE;
+ gint _tmp16_ = 0;
+ g_return_if_fail (self != NULL);
+ one = (void*) 1;
+ two = (void*) 2;
+ _tmp2_ = gee_functions_get_equal_func_for (G_TYPE_INT, &_tmp0_, &_tmp1_);
+ eq = _tmp2_;
+ eq_target = _tmp0_;
+ eq_target_destroy_notify = _tmp1_;
+ _tmp5_ = gee_functions_get_compare_func_for (G_TYPE_INT, &_tmp3_, &_tmp4_);
+ cmp = _tmp5_;
+ cmp_target = _tmp3_;
+ cmp_target_destroy_notify = _tmp4_;
+ _tmp8_ = gee_functions_get_hash_func_for (G_TYPE_INT, &_tmp6_, &_tmp7_);
+ hash = _tmp8_;
+ hash_target = _tmp6_;
+ hash_target_destroy_notify = _tmp7_;
+ _vala_assert (eq != NULL, "eq != null");
+ _vala_assert (cmp != NULL, "cmp != null");
+ _vala_assert (hash != NULL, "hash != null");
+ _tmp9_ = eq (two, two, eq_target);
+ _vala_assert (_tmp9_, "eq (two, two)");
+ _tmp10_ = cmp (two, two, cmp_target);
+ _vala_assert (_tmp10_ == 0, "cmp (two, two) == 0");
+ _tmp11_ = hash (two, hash_target);
+ _tmp12_ = hash (two, hash_target);
+ _vala_assert (_tmp11_ == _tmp12_, "hash (two) == hash (two)");
+ _tmp13_ = eq (one, two, eq_target);
+ _vala_assert (!_tmp13_, "!eq (one, two)");
+ _tmp14_ = cmp (one, two, cmp_target);
+ _vala_assert (_tmp14_ < 0, "cmp (one, two) < 0");
+ _tmp15_ = eq (two, one, eq_target);
+ _vala_assert (!_tmp15_, "!eq (two, one)");
+ _tmp16_ = cmp (two, one, cmp_target);
+ _vala_assert (_tmp16_ > 0, "cmp (two, one) > 0");
+ (hash_target_destroy_notify == NULL) ? NULL : (hash_target_destroy_notify (hash_target), NULL);
+ hash = NULL;
+ hash_target = NULL;
+ hash_target_destroy_notify = NULL;
+ (cmp_target_destroy_notify == NULL) ? NULL : (cmp_target_destroy_notify (cmp_target), NULL);
+ cmp = NULL;
+ cmp_target = NULL;
+ cmp_target_destroy_notify = NULL;
+ (eq_target_destroy_notify == NULL) ? NULL : (eq_target_destroy_notify (eq_target), NULL);
+ eq = NULL;
+ eq_target = NULL;
+ eq_target_destroy_notify = NULL;
+}
+
+
+void functions_tests_test_compare_func (FunctionsTests* self) {
+ FunctionsTestsMyComparable* _tmp0_;
+ FunctionsTestsMyComparable* two;
+ FunctionsTestsMyComparable* _tmp1_;
+ FunctionsTestsMyComparable* one;
+ FunctionsTestsMyComparable* _tmp2_;
+ FunctionsTestsMyComparable* two_copy;
+ void* _tmp3_ = NULL;
+ GDestroyNotify _tmp4_ = NULL;
+ GeeEqualDataFunc _tmp5_ = NULL;
+ GeeEqualDataFunc eq;
+ void* eq_target;
+ GDestroyNotify eq_target_destroy_notify;
+ void* _tmp6_ = NULL;
+ GDestroyNotify _tmp7_ = NULL;
+ GCompareDataFunc _tmp8_ = NULL;
+ GCompareDataFunc cmp;
+ void* cmp_target;
+ GDestroyNotify cmp_target_destroy_notify;
+ gboolean _tmp9_ = FALSE;
+ gint _tmp10_ = 0;
+ gboolean _tmp11_ = FALSE;
+ gint _tmp12_ = 0;
+ gboolean _tmp13_ = FALSE;
+ gint _tmp14_ = 0;
+ gboolean _tmp15_ = FALSE;
+ gint _tmp16_ = 0;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = functions_tests_my_comparable_new (2);
+ two = _tmp0_;
+ _tmp1_ = functions_tests_my_comparable_new (1);
+ one = _tmp1_;
+ _tmp2_ = functions_tests_my_comparable_new (2);
+ two_copy = _tmp2_;
+ _tmp5_ = gee_functions_get_equal_func_for (FUNCTIONS_TESTS_TYPE_MY_COMPARABLE, &_tmp3_, &_tmp4_);
+ eq = _tmp5_;
+ eq_target = _tmp3_;
+ eq_target_destroy_notify = _tmp4_;
+ _tmp8_ = gee_functions_get_compare_func_for (FUNCTIONS_TESTS_TYPE_MY_COMPARABLE, &_tmp6_, &_tmp7_);
+ cmp = _tmp8_;
+ cmp_target = _tmp6_;
+ cmp_target_destroy_notify = _tmp7_;
+ _vala_assert (eq != NULL, "eq != null");
+ _vala_assert (cmp != NULL, "cmp != null");
+ _tmp9_ = eq (two, two, eq_target);
+ _vala_assert (_tmp9_, "eq (two, two)");
+ _tmp10_ = cmp (two, two, cmp_target);
+ _vala_assert (_tmp10_ == 0, "cmp (two, two) == 0");
+ _tmp11_ = eq (two, two_copy, eq_target);
+ _vala_assert (_tmp11_, "eq (two, two_copy)");
+ _tmp12_ = cmp (two, two_copy, cmp_target);
+ _vala_assert (_tmp12_ == 0, "cmp (two, two_copy) == 0");
+ _tmp13_ = eq (one, two, eq_target);
+ _vala_assert (!_tmp13_, "!eq (one, two)");
+ _tmp14_ = cmp (one, two, cmp_target);
+ _vala_assert (_tmp14_ < 0, "cmp (one, two) < 0");
+ _tmp15_ = eq (two, one, eq_target);
+ _vala_assert (!_tmp15_, "!eq (two, one)");
+ _tmp16_ = cmp (two, one, cmp_target);
+ _vala_assert (_tmp16_ > 0, "cmp (two, one) > 0");
+ (cmp_target_destroy_notify == NULL) ? NULL : (cmp_target_destroy_notify (cmp_target), NULL);
+ cmp = NULL;
+ cmp_target = NULL;
+ cmp_target_destroy_notify = NULL;
+ (eq_target_destroy_notify == NULL) ? NULL : (eq_target_destroy_notify (eq_target), NULL);
+ eq = NULL;
+ eq_target = NULL;
+ eq_target_destroy_notify = NULL;
+ _g_object_unref0 (two_copy);
+ _g_object_unref0 (one);
+ _g_object_unref0 (two);
+}
+
+
+void functions_tests_test_hash_func (FunctionsTests* self) {
+ FunctionsTestsMyHashable* _tmp0_;
+ FunctionsTestsMyHashable* two;
+ FunctionsTestsMyHashable* _tmp1_;
+ FunctionsTestsMyHashable* one;
+ FunctionsTestsMyHashable* _tmp2_;
+ FunctionsTestsMyHashable* two_copy;
+ FunctionsTestsMyHashable* _tmp3_;
+ FunctionsTestsMyHashable* minus_one;
+ FunctionsTestsMyHashable* _tmp4_;
+ FunctionsTestsMyHashable* minus_one2;
+ void* _tmp5_ = NULL;
+ GDestroyNotify _tmp6_ = NULL;
+ GeeEqualDataFunc _tmp7_ = NULL;
+ GeeEqualDataFunc eq;
+ void* eq_target;
+ GDestroyNotify eq_target_destroy_notify;
+ void* _tmp8_ = NULL;
+ GDestroyNotify _tmp9_ = NULL;
+ GCompareDataFunc _tmp10_ = NULL;
+ GCompareDataFunc cmp;
+ void* cmp_target;
+ GDestroyNotify cmp_target_destroy_notify;
+ void* _tmp11_ = NULL;
+ GDestroyNotify _tmp12_ = NULL;
+ GeeHashDataFunc _tmp13_ = NULL;
+ GeeHashDataFunc hash;
+ void* hash_target;
+ GDestroyNotify hash_target_destroy_notify;
+ gboolean _tmp14_ = FALSE;
+ gint _tmp15_ = 0;
+ guint _tmp16_ = 0U;
+ guint _tmp17_ = 0U;
+ gboolean _tmp18_ = FALSE;
+ gint _tmp19_ = 0;
+ guint _tmp20_ = 0U;
+ guint _tmp21_ = 0U;
+ gboolean _tmp22_ = FALSE;
+ gint _tmp23_ = 0;
+ gboolean _tmp24_ = FALSE;
+ gint _tmp25_ = 0;
+ guint _tmp26_ = 0U;
+ gboolean _tmp27_ = FALSE;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = functions_tests_my_hashable_new (2);
+ two = _tmp0_;
+ _tmp1_ = functions_tests_my_hashable_new (1);
+ one = _tmp1_;
+ _tmp2_ = functions_tests_my_hashable_new (2);
+ two_copy = _tmp2_;
+ _tmp3_ = functions_tests_my_hashable_new (-1);
+ minus_one = _tmp3_;
+ _tmp4_ = functions_tests_my_hashable_new (-1);
+ minus_one2 = _tmp4_;
+ _tmp7_ = gee_functions_get_equal_func_for (FUNCTIONS_TESTS_TYPE_MY_HASHABLE, &_tmp5_, &_tmp6_);
+ eq = _tmp7_;
+ eq_target = _tmp5_;
+ eq_target_destroy_notify = _tmp6_;
+ _tmp10_ = gee_functions_get_compare_func_for (FUNCTIONS_TESTS_TYPE_MY_HASHABLE, &_tmp8_, &_tmp9_);
+ cmp = _tmp10_;
+ cmp_target = _tmp8_;
+ cmp_target_destroy_notify = _tmp9_;
+ _tmp13_ = gee_functions_get_hash_func_for (FUNCTIONS_TESTS_TYPE_MY_HASHABLE, &_tmp11_, &_tmp12_);
+ hash = _tmp13_;
+ hash_target = _tmp11_;
+ hash_target_destroy_notify = _tmp12_;
+ _vala_assert (eq != NULL, "eq != null");
+ _vala_assert (cmp != NULL, "cmp != null");
+ _vala_assert (hash != NULL, "hash != null");
+ _tmp14_ = eq (two, two, eq_target);
+ _vala_assert (_tmp14_, "eq (two, two)");
+ _tmp15_ = cmp (two, two, cmp_target);
+ _vala_assert (_tmp15_ == 0, "cmp (two, two) == 0");
+ _tmp16_ = hash (two, hash_target);
+ _tmp17_ = hash (two, hash_target);
+ _vala_assert (_tmp16_ == _tmp17_, "hash (two) == hash (two)");
+ _tmp18_ = eq (two, two_copy, eq_target);
+ _vala_assert (_tmp18_, "eq (two, two_copy)");
+ _tmp19_ = cmp (two, two_copy, cmp_target);
+ _vala_assert (_tmp19_ == 0, "cmp (two, two_copy) == 0");
+ _tmp20_ = hash (two, hash_target);
+ _tmp21_ = hash (two_copy, hash_target);
+ _vala_assert (_tmp20_ == _tmp21_, "hash (two) == hash (two_copy)");
+ _tmp22_ = eq (one, two, eq_target);
+ _vala_assert (!_tmp22_, "!eq (one, two)");
+ _tmp23_ = cmp (one, two, cmp_target);
+ _vala_assert (_tmp23_ < 0, "cmp (one, two) < 0");
+ _tmp24_ = eq (two, one, eq_target);
+ _vala_assert (!_tmp24_, "!eq (two, one)");
+ _tmp25_ = cmp (two, one, cmp_target);
+ _vala_assert (_tmp25_ > 0, "cmp (two, one) > 0");
+ _tmp26_ = hash (one, hash_target);
+ _vala_assert (_tmp26_ == ((guint) 1), "hash (one) == 1");
+ _tmp27_ = eq (minus_one, minus_one2, eq_target);
+ _vala_assert (!_tmp27_, "!eq (minus_one, minus_one2)");
+ (hash_target_destroy_notify == NULL) ? NULL : (hash_target_destroy_notify (hash_target), NULL);
+ hash = NULL;
+ hash_target = NULL;
+ hash_target_destroy_notify = NULL;
+ (cmp_target_destroy_notify == NULL) ? NULL : (cmp_target_destroy_notify (cmp_target), NULL);
+ cmp = NULL;
+ cmp_target = NULL;
+ cmp_target_destroy_notify = NULL;
+ (eq_target_destroy_notify == NULL) ? NULL : (eq_target_destroy_notify (eq_target), NULL);
+ eq = NULL;
+ eq_target = NULL;
+ eq_target_destroy_notify = NULL;
+ _g_object_unref0 (minus_one2);
+ _g_object_unref0 (minus_one);
+ _g_object_unref0 (two_copy);
+ _g_object_unref0 (one);
+ _g_object_unref0 (two);
+}
+
+
+static Block5Data* block5_data_ref (Block5Data* _data5_) {
+ g_atomic_int_inc (&_data5_->_ref_count_);
+ return _data5_;
+}
+
+
+static void block5_data_unref (void * _userdata_) {
+ Block5Data* _data5_;
+ _data5_ = (Block5Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
+ FunctionsTests * self;
+ self = _data5_->self;
+ _g_object_unref0 (self);
+ g_slice_free (Block5Data, _data5_);
+ }
+}
+
+
+static Block6Data* block6_data_ref (Block6Data* _data6_) {
+ g_atomic_int_inc (&_data6_->_ref_count_);
+ return _data6_;
+}
+
+
+static void block6_data_unref (void * _userdata_) {
+ Block6Data* _data6_;
+ _data6_ = (Block6Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
+ FunctionsTests * self;
+ self = _data6_->_data5_->self;
+ block5_data_unref (_data6_->_data5_);
+ _data6_->_data5_ = NULL;
+ g_slice_free (Block6Data, _data6_);
+ }
+}
+
+
+static gint __lambda20_ (Block6Data* _data6_) {
+ Block5Data* _data5_;
+ FunctionsTests * self;
+ gint result = 0;
+ gint _tmp0_;
+ gint _tmp1_;
+ gint _tmp2_;
+ gint _tmp3_;
+ _data5_ = _data6_->_data5_;
+ self = _data5_->self;
+ _tmp0_ = _data6_->k;
+ _tmp1_ = _data5_->i;
+ _vala_assert ((_tmp0_ + 1) == _tmp1_, "k + 1 == i");
+ _tmp2_ = _data6_->k;
+ _data5_->j = _tmp2_;
+ _tmp3_ = _data6_->k;
+ result = _tmp3_;
+ return result;
+}
+
+
+static gpointer ___lambda20__gee_lazy_func (gpointer self) {
+ gpointer result;
+ result = __lambda20_ (self);
+ return result;
+}
+
+
+static GeeLazy* __lambda19_ (Block5Data* _data5_) {
+ FunctionsTests * self;
+ GeeLazy* result = NULL;
+ Block6Data* _data6_;
+ gint _tmp0_;
+ gint _tmp1_;
+ gint _tmp2_;
+ gint _tmp3_;
+ GeeLazy* _tmp4_;
+ self = _data5_->self;
+ _data6_ = g_slice_new0 (Block6Data);
+ _data6_->_ref_count_ = 1;
+ _data6_->_data5_ = block5_data_ref (_data5_);
+ _tmp0_ = _data5_->j;
+ _tmp1_ = _data5_->i;
+ _vala_assert ((_tmp0_ + 1) == _tmp1_, "j + 1 == i");
+ _tmp2_ = _data5_->i;
+ if (_tmp2_ == 10) {
+ result = NULL;
+ block6_data_unref (_data6_);
+ _data6_ = NULL;
+ return result;
+ }
+ _tmp3_ = _data5_->i;
+ _data5_->i = _tmp3_ + 1;
+ _data6_->k = _tmp3_;
+ _tmp4_ = gee_lazy_new (G_TYPE_INT, NULL, NULL, ___lambda20__gee_lazy_func, block6_data_ref (_data6_), block6_data_unref);
+ result = _tmp4_;
+ block6_data_unref (_data6_);
+ _data6_ = NULL;
+ return result;
+}
+
+
+static GeeLazy* ___lambda19__gee_unfold_func (gpointer self) {
+ GeeLazy* result;
+ result = __lambda19_ (self);
+ return result;
+}
+
+
+void functions_tests_test_unfold (FunctionsTests* self) {
+ Block5Data* _data5_;
+ GeeIterator* _tmp0_ = NULL;
+ GeeIterator* iter;
+ gint k;
+ gint _tmp10_;
+ g_return_if_fail (self != NULL);
+ _data5_ = g_slice_new0 (Block5Data);
+ _data5_->_ref_count_ = 1;
+ _data5_->self = g_object_ref (self);
+ _data5_->i = 0;
+ _data5_->j = -1;
+ _tmp0_ = gee_iterator_unfold (G_TYPE_INT, NULL, NULL, ___lambda19__gee_unfold_func, block5_data_ref (_data5_), block5_data_unref, NULL);
+ iter = _tmp0_;
+ k = 0;
+ while (TRUE) {
+ GeeIterator* _tmp1_;
+ gboolean _tmp2_ = FALSE;
+ GeeIterator* _tmp3_;
+ gpointer _tmp4_ = NULL;
+ gint _tmp5_;
+ GeeIterator* _tmp6_;
+ gpointer _tmp7_ = NULL;
+ gint _tmp8_;
+ gint _tmp9_;
+ _tmp1_ = iter;
+ _tmp2_ = gee_iterator_next (_tmp1_);
+ if (!_tmp2_) {
+ break;
+ }
+ _tmp3_ = iter;
+ _tmp4_ = gee_iterator_get (_tmp3_);
+ _tmp5_ = k;
+ _vala_assert (((gint) ((gintptr) _tmp4_)) == _tmp5_, "iter.get () == k");
+ _tmp6_ = iter;
+ _tmp7_ = gee_iterator_get (_tmp6_);
+ _tmp8_ = k;
+ _vala_assert (((gint) ((gintptr) _tmp7_)) == _tmp8_, "iter.get () == k");
+ _tmp9_ = k;
+ k = _tmp9_ + 1;
+ }
+ _tmp10_ = k;
+ _vala_assert (_tmp10_ == 10, "k == 10");
+ _g_object_unref0 (iter);
+ block5_data_unref (_data5_);
+ _data5_ = NULL;
+}
+
+
+static Block7Data* block7_data_ref (Block7Data* _data7_) {
+ g_atomic_int_inc (&_data7_->_ref_count_);
+ return _data7_;
+}
+
+
+static void block7_data_unref (void * _userdata_) {
+ Block7Data* _data7_;
+ _data7_ = (Block7Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
+ FunctionsTests * self;
+ self = _data7_->self;
+ _g_object_unref0 (self);
+ g_slice_free (Block7Data, _data7_);
+ }
+}
+
+
+static Block8Data* block8_data_ref (Block8Data* _data8_) {
+ g_atomic_int_inc (&_data8_->_ref_count_);
+ return _data8_;
+}
+
+
+static void block8_data_unref (void * _userdata_) {
+ Block8Data* _data8_;
+ _data8_ = (Block8Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
+ FunctionsTests * self;
+ self = _data8_->_data7_->self;
+ block7_data_unref (_data8_->_data7_);
+ _data8_->_data7_ = NULL;
+ g_slice_free (Block8Data, _data8_);
+ }
+}
+
+
+static GeeLazy* __lambda22_ (Block8Data* _data8_) {
+ Block7Data* _data7_;
+ FunctionsTests * self;
+ GeeLazy* result = NULL;
+ gint _tmp0_;
+ gint _tmp1_;
+ gint _tmp2_;
+ GeeLazy* _tmp3_;
+ _data7_ = _data8_->_data7_;
+ self = _data7_->self;
+ _tmp0_ = _data8_->j;
+ _tmp1_ = _data8_->start;
+ if (_tmp0_ == (_tmp1_ + 3)) {
+ result = NULL;
+ return result;
+ }
+ _tmp2_ = _data8_->j;
+ _data8_->j = _tmp2_ + 1;
+ _tmp3_ = gee_lazy_new_from_value (G_TYPE_INT, NULL, NULL, (gpointer) ((gintptr) _tmp2_));
+ result = _tmp3_;
+ return result;
+}
+
+
+static GeeLazy* ___lambda22__gee_unfold_func (gpointer self) {
+ GeeLazy* result;
+ result = __lambda22_ (self);
+ return result;
+}
+
+
+static GeeLazy* __lambda21_ (Block7Data* _data7_) {
+ FunctionsTests * self;
+ GeeLazy* result = NULL;
+ Block8Data* _data8_;
+ gint _tmp0_;
+ gint _tmp1_;
+ gint _tmp2_;
+ GeeIterator* _tmp3_ = NULL;
+ GeeIterator* iter;
+ GeeIterator* _tmp4_;
+ GeeLazy* _tmp5_;
+ self = _data7_->self;
+ _data8_ = g_slice_new0 (Block8Data);
+ _data8_->_ref_count_ = 1;
+ _data8_->_data7_ = block7_data_ref (_data7_);
+ _tmp0_ = _data7_->i;
+ if (_tmp0_ >= 3) {
+ result = NULL;
+ block8_data_unref (_data8_);
+ _data8_ = NULL;
+ return result;
+ }
+ _tmp1_ = _data7_->i;
+ _data7_->i = _tmp1_ + 1;
+ _data8_->j = _tmp1_ * 3;
+ _tmp2_ = _data8_->j;
+ _data8_->start = _tmp2_;
+ _tmp3_ = gee_iterator_unfold (G_TYPE_INT, NULL, NULL, ___lambda22__gee_unfold_func, block8_data_ref (_data8_), block8_data_unref, NULL);
+ iter = _tmp3_;
+ _tmp4_ = iter;
+ _tmp5_ = gee_lazy_new_from_value (GEE_TYPE_ITERATOR, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp4_);
+ result = _tmp5_;
+ _g_object_unref0 (iter);
+ block8_data_unref (_data8_);
+ _data8_ = NULL;
+ return result;
+}
+
+
+static GeeLazy* ___lambda21__gee_unfold_func (gpointer self) {
+ GeeLazy* result;
+ result = __lambda21_ (self);
+ return result;
+}
+
+
+void functions_tests_test_concat (FunctionsTests* self) {
+ Block7Data* _data7_;
+ GeeIterator* _tmp0_ = NULL;
+ GeeIterator* iter_;
+ gint j;
+ GeeIterator* _tmp1_;
+ GeeIterator* _tmp2_ = NULL;
+ GeeIterator* iter;
+ gint _tmp12_;
+ gint _tmp13_;
+ g_return_if_fail (self != NULL);
+ _data7_ = g_slice_new0 (Block7Data);
+ _data7_->_ref_count_ = 1;
+ _data7_->self = g_object_ref (self);
+ _data7_->i = 0;
+ _tmp0_ = gee_iterator_unfold (GEE_TYPE_ITERATOR, (GBoxedCopyFunc) g_object_ref, g_object_unref, ___lambda21__gee_unfold_func, block7_data_ref (_data7_), block7_data_unref, NULL);
+ iter_ = _tmp0_;
+ j = 0;
+ _tmp1_ = iter_;
+ _tmp2_ = gee_iterator_concat (G_TYPE_INT, NULL, NULL, _tmp1_);
+ iter = _tmp2_;
+ while (TRUE) {
+ GeeIterator* _tmp3_;
+ gboolean _tmp4_ = FALSE;
+ gint _tmp5_;
+ GeeIterator* _tmp6_;
+ gpointer _tmp7_ = NULL;
+ gint _tmp8_;
+ GeeIterator* _tmp9_;
+ gpointer _tmp10_ = NULL;
+ gint _tmp11_;
+ _tmp3_ = iter;
+ _tmp4_ = gee_iterator_next (_tmp3_);
+ if (!_tmp4_) {
+ break;
+ }
+ _tmp5_ = j;
+ _tmp6_ = iter;
+ _tmp7_ = gee_iterator_get (_tmp6_);
+ _vala_assert (_tmp5_ == ((gint) ((gintptr) _tmp7_)), "j == iter.get ()");
+ _tmp8_ = j;
+ _tmp9_ = iter;
+ _tmp10_ = gee_iterator_get (_tmp9_);
+ _vala_assert (_tmp8_ == ((gint) ((gintptr) _tmp10_)), "j == iter.get ()");
+ _tmp11_ = j;
+ j = _tmp11_ + 1;
+ }
+ _tmp12_ = _data7_->i;
+ _vala_assert (_tmp12_ == 3, "i == 3");
+ _tmp13_ = j;
+ _vala_assert (_tmp13_ == 9, "j == 9");
+ _g_object_unref0 (iter);
+ _g_object_unref0 (iter_);
+ block7_data_unref (_data7_);
+ _data7_ = NULL;
+}
+
+
+static FunctionsTestsMyComparable* functions_tests_my_comparable_construct (GType object_type, gint i) {
+ FunctionsTestsMyComparable * self = NULL;
+ gint _tmp0_;
+ self = (FunctionsTestsMyComparable*) g_object_new (object_type, NULL);
+ _tmp0_ = i;
+ self->priv->i = _tmp0_;
+ return self;
+}
+
+
+static FunctionsTestsMyComparable* functions_tests_my_comparable_new (gint i) {
+ return functions_tests_my_comparable_construct (FUNCTIONS_TESTS_TYPE_MY_COMPARABLE, i);
+}
+
+
+static gint functions_tests_my_comparable_real_compare_to (GeeComparable* base, FunctionsTestsMyComparable* cmp) {
+ FunctionsTestsMyComparable * self;
+ gint result = 0;
+ gint _tmp0_;
+ FunctionsTestsMyComparable* _tmp1_;
+ gint _tmp2_;
+ self = (FunctionsTestsMyComparable*) base;
+ g_return_val_if_fail (cmp != NULL, 0);
+ _tmp0_ = self->priv->i;
+ _tmp1_ = cmp;
+ _tmp2_ = _tmp1_->priv->i;
+ if (_tmp0_ == _tmp2_) {
+ result = 0;
+ return result;
+ } else {
+ gint _tmp3_;
+ FunctionsTestsMyComparable* _tmp4_;
+ gint _tmp5_;
+ _tmp3_ = self->priv->i;
+ _tmp4_ = cmp;
+ _tmp5_ = _tmp4_->priv->i;
+ if (_tmp3_ >= _tmp5_) {
+ result = 1;
+ return result;
+ } else {
+ result = -1;
+ return result;
+ }
+ }
+}
+
+
+static void functions_tests_my_comparable_class_init (FunctionsTestsMyComparableClass * klass) {
+ functions_tests_my_comparable_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (FunctionsTestsMyComparablePrivate));
+ G_OBJECT_CLASS (klass)->finalize = functions_tests_my_comparable_finalize;
+}
+
+
+static void functions_tests_my_comparable_gee_comparable_interface_init (GeeComparableIface * iface) {
+ functions_tests_my_comparable_gee_comparable_parent_iface = g_type_interface_peek_parent (iface);
+ iface->compare_to = (gint (*)(GeeComparable*, gconstpointer)) functions_tests_my_comparable_real_compare_to;
+}
+
+
+static void functions_tests_my_comparable_instance_init (FunctionsTestsMyComparable * self) {
+ self->priv = FUNCTIONS_TESTS_MY_COMPARABLE_GET_PRIVATE (self);
+}
+
+
+static void functions_tests_my_comparable_finalize (GObject* obj) {
+ FunctionsTestsMyComparable * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, FUNCTIONS_TESTS_TYPE_MY_COMPARABLE, FunctionsTestsMyComparable);
+ G_OBJECT_CLASS (functions_tests_my_comparable_parent_class)->finalize (obj);
+}
+
+
+static GType functions_tests_my_comparable_get_type (void) {
+ static volatile gsize functions_tests_my_comparable_type_id__volatile = 0;
+ if (g_once_init_enter (&functions_tests_my_comparable_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (FunctionsTestsMyComparableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) functions_tests_my_comparable_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FunctionsTestsMyComparable), 0, (GInstanceInitFunc) functions_tests_my_comparable_instance_init, NULL };
+ static const GInterfaceInfo gee_comparable_info = { (GInterfaceInitFunc) functions_tests_my_comparable_gee_comparable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+ GType functions_tests_my_comparable_type_id;
+ functions_tests_my_comparable_type_id = g_type_register_static (G_TYPE_OBJECT, "FunctionsTestsMyComparable", &g_define_type_info, 0);
+ g_type_add_interface_static (functions_tests_my_comparable_type_id, GEE_TYPE_COMPARABLE, &gee_comparable_info);
+ g_once_init_leave (&functions_tests_my_comparable_type_id__volatile, functions_tests_my_comparable_type_id);
+ }
+ return functions_tests_my_comparable_type_id__volatile;
+}
+
+
+static FunctionsTestsMyHashable* functions_tests_my_hashable_construct (GType object_type, gint i) {
+ FunctionsTestsMyHashable * self = NULL;
+ gint _tmp0_;
+ self = (FunctionsTestsMyHashable*) g_object_new (object_type, NULL);
+ _tmp0_ = i;
+ self->priv->i = _tmp0_;
+ return self;
+}
+
+
+static FunctionsTestsMyHashable* functions_tests_my_hashable_new (gint i) {
+ return functions_tests_my_hashable_construct (FUNCTIONS_TESTS_TYPE_MY_HASHABLE, i);
+}
+
+
+static gint functions_tests_my_hashable_real_compare_to (GeeComparable* base, FunctionsTestsMyHashable* cmp) {
+ FunctionsTestsMyHashable * self;
+ gint result = 0;
+ gint _tmp0_;
+ FunctionsTestsMyHashable* _tmp1_;
+ gint _tmp2_;
+ self = (FunctionsTestsMyHashable*) base;
+ g_return_val_if_fail (cmp != NULL, 0);
+ _tmp0_ = self->priv->i;
+ _tmp1_ = cmp;
+ _tmp2_ = _tmp1_->priv->i;
+ if (_tmp0_ == _tmp2_) {
+ result = 0;
+ return result;
+ } else {
+ gint _tmp3_;
+ FunctionsTestsMyHashable* _tmp4_;
+ gint _tmp5_;
+ _tmp3_ = self->priv->i;
+ _tmp4_ = cmp;
+ _tmp5_ = _tmp4_->priv->i;
+ if (_tmp3_ >= _tmp5_) {
+ result = 1;
+ return result;
+ } else {
+ result = -1;
+ return result;
+ }
+ }
+}
+
+
+static guint functions_tests_my_hashable_real_hash (GeeHashable* base) {
+ FunctionsTestsMyHashable * self;
+ guint result = 0U;
+ gint _tmp0_;
+ self = (FunctionsTestsMyHashable*) base;
+ _tmp0_ = self->priv->i;
+ result = (guint) _tmp0_;
+ return result;
+}
+
+
+static gboolean functions_tests_my_hashable_real_equal_to (GeeHashable* base, FunctionsTestsMyHashable* hash) {
+ FunctionsTestsMyHashable * self;
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+ gint _tmp1_;
+ FunctionsTestsMyHashable* _tmp2_;
+ gint _tmp3_;
+ gboolean _tmp5_;
+ self = (FunctionsTestsMyHashable*) base;
+ g_return_val_if_fail (hash != NULL, FALSE);
+ _tmp1_ = self->priv->i;
+ _tmp2_ = hash;
+ _tmp3_ = _tmp2_->priv->i;
+ if (_tmp1_ == _tmp3_) {
+ gint _tmp4_;
+ _tmp4_ = self->priv->i;
+ _tmp0_ = _tmp4_ != (-1);
+ } else {
+ _tmp0_ = FALSE;
+ }
+ _tmp5_ = _tmp0_;
+ result = _tmp5_;
+ return result;
+}
+
+
+static void functions_tests_my_hashable_class_init (FunctionsTestsMyHashableClass * klass) {
+ functions_tests_my_hashable_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (FunctionsTestsMyHashablePrivate));
+ G_OBJECT_CLASS (klass)->finalize = functions_tests_my_hashable_finalize;
+}
+
+
+static void functions_tests_my_hashable_gee_comparable_interface_init (GeeComparableIface * iface) {
+ functions_tests_my_hashable_gee_comparable_parent_iface = g_type_interface_peek_parent (iface);
+ iface->compare_to = (gint (*)(GeeComparable*, gconstpointer)) functions_tests_my_hashable_real_compare_to;
+}
+
+
+static void functions_tests_my_hashable_gee_hashable_interface_init (GeeHashableIface * iface) {
+ functions_tests_my_hashable_gee_hashable_parent_iface = g_type_interface_peek_parent (iface);
+ iface->hash = (guint (*)(GeeHashable*)) functions_tests_my_hashable_real_hash;
+ iface->equal_to = (gboolean (*)(GeeHashable*, gconstpointer)) functions_tests_my_hashable_real_equal_to;
+}
+
+
+static void functions_tests_my_hashable_instance_init (FunctionsTestsMyHashable * self) {
+ self->priv = FUNCTIONS_TESTS_MY_HASHABLE_GET_PRIVATE (self);
+}
+
+
+static void functions_tests_my_hashable_finalize (GObject* obj) {
+ FunctionsTestsMyHashable * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, FUNCTIONS_TESTS_TYPE_MY_HASHABLE, FunctionsTestsMyHashable);
+ G_OBJECT_CLASS (functions_tests_my_hashable_parent_class)->finalize (obj);
+}
+
+
+static GType functions_tests_my_hashable_get_type (void) {
+ static volatile gsize functions_tests_my_hashable_type_id__volatile = 0;
+ if (g_once_init_enter (&functions_tests_my_hashable_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (FunctionsTestsMyHashableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) functions_tests_my_hashable_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FunctionsTestsMyHashable), 0, (GInstanceInitFunc) functions_tests_my_hashable_instance_init, NULL };
+ static const GInterfaceInfo gee_comparable_info = { (GInterfaceInitFunc) functions_tests_my_hashable_gee_comparable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+ static const GInterfaceInfo gee_hashable_info = { (GInterfaceInitFunc) functions_tests_my_hashable_gee_hashable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+ GType functions_tests_my_hashable_type_id;
+ functions_tests_my_hashable_type_id = g_type_register_static (G_TYPE_OBJECT, "FunctionsTestsMyHashable", &g_define_type_info, 0);
+ g_type_add_interface_static (functions_tests_my_hashable_type_id, GEE_TYPE_COMPARABLE, &gee_comparable_info);
+ g_type_add_interface_static (functions_tests_my_hashable_type_id, GEE_TYPE_HASHABLE, &gee_hashable_info);
+ g_once_init_leave (&functions_tests_my_hashable_type_id__volatile, functions_tests_my_hashable_type_id);
+ }
+ return functions_tests_my_hashable_type_id__volatile;
+}
+
+
+static void functions_tests_class_init (FunctionsTestsClass * klass) {
+ functions_tests_parent_class = g_type_class_peek_parent (klass);
+}
+
+
+static void functions_tests_instance_init (FunctionsTests * self) {
+}
+
+
+GType functions_tests_get_type (void) {
+ static volatile gsize functions_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&functions_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (FunctionsTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) functions_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FunctionsTests), 0, (GInstanceInitFunc) functions_tests_instance_init, NULL };
+ GType functions_tests_type_id;
+ functions_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "FunctionsTests", &g_define_type_info, 0);
+ g_once_init_leave (&functions_tests_type_id__volatile, functions_tests_type_id);
+ }
+ return functions_tests_type_id__volatile;
+}
+
+
+
diff --git a/tests/testfunctions.vala b/tests/testfunctions.vala
new file mode 100644
index 0000000..1fff514
--- /dev/null
+++ b/tests/testfunctions.vala
@@ -0,0 +1,238 @@
+/* testfunctions.vala
+ *
+ * Copyright (C) 2010 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+public class FunctionsTests : Gee.TestCase {
+ public FunctionsTests () {
+ base ("Functions");
+ add_test ("[Functions] comparing and hashing strings", test_string_func);
+ add_test ("[Functions] comparing and hashing int", test_int_func);
+ add_test ("[Functions] comparing instances of Comparable", test_compare_func);
+ add_test ("[Functions] comparing and hashing instances of Hashable", test_hash_func);
+ add_test ("[Iterator] unfold", test_unfold);
+ add_test ("[Iterator] concat", test_concat);
+ }
+
+ public void test_string_func () {
+ string one = "one";
+ string two = "two";
+ string two_copy = two.dup ();
+
+ Gee.EqualDataFunc eq = Gee.Functions.get_equal_func_for (typeof (string));
+ CompareDataFunc cmp = Gee.Functions.get_compare_func_for (typeof (string));
+ Gee.HashDataFunc hash = Gee.Functions.get_hash_func_for (typeof (string));
+ assert (eq != null);
+ assert (cmp != null);
+ assert (hash != null);
+
+ assert (eq (two, two));
+ assert (cmp (two, two) == 0);
+ assert (hash (two) == hash (two));
+
+ assert (eq (two, two_copy));
+ assert (cmp (two, two_copy) == 0);
+ assert (hash (two) == hash (two_copy));
+
+ assert (!eq (one, two));
+ assert (cmp (one, two) < 0);
+
+ assert (!eq (two, one));
+ assert (cmp (two, one) > 0);
+ }
+
+ public void test_int_func () {
+ void *one = (void *)1;
+ void *two = (void *)2;
+
+ Gee.EqualDataFunc eq = Gee.Functions.get_equal_func_for (typeof (int));
+ CompareDataFunc cmp = Gee.Functions.get_compare_func_for (typeof (int));
+ Gee.HashDataFunc hash = Gee.Functions.get_hash_func_for (typeof (int));
+
+ assert (eq != null);
+ assert (cmp != null);
+ assert (hash != null);
+
+ assert (eq (two, two));
+ assert (cmp (two, two) == 0);
+ assert (hash (two) == hash (two));
+
+ assert (!eq (one, two));
+ assert (cmp (one, two) < 0);
+
+ assert (!eq (two, one));
+ assert (cmp (two, one) > 0);
+ }
+
+ public void test_compare_func () {
+ MyComparable two = new MyComparable(2);
+ MyComparable one = new MyComparable(1);
+ MyComparable two_copy = new MyComparable(2);
+
+ Gee.EqualDataFunc eq = Gee.Functions.get_equal_func_for (typeof (MyComparable));
+ CompareDataFunc cmp = Gee.Functions.get_compare_func_for (typeof (MyComparable));
+ //Gee.HashDataFunc hash = Gee.Functions.get_hash_func_for (typeof (MyComparable));
+
+ assert (eq != null);
+ assert (cmp != null);
+ //assert (hash != null);
+
+ assert (eq (two, two));
+ assert (cmp (two, two) == 0);
+ //assert (hash (two) == hash (two));
+
+ assert (eq (two, two_copy));
+ assert (cmp (two, two_copy) == 0);
+ //assert (hash (two) == hash (two_copy));
+
+ assert (!eq (one, two));
+ assert (cmp (one, two) < 0);
+
+ assert (!eq (two, one));
+ assert (cmp (two, one) > 0);
+ }
+
+ public void test_hash_func () {
+ MyHashable two = new MyHashable(2);
+ MyHashable one = new MyHashable(1);
+ MyHashable two_copy = new MyHashable(2);
+ MyHashable minus_one = new MyHashable(-1);
+ MyHashable minus_one2 = new MyHashable(-1);
+
+ Gee.EqualDataFunc eq = Gee.Functions.get_equal_func_for (typeof (MyHashable));
+ CompareDataFunc cmp = Gee.Functions.get_compare_func_for (typeof (MyHashable));
+ Gee.HashDataFunc hash = Gee.Functions.get_hash_func_for (typeof (MyHashable));
+
+ assert (eq != null);
+ assert (cmp != null);
+ assert (hash != null);
+
+ assert (eq (two, two));
+ assert (cmp (two, two) == 0);
+ assert (hash (two) == hash (two));
+
+ assert (eq (two, two_copy));
+ assert (cmp (two, two_copy) == 0);
+ assert (hash (two) == hash (two_copy));
+
+ assert (!eq (one, two));
+ assert (cmp (one, two) < 0);
+
+ assert (!eq (two, one));
+ assert (cmp (two, one) > 0);
+
+ // Check if correct functions taken
+ assert (hash (one) == 1);
+ assert (!eq (minus_one, minus_one2));
+ }
+
+ public void test_unfold () {
+ int i = 0;
+ int j = -1;
+ var iter = Gee.Iterator.unfold<int> (() => {
+ assert (j + 1 == i);
+ if (i == 10)
+ return null;
+ int k = i++;
+ return new Gee.Lazy<int> (() => {
+ assert (k + 1 == i);
+ j = k;
+ return k;
+ });
+ });
+ int k = 0;
+ while (iter.next ()) {
+ assert (iter.get () == k);
+ assert (iter.get () == k);
+ k++;
+ }
+ assert (k == 10);
+ }
+
+ public void test_concat () {
+ int i = 0;
+ var iter_ = Gee.Iterator.unfold<Gee.Iterator<int>> (() => {
+ if (i >= 3)
+ return null;
+ int j = i++*3;
+ int start = j;
+ var iter = Gee.Iterator.unfold<int> (() => {
+ if (j == start + 3)
+ return null;
+ return new Gee.Lazy<int>.from_value (j++);
+ });
+ return new Gee.Lazy<Gee.Iterator<int>>.from_value (iter);
+ });
+
+ int j = 0;
+ var iter = Gee.Iterator.concat<int> (iter_);
+ while (iter.next()) {
+ assert (j == iter.get ());
+ assert (j == iter.get ());
+ j++;
+ }
+ assert (i == 3);
+ assert (j == 9);
+ }
+
+ private class MyComparable : GLib.Object, Gee.Comparable<MyComparable> {
+ public MyComparable (int i) {
+ this.i = i;
+ }
+
+ public int compare_to (MyComparable cmp) {
+ if (i == cmp.i)
+ return 0;
+ else if (i >= cmp.i)
+ return 1;
+ else
+ return -1;
+ }
+
+ int i;
+ }
+
+ private class MyHashable : GLib.Object, Gee.Comparable<MyHashable>, Gee.Hashable<MyHashable> {
+ public MyHashable (int i) {
+ this.i = i;
+ }
+
+ public int compare_to (MyHashable cmp) {
+ if (i == cmp.i)
+ return 0;
+ else if (i >= cmp.i)
+ return 1;
+ else
+ return -1;
+ }
+
+ public uint hash () {
+ return i;
+ }
+
+ public bool equal_to (MyHashable hash) {
+ // -1 break API but it is used for checks
+ return i == hash.i && i != -1;
+ }
+
+ int i;
+ }
+}
+
diff --git a/tests/testhashmap.c b/tests/testhashmap.c
index 9f826ed..8e7124e 100644
--- a/tests/testhashmap.c
+++ b/tests/testhashmap.c
@@ -64,7 +64,6 @@ typedef struct _HashMapTests HashMapTests;
typedef struct _HashMapTestsClass HashMapTestsClass;
typedef struct _HashMapTestsPrivate HashMapTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _GeeTestCase {
GObject parent_instance;
@@ -96,7 +95,6 @@ struct _HashMapTestsClass {
MapTestsClass parent_class;
};
-typedef void (*GeeTestCaseTestMethod) (void* user_data);
static gpointer hash_map_tests_parent_class = NULL;
@@ -109,30 +107,13 @@ enum {
HashMapTests* hash_map_tests_new (void);
HashMapTests* hash_map_tests_construct (GType object_type);
MapTests* map_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-void hash_map_tests_test_selected_functions (HashMapTests* self);
-static void _hash_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
-void hash_map_tests_test_gobject_properties (HashMapTests* self);
-static void _hash_map_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
static void hash_map_tests_real_set_up (GeeTestCase* base);
static void hash_map_tests_real_tear_down (GeeTestCase* base);
-static void _hash_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- hash_map_tests_test_selected_functions (self);
-}
-
-
-static void _hash_map_tests_test_gobject_properties_gee_test_case_test_method (gpointer self) {
- hash_map_tests_test_gobject_properties (self);
-}
-
-
HashMapTests* hash_map_tests_construct (GType object_type) {
HashMapTests * self = NULL;
self = (HashMapTests*) map_tests_construct (object_type, "HashMap");
- gee_test_case_add_test ((GeeTestCase*) self, "[HashMap] selected functions", _hash_map_tests_test_selected_functions_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[HashMap] GObject properties", _hash_map_tests_test_gobject_properties_gee_test_case_test_method, self);
return self;
}
@@ -146,7 +127,7 @@ static void hash_map_tests_real_set_up (GeeTestCase* base) {
HashMapTests * self;
GeeHashMap* _tmp0_;
self = (HashMapTests*) base;
- _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+ _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
_g_object_unref0 (((MapTests*) self)->test_map);
((MapTests*) self)->test_map = (GeeMap*) _tmp0_;
}
@@ -160,105 +141,6 @@ static void hash_map_tests_real_tear_down (GeeTestCase* base) {
}
-static gpointer _g_object_ref0 (gpointer self) {
- return self ? g_object_ref (self) : NULL;
-}
-
-
-void hash_map_tests_test_selected_functions (HashMapTests* self) {
- GeeMap* _tmp0_;
- GeeHashMap* _tmp1_;
- GeeHashMap* test_hash_map;
- GHashFunc _tmp2_;
- GHashFunc _tmp3_;
- GHashFunc _tmp4_;
- GEqualFunc _tmp5_;
- GEqualFunc _tmp6_;
- GEqualFunc _tmp7_;
- GEqualFunc _tmp8_;
- GEqualFunc _tmp9_;
- GEqualFunc _tmp10_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((MapTests*) self)->test_map;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_HASH_MAP) ? ((GeeHashMap*) _tmp0_) : NULL);
- test_hash_map = _tmp1_;
- _vala_assert (test_hash_map != NULL, "test_hash_map != null");
- _tmp2_ = gee_hash_map_get_key_hash_func (test_hash_map);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_str_hash;
- _vala_assert (_tmp3_ == _tmp4_, "test_hash_map.key_hash_func == str_hash");
- _tmp5_ = gee_hash_map_get_key_equal_func (test_hash_map);
- _tmp6_ = _tmp5_;
- _tmp7_ = g_str_equal;
- _vala_assert (_tmp6_ == _tmp7_, "test_hash_map.key_equal_func == str_equal");
- _tmp8_ = gee_hash_map_get_value_equal_func (test_hash_map);
- _tmp9_ = _tmp8_;
- _tmp10_ = g_str_equal;
- _vala_assert (_tmp9_ == _tmp10_, "test_hash_map.value_equal_func == str_equal");
- _g_object_unref0 (test_hash_map);
-}
-
-
-void hash_map_tests_test_gobject_properties (HashMapTests* self) {
- GeeMap* _tmp0_;
- GeeHashMap* _tmp1_;
- GeeHashMap* test_hash_map;
- GValue value = {0};
- GValue _tmp2_ = {0};
- GValue _tmp3_;
- void* _tmp4_ = NULL;
- GHashFunc _tmp5_;
- GHashFunc _tmp6_;
- GValue _tmp7_ = {0};
- GValue _tmp8_;
- void* _tmp9_ = NULL;
- GEqualFunc _tmp10_;
- GEqualFunc _tmp11_;
- GValue _tmp12_ = {0};
- GValue _tmp13_;
- void* _tmp14_ = NULL;
- GEqualFunc _tmp15_;
- GEqualFunc _tmp16_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((MapTests*) self)->test_map;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_HASH_MAP) ? ((GeeHashMap*) _tmp0_) : NULL);
- test_hash_map = _tmp1_;
- _vala_assert (test_hash_map != NULL, "test_hash_map != null");
- g_value_init (&_tmp2_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp2_;
- _tmp3_ = value;
- g_object_get_property ((GObject*) test_hash_map, "key-hash-func", &value);
- _tmp4_ = g_value_get_pointer (&value);
- _tmp5_ = gee_hash_map_get_key_hash_func (test_hash_map);
- _tmp6_ = _tmp5_;
- _vala_assert (_tmp4_ == ((void*) _tmp6_), "value.get_pointer () == (void*) test_hash_map.key_hash_func");
- g_value_unset (&value);
- g_value_init (&_tmp7_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp7_;
- _tmp8_ = value;
- g_object_get_property ((GObject*) test_hash_map, "key-equal-func", &value);
- _tmp9_ = g_value_get_pointer (&value);
- _tmp10_ = gee_hash_map_get_key_equal_func (test_hash_map);
- _tmp11_ = _tmp10_;
- _vala_assert (_tmp9_ == ((void*) _tmp11_), "value.get_pointer () == (void*) test_hash_map.key_equal_func");
- g_value_unset (&value);
- g_value_init (&_tmp12_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp12_;
- _tmp13_ = value;
- g_object_get_property ((GObject*) test_hash_map, "value-equal-func", &value);
- _tmp14_ = g_value_get_pointer (&value);
- _tmp15_ = gee_hash_map_get_value_equal_func (test_hash_map);
- _tmp16_ = _tmp15_;
- _vala_assert (_tmp14_ == ((void*) _tmp16_), "value.get_pointer () == (void*) test_hash_map.value_equal_func");
- g_value_unset (&value);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- _g_object_unref0 (test_hash_map);
-}
-
-
static void hash_map_tests_class_init (HashMapTestsClass * klass) {
hash_map_tests_parent_class = g_type_class_peek_parent (klass);
GEE_TEST_CASE_CLASS (klass)->set_up = hash_map_tests_real_set_up;
diff --git a/tests/testhashmap.vala b/tests/testhashmap.vala
index 6ea5582..ac4d989 100644
--- a/tests/testhashmap.vala
+++ b/tests/testhashmap.vala
@@ -27,8 +27,6 @@ public class HashMapTests : MapTests {
public HashMapTests () {
base ("HashMap");
- add_test ("[HashMap] selected functions", test_selected_functions);
- add_test ("[HashMap] GObject properties", test_gobject_properties);
}
public override void set_up () {
@@ -38,39 +36,4 @@ public class HashMapTests : MapTests {
public override void tear_down () {
test_map = null;
}
-
- public void test_selected_functions () {
- var test_hash_map = test_map as HashMap<string,string>;
-
- // Check the map exists
- assert (test_hash_map != null);
-
- // Check the selected hash and equal functions
- assert (test_hash_map.key_hash_func == str_hash);
- assert (test_hash_map.key_equal_func == str_equal);
- assert (test_hash_map.value_equal_func == str_equal);
- }
-
- public new void test_gobject_properties () {
- var test_hash_map = test_map as HashMap<string,string>;
-
- // Check the list exists
- assert (test_hash_map != null);
- Value value;
-
- value = Value (typeof (HashFunc));
- test_hash_map.get_property ("key-hash-func", ref value);
- assert (value.get_pointer () == (void*) test_hash_map.key_hash_func);
- value.unset ();
-
- value = Value (typeof (EqualFunc));
- test_hash_map.get_property ("key-equal-func", ref value);
- assert (value.get_pointer () == (void*) test_hash_map.key_equal_func);
- value.unset ();
-
- value = Value (typeof (EqualFunc));
- test_hash_map.get_property ("value-equal-func", ref value);
- assert (value.get_pointer () == (void*) test_hash_map.value_equal_func);
- value.unset ();
- }
}
diff --git a/tests/testhashmultimap.c b/tests/testhashmultimap.c
index 1e29589..8fd393c 100644
--- a/tests/testhashmultimap.c
+++ b/tests/testhashmultimap.c
@@ -111,7 +111,7 @@ enum {
HashMultiMapTests* hash_multi_map_tests_new (void);
HashMultiMapTests* hash_multi_map_tests_construct (GType object_type);
MultiMapTests* multi_map_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
static void hash_multi_map_tests_test_selected_functions (HashMultiMapTests* self);
static void _hash_multi_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
static void hash_multi_map_tests_real_set_up (GeeTestCase* base);
@@ -126,7 +126,7 @@ static void _hash_multi_map_tests_test_selected_functions_gee_test_case_test_met
HashMultiMapTests* hash_multi_map_tests_construct (GType object_type) {
HashMultiMapTests * self = NULL;
self = (HashMultiMapTests*) multi_map_tests_construct (object_type, "HashMultiMap");
- gee_test_case_add_test ((GeeTestCase*) self, "[HashMultiMap] selected functions", _hash_multi_map_tests_test_selected_functions_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[HashMultiMap] selected functions", _hash_multi_map_tests_test_selected_functions_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -140,7 +140,7 @@ static void hash_multi_map_tests_real_set_up (GeeTestCase* base) {
HashMultiMapTests * self;
GeeHashMultiMap* _tmp0_;
self = (HashMultiMapTests*) base;
- _tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL);
+ _tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
_g_object_unref0 (((MultiMapTests*) self)->test_multi_map);
((MultiMapTests*) self)->test_multi_map = (GeeMultiMap*) _tmp0_;
}
@@ -163,39 +163,11 @@ static void hash_multi_map_tests_test_selected_functions (HashMultiMapTests* sel
GeeMultiMap* _tmp0_;
GeeHashMultiMap* _tmp1_;
GeeHashMultiMap* test_hash_multi_map;
- GHashFunc _tmp2_;
- GHashFunc _tmp3_;
- GHashFunc _tmp4_;
- GEqualFunc _tmp5_;
- GEqualFunc _tmp6_;
- GEqualFunc _tmp7_;
- GHashFunc _tmp8_;
- GHashFunc _tmp9_;
- GHashFunc _tmp10_;
- GEqualFunc _tmp11_;
- GEqualFunc _tmp12_;
- GEqualFunc _tmp13_;
g_return_if_fail (self != NULL);
_tmp0_ = ((MultiMapTests*) self)->test_multi_map;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_HASH_MULTI_MAP) ? ((GeeHashMultiMap*) _tmp0_) : NULL);
test_hash_multi_map = _tmp1_;
_vala_assert (test_hash_multi_map != NULL, "test_hash_multi_map != null");
- _tmp2_ = gee_hash_multi_map_get_key_hash_func (test_hash_multi_map);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_str_hash;
- _vala_assert (_tmp3_ == _tmp4_, "test_hash_multi_map.key_hash_func == str_hash");
- _tmp5_ = gee_hash_multi_map_get_key_equal_func (test_hash_multi_map);
- _tmp6_ = _tmp5_;
- _tmp7_ = g_str_equal;
- _vala_assert (_tmp6_ == _tmp7_, "test_hash_multi_map.key_equal_func == str_equal");
- _tmp8_ = gee_hash_multi_map_get_value_hash_func (test_hash_multi_map);
- _tmp9_ = _tmp8_;
- _tmp10_ = g_str_hash;
- _vala_assert (_tmp9_ == _tmp10_, "test_hash_multi_map.value_hash_func == str_hash");
- _tmp11_ = gee_hash_multi_map_get_value_equal_func (test_hash_multi_map);
- _tmp12_ = _tmp11_;
- _tmp13_ = g_str_equal;
- _vala_assert (_tmp12_ == _tmp13_, "test_hash_multi_map.value_equal_func == str_equal");
_g_object_unref0 (test_hash_multi_map);
}
diff --git a/tests/testhashmultimap.vala b/tests/testhashmultimap.vala
index 160985b..b334d28 100644
--- a/tests/testhashmultimap.vala
+++ b/tests/testhashmultimap.vala
@@ -45,11 +45,5 @@ public class HashMultiMapTests : MultiMapTests {
// Check the map exists
assert (test_hash_multi_map != null);
-
- // Check the selected hash and equal functions
- assert (test_hash_multi_map.key_hash_func == str_hash);
- assert (test_hash_multi_map.key_equal_func == str_equal);
- assert (test_hash_multi_map.value_hash_func == str_hash);
- assert (test_hash_multi_map.value_equal_func == str_equal);
}
}
diff --git a/tests/testhashmultiset.c b/tests/testhashmultiset.c
index 31adc39..48ccc3d 100644
--- a/tests/testhashmultiset.c
+++ b/tests/testhashmultiset.c
@@ -132,7 +132,7 @@ enum {
HashMultiSetTests* hash_multi_set_tests_new (void);
HashMultiSetTests* hash_multi_set_tests_construct (GType object_type);
MultiSetTests* multi_set_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
static void hash_multi_set_tests_test_selected_functions (HashMultiSetTests* self);
static void _hash_multi_set_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
static void hash_multi_set_tests_real_set_up (GeeTestCase* base);
@@ -147,7 +147,7 @@ static void _hash_multi_set_tests_test_selected_functions_gee_test_case_test_met
HashMultiSetTests* hash_multi_set_tests_construct (GType object_type) {
HashMultiSetTests * self = NULL;
self = (HashMultiSetTests*) multi_set_tests_construct (object_type, "HashMultiSet");
- gee_test_case_add_test ((GeeTestCase*) self, "[HashMultiSet] selected functions", _hash_multi_set_tests_test_selected_functions_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[HashMultiSet] selected functions", _hash_multi_set_tests_test_selected_functions_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -161,7 +161,7 @@ static void hash_multi_set_tests_real_set_up (GeeTestCase* base) {
HashMultiSetTests * self;
GeeHashMultiSet* _tmp0_;
self = (HashMultiSetTests*) base;
- _tmp0_ = gee_hash_multi_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ _tmp0_ = gee_hash_multi_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL);
_g_object_unref0 (((CollectionTests*) self)->test_collection);
((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}
@@ -184,25 +184,11 @@ static void hash_multi_set_tests_test_selected_functions (HashMultiSetTests* sel
GeeCollection* _tmp0_;
GeeHashMultiSet* _tmp1_;
GeeHashMultiSet* test_multi_set;
- GHashFunc _tmp2_;
- GHashFunc _tmp3_;
- GHashFunc _tmp4_;
- GEqualFunc _tmp5_;
- GEqualFunc _tmp6_;
- GEqualFunc _tmp7_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_HASH_MULTI_SET) ? ((GeeHashMultiSet*) _tmp0_) : NULL);
test_multi_set = _tmp1_;
_vala_assert (test_multi_set != NULL, "test_multi_set != null");
- _tmp2_ = gee_hash_multi_set_get_hash_func (test_multi_set);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_str_hash;
- _vala_assert (_tmp3_ == _tmp4_, "test_multi_set.hash_func == str_hash");
- _tmp5_ = gee_hash_multi_set_get_equal_func (test_multi_set);
- _tmp6_ = _tmp5_;
- _tmp7_ = g_str_equal;
- _vala_assert (_tmp6_ == _tmp7_, "test_multi_set.equal_func == str_equal");
_g_object_unref0 (test_multi_set);
}
diff --git a/tests/testhashmultiset.vala b/tests/testhashmultiset.vala
index 13b951c..da9f3f4 100644
--- a/tests/testhashmultiset.vala
+++ b/tests/testhashmultiset.vala
@@ -45,9 +45,5 @@ public class HashMultiSetTests : MultiSetTests {
// Check the collection exists
assert (test_multi_set != null);
-
- // Check the selected hash and equal functions
- assert (test_multi_set.hash_func == str_hash);
- assert (test_multi_set.equal_func == str_equal);
}
}
diff --git a/tests/testhashset.c b/tests/testhashset.c
index 59710db..94648f2 100644
--- a/tests/testhashset.c
+++ b/tests/testhashset.c
@@ -75,7 +75,6 @@ typedef struct _HashSetTests HashSetTests;
typedef struct _HashSetTestsClass HashSetTestsClass;
typedef struct _HashSetTestsPrivate HashSetTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _GeeTestCase {
GObject parent_instance;
@@ -117,7 +116,6 @@ struct _HashSetTestsClass {
SetTestsClass parent_class;
};
-typedef void (*GeeTestCaseTestMethod) (void* user_data);
static gpointer hash_set_tests_parent_class = NULL;
@@ -131,30 +129,13 @@ enum {
HashSetTests* hash_set_tests_new (void);
HashSetTests* hash_set_tests_construct (GType object_type);
SetTests* set_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-void hash_set_tests_test_selected_functions (HashSetTests* self);
-static void _hash_set_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
-void hash_set_tests_test_gobject_properties (HashSetTests* self);
-static void _hash_set_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
static void hash_set_tests_real_set_up (GeeTestCase* base);
static void hash_set_tests_real_tear_down (GeeTestCase* base);
-static void _hash_set_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- hash_set_tests_test_selected_functions (self);
-}
-
-
-static void _hash_set_tests_test_gobject_properties_gee_test_case_test_method (gpointer self) {
- hash_set_tests_test_gobject_properties (self);
-}
-
-
HashSetTests* hash_set_tests_construct (GType object_type) {
HashSetTests * self = NULL;
self = (HashSetTests*) set_tests_construct (object_type, "HashSet");
- gee_test_case_add_test ((GeeTestCase*) self, "[HashSet] selected functions", _hash_set_tests_test_selected_functions_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[HashSet] GObject properties", _hash_set_tests_test_gobject_properties_gee_test_case_test_method, self);
return self;
}
@@ -168,7 +149,7 @@ static void hash_set_tests_real_set_up (GeeTestCase* base) {
HashSetTests * self;
GeeHashSet* _tmp0_;
self = (HashSetTests*) base;
- _tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ _tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
_g_object_unref0 (((CollectionTests*) self)->test_collection);
((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}
@@ -182,83 +163,6 @@ static void hash_set_tests_real_tear_down (GeeTestCase* base) {
}
-static gpointer _g_object_ref0 (gpointer self) {
- return self ? g_object_ref (self) : NULL;
-}
-
-
-void hash_set_tests_test_selected_functions (HashSetTests* self) {
- GeeCollection* _tmp0_;
- GeeHashSet* _tmp1_;
- GeeHashSet* test_set;
- GHashFunc _tmp2_;
- GHashFunc _tmp3_;
- GHashFunc _tmp4_;
- GEqualFunc _tmp5_;
- GEqualFunc _tmp6_;
- GEqualFunc _tmp7_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_HASH_SET) ? ((GeeHashSet*) _tmp0_) : NULL);
- test_set = _tmp1_;
- _vala_assert (test_set != NULL, "test_set != null");
- _tmp2_ = gee_hash_set_get_hash_func (test_set);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_str_hash;
- _vala_assert (_tmp3_ == _tmp4_, "test_set.hash_func == str_hash");
- _tmp5_ = gee_hash_set_get_equal_func (test_set);
- _tmp6_ = _tmp5_;
- _tmp7_ = g_str_equal;
- _vala_assert (_tmp6_ == _tmp7_, "test_set.equal_func == str_equal");
- _g_object_unref0 (test_set);
-}
-
-
-void hash_set_tests_test_gobject_properties (HashSetTests* self) {
- GeeCollection* _tmp0_;
- GeeHashSet* _tmp1_;
- GeeHashSet* test_set;
- GValue value = {0};
- GValue _tmp2_ = {0};
- GValue _tmp3_;
- void* _tmp4_ = NULL;
- GHashFunc _tmp5_;
- GHashFunc _tmp6_;
- GValue _tmp7_ = {0};
- GValue _tmp8_;
- void* _tmp9_ = NULL;
- GEqualFunc _tmp10_;
- GEqualFunc _tmp11_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_HASH_SET) ? ((GeeHashSet*) _tmp0_) : NULL);
- test_set = _tmp1_;
- _vala_assert (test_set != NULL, "test_set != null");
- g_value_init (&_tmp2_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp2_;
- _tmp3_ = value;
- g_object_get_property ((GObject*) test_set, "hash-func", &value);
- _tmp4_ = g_value_get_pointer (&value);
- _tmp5_ = gee_hash_set_get_hash_func (test_set);
- _tmp6_ = _tmp5_;
- _vala_assert (_tmp4_ == ((void*) _tmp6_), "value.get_pointer () == (void*) test_set.hash_func");
- g_value_unset (&value);
- g_value_init (&_tmp7_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp7_;
- _tmp8_ = value;
- g_object_get_property ((GObject*) test_set, "equal-func", &value);
- _tmp9_ = g_value_get_pointer (&value);
- _tmp10_ = gee_hash_set_get_equal_func (test_set);
- _tmp11_ = _tmp10_;
- _vala_assert (_tmp9_ == ((void*) _tmp11_), "value.get_pointer () == (void*) test_set.equal_func");
- g_value_unset (&value);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- _g_object_unref0 (test_set);
-}
-
-
static void hash_set_tests_class_init (HashSetTestsClass * klass) {
hash_set_tests_parent_class = g_type_class_peek_parent (klass);
GEE_TEST_CASE_CLASS (klass)->set_up = hash_set_tests_real_set_up;
diff --git a/tests/testhashset.vala b/tests/testhashset.vala
index b252c19..1a6f8f1 100644
--- a/tests/testhashset.vala
+++ b/tests/testhashset.vala
@@ -27,8 +27,6 @@ public class HashSetTests : SetTests {
public HashSetTests () {
base ("HashSet");
- add_test ("[HashSet] selected functions", test_selected_functions);
- add_test ("[HashSet] GObject properties", test_gobject_properties);
}
public override void set_up () {
@@ -38,33 +36,4 @@ public class HashSetTests : SetTests {
public override void tear_down () {
test_collection = null;
}
-
- public void test_selected_functions () {
- var test_set = test_collection as HashSet<string>;
-
- // Check the map exists
- assert (test_set != null);
-
- // Check the selected hash and equal functions
- assert (test_set.hash_func == str_hash);
- assert (test_set.equal_func == str_equal);
- }
-
- public new void test_gobject_properties () {
- var test_set = test_collection as HashSet<string>;
-
- // Check the list exists
- assert (test_set != null);
- Value value;
-
- value = Value (typeof (HashFunc));
- test_set.get_property ("hash-func", ref value);
- assert (value.get_pointer () == (void*) test_set.hash_func);
- value.unset ();
-
- value = Value (typeof (EqualFunc));
- test_set.get_property ("equal-func", ref value);
- assert (value.get_pointer () == (void*) test_set.equal_func);
- value.unset ();
- }
}
diff --git a/tests/testlinkedlist.c b/tests/testlinkedlist.c
index a4113f3..399055b 100644
--- a/tests/testlinkedlist.c
+++ b/tests/testlinkedlist.c
@@ -65,6 +65,17 @@ typedef struct _ListTests ListTests;
typedef struct _ListTestsClass ListTestsClass;
typedef struct _ListTestsPrivate ListTestsPrivate;
+#define TYPE_BIDIR_LIST_TESTS (bidir_list_tests_get_type ())
+#define BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTests))
+#define BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
+#define IS_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_LIST_TESTS))
+#define IS_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_LIST_TESTS))
+#define BIDIR_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
+
+typedef struct _BidirListTests BidirListTests;
+typedef struct _BidirListTestsClass BidirListTestsClass;
+typedef struct _BidirListTestsPrivate BidirListTestsPrivate;
+
#define TYPE_LINKED_LIST_TESTS (linked_list_tests_get_type ())
#define LINKED_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LINKED_LIST_TESTS, LinkedListTests))
#define LINKED_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LINKED_LIST_TESTS, LinkedListTestsClass))
@@ -110,13 +121,22 @@ struct _ListTestsClass {
void (*test_duplicates_are_retained) (ListTests* self);
};
-struct _LinkedListTests {
+struct _BidirListTests {
ListTests parent_instance;
+ BidirListTestsPrivate * priv;
+};
+
+struct _BidirListTestsClass {
+ ListTestsClass parent_class;
+};
+
+struct _LinkedListTests {
+ BidirListTests parent_instance;
LinkedListTestsPrivate * priv;
};
struct _LinkedListTestsClass {
- ListTestsClass parent_class;
+ BidirListTestsClass parent_class;
};
typedef void (*GeeTestCaseTestMethod) (void* user_data);
@@ -126,34 +146,21 @@ static gpointer linked_list_tests_parent_class = NULL;
GType gee_test_case_get_type (void) G_GNUC_CONST;
GType collection_tests_get_type (void) G_GNUC_CONST;
GType list_tests_get_type (void) G_GNUC_CONST;
+GType bidir_list_tests_get_type (void) G_GNUC_CONST;
GType linked_list_tests_get_type (void) G_GNUC_CONST;
enum {
LINKED_LIST_TESTS_DUMMY_PROPERTY
};
LinkedListTests* linked_list_tests_new (void);
LinkedListTests* linked_list_tests_construct (GType object_type);
-ListTests* list_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-static void linked_list_tests_test_selected_functions (LinkedListTests* self);
-static void _linked_list_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
-void linked_list_tests_test_gobject_properties (LinkedListTests* self);
-static void _linked_list_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
+BidirListTests* bidir_list_tests_construct (GType object_type, const gchar* name);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
static void linked_list_tests_test_sort (LinkedListTests* self);
static void _linked_list_tests_test_sort_gee_test_case_test_method (gpointer self);
static void linked_list_tests_real_set_up (GeeTestCase* base);
static void linked_list_tests_real_tear_down (GeeTestCase* base);
-static void _linked_list_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- linked_list_tests_test_selected_functions (self);
-}
-
-
-static void _linked_list_tests_test_gobject_properties_gee_test_case_test_method (gpointer self) {
- linked_list_tests_test_gobject_properties (self);
-}
-
-
static void _linked_list_tests_test_sort_gee_test_case_test_method (gpointer self) {
linked_list_tests_test_sort (self);
}
@@ -161,10 +168,8 @@ static void _linked_list_tests_test_sort_gee_test_case_test_method (gpointer sel
LinkedListTests* linked_list_tests_construct (GType object_type) {
LinkedListTests * self = NULL;
- self = (LinkedListTests*) list_tests_construct (object_type, "LinkedList");
- gee_test_case_add_test ((GeeTestCase*) self, "[LinkedList] selected functions", _linked_list_tests_test_selected_functions_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[LinkedList] GObject properties", _linked_list_tests_test_gobject_properties_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[LinkedList] sort", _linked_list_tests_test_sort_gee_test_case_test_method, self);
+ self = (LinkedListTests*) bidir_list_tests_construct (object_type, "LinkedList");
+ gee_test_case_add_test ((GeeTestCase*) self, "[LinkedList] sort", _linked_list_tests_test_sort_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -178,7 +183,7 @@ static void linked_list_tests_real_set_up (GeeTestCase* base) {
LinkedListTests * self;
GeeLinkedList* _tmp0_;
self = (LinkedListTests*) base;
- _tmp0_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp0_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
_g_object_unref0 (((CollectionTests*) self)->test_collection);
((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}
@@ -197,56 +202,6 @@ static gpointer _g_object_ref0 (gpointer self) {
}
-static void linked_list_tests_test_selected_functions (LinkedListTests* self) {
- GeeCollection* _tmp0_;
- GeeLinkedList* _tmp1_;
- GeeLinkedList* test_list;
- GEqualFunc _tmp2_;
- GEqualFunc _tmp3_;
- GEqualFunc _tmp4_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_LINKED_LIST) ? ((GeeLinkedList*) _tmp0_) : NULL);
- test_list = _tmp1_;
- _vala_assert (test_list != NULL, "test_list != null");
- _tmp2_ = gee_linked_list_get_equal_func (test_list);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_str_equal;
- _vala_assert (_tmp3_ == _tmp4_, "test_list.equal_func == str_equal");
- _g_object_unref0 (test_list);
-}
-
-
-void linked_list_tests_test_gobject_properties (LinkedListTests* self) {
- GeeCollection* _tmp0_;
- GeeLinkedList* _tmp1_;
- GeeLinkedList* test_list;
- GValue value = {0};
- GValue _tmp2_ = {0};
- GValue _tmp3_;
- void* _tmp4_ = NULL;
- GEqualFunc _tmp5_;
- GEqualFunc _tmp6_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_LINKED_LIST) ? ((GeeLinkedList*) _tmp0_) : NULL);
- test_list = _tmp1_;
- _vala_assert (test_list != NULL, "test_list != null");
- g_value_init (&_tmp2_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp2_;
- _tmp3_ = value;
- g_object_get_property ((GObject*) test_list, "equal-func", &value);
- _tmp4_ = g_value_get_pointer (&value);
- _tmp5_ = gee_linked_list_get_equal_func (test_list);
- _tmp6_ = _tmp5_;
- _vala_assert (_tmp4_ == ((void*) _tmp6_), "value.get_pointer () == (void*) test_list.equal_func");
- g_value_unset (&value);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- _g_object_unref0 (test_list);
-}
-
-
static void linked_list_tests_test_sort (LinkedListTests* self) {
GeeCollection* _tmp0_;
GeeLinkedList* _tmp1_;
@@ -292,7 +247,7 @@ static void linked_list_tests_test_sort (LinkedListTests* self) {
gee_abstract_collection_add ((GeeAbstractCollection*) test_list, "ten");
gee_abstract_collection_add ((GeeAbstractCollection*) test_list, "eleven");
gee_abstract_collection_add ((GeeAbstractCollection*) test_list, "twelve");
- gee_list_sort ((GeeList*) test_list, NULL);
+ gee_list_sort ((GeeList*) test_list, NULL, NULL, NULL);
_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) test_list, 0);
_tmp3_ = (gchar*) _tmp2_;
_vala_assert (g_strcmp0 (_tmp3_, "eight") == 0, "test_list.get (0) == \"eight\"");
@@ -361,7 +316,7 @@ GType linked_list_tests_get_type (void) {
if (g_once_init_enter (&linked_list_tests_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (LinkedListTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) linked_list_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LinkedListTests), 0, (GInstanceInitFunc) linked_list_tests_instance_init, NULL };
GType linked_list_tests_type_id;
- linked_list_tests_type_id = g_type_register_static (TYPE_LIST_TESTS, "LinkedListTests", &g_define_type_info, 0);
+ linked_list_tests_type_id = g_type_register_static (TYPE_BIDIR_LIST_TESTS, "LinkedListTests", &g_define_type_info, 0);
g_once_init_leave (&linked_list_tests_type_id__volatile, linked_list_tests_type_id);
}
return linked_list_tests_type_id__volatile;
diff --git a/tests/testlinkedlist.vala b/tests/testlinkedlist.vala
index 737b6e3..bff2c5c 100644
--- a/tests/testlinkedlist.vala
+++ b/tests/testlinkedlist.vala
@@ -24,12 +24,10 @@
using Gee;
-public class LinkedListTests : ListTests {
+public class LinkedListTests : BidirListTests {
public LinkedListTests () {
base ("LinkedList");
- add_test ("[LinkedList] selected functions", test_selected_functions);
- add_test ("[LinkedList] GObject properties", test_gobject_properties);
add_test ("[LinkedList] sort", test_sort);
}
@@ -41,29 +39,6 @@ public class LinkedListTests : ListTests {
test_collection = null;
}
- private void test_selected_functions () {
- var test_list = test_collection as LinkedList<string>;
-
- // Check the collection exists
- assert (test_list != null);
-
- // Check the selected equal function
- assert (test_list.equal_func == str_equal);
- }
-
- public new void test_gobject_properties () {
- var test_list = test_collection as LinkedList<string>;
-
- // Check the list exists
- assert (test_list != null);
- Value value;
-
- value = Value (typeof (EqualFunc));
- test_list.get_property ("equal-func", ref value);
- assert (value.get_pointer () == (void*) test_list.equal_func);
- value.unset ();
- }
-
private void test_sort () {
var test_list = test_collection as LinkedList<string>;
diff --git a/tests/testlinkedlistasdeque.c b/tests/testlinkedlistasdeque.c
index 2bc8f68..2a8238f 100644
--- a/tests/testlinkedlistasdeque.c
+++ b/tests/testlinkedlistasdeque.c
@@ -150,7 +150,7 @@ enum {
LinkedListAsDequeTests* linked_list_as_deque_tests_new (void);
LinkedListAsDequeTests* linked_list_as_deque_tests_construct (GType object_type);
DequeTests* deque_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
static void linked_list_as_deque_tests_test_selected_functions (LinkedListAsDequeTests* self);
static void _linked_list_as_deque_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
static void linked_list_as_deque_tests_real_set_up (GeeTestCase* base);
@@ -165,7 +165,7 @@ static void _linked_list_as_deque_tests_test_selected_functions_gee_test_case_te
LinkedListAsDequeTests* linked_list_as_deque_tests_construct (GType object_type) {
LinkedListAsDequeTests * self = NULL;
self = (LinkedListAsDequeTests*) deque_tests_construct (object_type, "LinkedList as Deque");
- gee_test_case_add_test ((GeeTestCase*) self, "[LinkedList] selected functions", _linked_list_as_deque_tests_test_selected_functions_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[LinkedList] selected functions", _linked_list_as_deque_tests_test_selected_functions_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -179,7 +179,7 @@ static void linked_list_as_deque_tests_real_set_up (GeeTestCase* base) {
LinkedListAsDequeTests * self;
GeeLinkedList* _tmp0_;
self = (LinkedListAsDequeTests*) base;
- _tmp0_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp0_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
_g_object_unref0 (((CollectionTests*) self)->test_collection);
((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}
@@ -202,18 +202,11 @@ static void linked_list_as_deque_tests_test_selected_functions (LinkedListAsDequ
GeeCollection* _tmp0_;
GeeLinkedList* _tmp1_;
GeeLinkedList* test_list;
- GEqualFunc _tmp2_;
- GEqualFunc _tmp3_;
- GEqualFunc _tmp4_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_LINKED_LIST) ? ((GeeLinkedList*) _tmp0_) : NULL);
test_list = _tmp1_;
_vala_assert (test_list != NULL, "test_list != null");
- _tmp2_ = gee_linked_list_get_equal_func (test_list);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_str_equal;
- _vala_assert (_tmp3_ == _tmp4_, "test_list.equal_func == str_equal");
_g_object_unref0 (test_list);
}
diff --git a/tests/testlinkedlistasdeque.vala b/tests/testlinkedlistasdeque.vala
index 81b791f..2b9a791 100644
--- a/tests/testlinkedlistasdeque.vala
+++ b/tests/testlinkedlistasdeque.vala
@@ -42,8 +42,5 @@ public class LinkedListAsDequeTests : DequeTests {
// Check the collection exists
assert (test_list != null);
-
- // Check the selected equal function
- assert (test_list.equal_func == str_equal);
}
}
diff --git a/tests/testlist.c b/tests/testlist.c
index 580d171..d793157 100644
--- a/tests/testlist.c
+++ b/tests/testlist.c
@@ -112,7 +112,7 @@ enum {
};
ListTests* list_tests_construct (GType object_type, const gchar* name);
CollectionTests* collection_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void list_tests_test_iterator_is_ordered (ListTests* self);
static void _list_tests_test_iterator_is_ordered_gee_test_case_test_method (gpointer self);
void list_tests_test_list_iterator (ListTests* self);
@@ -206,18 +206,18 @@ ListTests* list_tests_construct (GType object_type, const gchar* name) {
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (ListTests*) collection_tests_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] iterator is ordered", _list_tests_test_iterator_is_ordered_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] list iterator", _list_tests_test_list_iterator_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] duplicates are retained", _list_tests_test_duplicates_are_retained_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] get", _list_tests_test_get_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] set", _list_tests_test_set_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] insert", _list_tests_test_insert_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] remove_at", _list_tests_test_remove_at_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] index_of", _list_tests_test_index_of_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] first", _list_tests_test_first_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] last", _list_tests_test_last_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] insert_all", _list_tests_test_insert_all_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[List] slice", _list_tests_test_slice_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] iterator is ordered", _list_tests_test_iterator_is_ordered_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] list iterator", _list_tests_test_list_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] duplicates are retained", _list_tests_test_duplicates_are_retained_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] get", _list_tests_test_get_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] set", _list_tests_test_set_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] insert", _list_tests_test_insert_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] remove_at", _list_tests_test_remove_at_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] index_of", _list_tests_test_index_of_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] first", _list_tests_test_first_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] last", _list_tests_test_last_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] insert_all", _list_tests_test_insert_all_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[List] slice", _list_tests_test_slice_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -333,18 +333,18 @@ void list_tests_test_list_iterator (ListTests* self) {
gboolean _tmp4_ = FALSE;
GeeListIterator* _tmp5_;
gboolean _tmp6_ = FALSE;
- GeeListIterator* _tmp7_;
+ gboolean _tmp7_ = FALSE;
gboolean _tmp8_ = FALSE;
- GeeListIterator* _tmp9_;
- gboolean _tmp10_ = FALSE;
+ gboolean _tmp9_ = FALSE;
+ GeeListIterator* _tmp10_ = NULL;
GeeListIterator* _tmp11_;
gboolean _tmp12_ = FALSE;
GeeListIterator* _tmp13_;
- gboolean _tmp14_ = FALSE;
- gboolean _tmp15_ = FALSE;
- gboolean _tmp16_ = FALSE;
- gboolean _tmp17_ = FALSE;
- GeeListIterator* _tmp18_ = NULL;
+ gpointer _tmp14_ = NULL;
+ gchar* _tmp15_;
+ GeeListIterator* _tmp16_;
+ gint _tmp17_ = 0;
+ GeeListIterator* _tmp18_;
GeeListIterator* _tmp19_;
gboolean _tmp20_ = FALSE;
GeeListIterator* _tmp21_;
@@ -353,28 +353,28 @@ void list_tests_test_list_iterator (ListTests* self) {
GeeListIterator* _tmp24_;
gint _tmp25_ = 0;
GeeListIterator* _tmp26_;
- GeeListIterator* _tmp27_;
- gboolean _tmp28_ = FALSE;
+ gint _tmp27_;
+ gint _tmp28_;
GeeListIterator* _tmp29_;
- gpointer _tmp30_ = NULL;
- gchar* _tmp31_;
- GeeListIterator* _tmp32_;
- gint _tmp33_ = 0;
+ gint _tmp30_ = 0;
+ GeeListIterator* _tmp31_;
+ gint _tmp32_;
+ gint _tmp33_;
GeeListIterator* _tmp34_;
- gint _tmp35_;
- gint _tmp36_;
- GeeListIterator* _tmp37_;
- gint _tmp38_ = 0;
- GeeListIterator* _tmp39_;
- gint _tmp40_;
- gint _tmp41_;
- GeeListIterator* _tmp42_;
- gint _tmp43_ = 0;
+ gint _tmp35_ = 0;
+ GeeListIterator* _tmp36_;
+ gboolean _tmp37_ = FALSE;
+ GeeListIterator* _tmp38_;
+ gpointer _tmp39_ = NULL;
+ gchar* _tmp40_;
+ GeeListIterator* _tmp41_;
+ gint _tmp42_ = 0;
+ GeeListIterator* _tmp43_;
GeeListIterator* _tmp44_;
- gint _tmp45_;
- gint _tmp46_;
- GeeListIterator* _tmp47_;
- gint _tmp48_ = 0;
+ gboolean _tmp45_ = FALSE;
+ GeeListIterator* _tmp46_;
+ gboolean _tmp47_ = FALSE;
+ GeeListIterator* _tmp48_ = NULL;
GeeListIterator* _tmp49_;
gboolean _tmp50_ = FALSE;
GeeListIterator* _tmp51_;
@@ -382,69 +382,6 @@ void list_tests_test_list_iterator (ListTests* self) {
gchar* _tmp53_;
GeeListIterator* _tmp54_;
gint _tmp55_ = 0;
- GeeListIterator* _tmp56_;
- GeeListIterator* _tmp57_;
- gboolean _tmp58_ = FALSE;
- GeeListIterator* _tmp59_;
- gboolean _tmp60_ = FALSE;
- GeeListIterator* _tmp61_;
- gboolean _tmp62_ = FALSE;
- GeeListIterator* _tmp63_;
- gpointer _tmp64_ = NULL;
- gchar* _tmp65_;
- GeeListIterator* _tmp66_;
- gint _tmp67_ = 0;
- GeeListIterator* _tmp68_;
- gboolean _tmp69_ = FALSE;
- GeeListIterator* _tmp70_;
- gboolean _tmp71_ = FALSE;
- GeeListIterator* _tmp72_;
- gboolean _tmp73_ = FALSE;
- GeeListIterator* _tmp74_;
- gpointer _tmp75_ = NULL;
- gchar* _tmp76_;
- GeeListIterator* _tmp77_;
- gint _tmp78_ = 0;
- GeeListIterator* _tmp79_;
- gboolean _tmp80_ = FALSE;
- GeeListIterator* _tmp81_;
- gboolean _tmp82_ = FALSE;
- GeeListIterator* _tmp83_;
- gboolean _tmp84_ = FALSE;
- GeeListIterator* _tmp85_;
- gboolean _tmp86_ = FALSE;
- GeeListIterator* _tmp87_;
- gpointer _tmp88_ = NULL;
- gchar* _tmp89_;
- GeeListIterator* _tmp90_;
- gint _tmp91_ = 0;
- GeeListIterator* _tmp92_;
- gboolean _tmp93_ = FALSE;
- GeeListIterator* _tmp94_;
- gboolean _tmp95_ = FALSE;
- GeeListIterator* _tmp96_;
- gpointer _tmp97_ = NULL;
- gchar* _tmp98_;
- GeeListIterator* _tmp99_;
- gint _tmp100_ = 0;
- GeeListIterator* _tmp101_;
- gboolean _tmp102_ = FALSE;
- GeeListIterator* _tmp103_;
- gboolean _tmp104_ = FALSE;
- GeeListIterator* _tmp105_;
- gpointer _tmp106_ = NULL;
- gchar* _tmp107_;
- GeeListIterator* _tmp108_;
- gint _tmp109_ = 0;
- GeeListIterator* _tmp110_;
- gboolean _tmp111_ = FALSE;
- GeeListIterator* _tmp112_;
- gboolean _tmp113_ = FALSE;
- GeeListIterator* _tmp114_;
- gpointer _tmp115_ = NULL;
- gchar* _tmp116_;
- GeeListIterator* _tmp117_;
- gint _tmp118_ = 0;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_LIST) ? ((GeeList*) _tmp0_) : NULL);
@@ -458,184 +395,88 @@ void list_tests_test_list_iterator (ListTests* self) {
_tmp5_ = iterator;
_tmp6_ = gee_iterator_next ((GeeIterator*) _tmp5_);
_vala_assert (!_tmp6_, "! iterator.next ()");
- _tmp7_ = iterator;
- _tmp8_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp7_);
- _vala_assert (!_tmp8_, "! iterator.has_previous ()");
- _tmp9_ = iterator;
- _tmp10_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp9_);
- _vala_assert (!_tmp10_, "! iterator.previous ()");
+ _tmp7_ = gee_collection_add ((GeeCollection*) test_list, "one");
+ _vala_assert (_tmp7_, "test_list.add (\"one\")");
+ _tmp8_ = gee_collection_add ((GeeCollection*) test_list, "two");
+ _vala_assert (_tmp8_, "test_list.add (\"two\")");
+ _tmp9_ = gee_collection_add ((GeeCollection*) test_list, "three");
+ _vala_assert (_tmp9_, "test_list.add (\"three\")");
+ _tmp10_ = gee_list_list_iterator (test_list);
+ _g_object_unref0 (iterator);
+ iterator = _tmp10_;
_tmp11_ = iterator;
- _tmp12_ = gee_iterator_first ((GeeIterator*) _tmp11_);
- _vala_assert (!_tmp12_, "! iterator.first ()");
+ _tmp12_ = gee_iterator_next ((GeeIterator*) _tmp11_);
+ _vala_assert (_tmp12_, "iterator.next()");
_tmp13_ = iterator;
- _tmp14_ = gee_bidir_iterator_last ((GeeBidirIterator*) _tmp13_);
- _vala_assert (!_tmp14_, "! iterator.last ()");
- _tmp15_ = gee_collection_add ((GeeCollection*) test_list, "one");
- _vala_assert (_tmp15_, "test_list.add (\"one\")");
- _tmp16_ = gee_collection_add ((GeeCollection*) test_list, "two");
- _vala_assert (_tmp16_, "test_list.add (\"two\")");
- _tmp17_ = gee_collection_add ((GeeCollection*) test_list, "three");
- _vala_assert (_tmp17_, "test_list.add (\"three\")");
- _tmp18_ = gee_list_list_iterator (test_list);
- _g_object_unref0 (iterator);
- iterator = _tmp18_;
+ _tmp14_ = gee_iterator_get ((GeeIterator*) _tmp13_);
+ _tmp15_ = (gchar*) _tmp14_;
+ _vala_assert (g_strcmp0 (_tmp15_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp15_);
+ _tmp16_ = iterator;
+ _tmp17_ = gee_list_iterator_index (_tmp16_);
+ _vala_assert (_tmp17_ == 0, "iterator.index () == 0");
+ _tmp18_ = iterator;
+ gee_list_iterator_set (_tmp18_, "new one");
_tmp19_ = iterator;
_tmp20_ = gee_iterator_next ((GeeIterator*) _tmp19_);
_vala_assert (_tmp20_, "iterator.next()");
_tmp21_ = iterator;
_tmp22_ = gee_iterator_get ((GeeIterator*) _tmp21_);
_tmp23_ = (gchar*) _tmp22_;
- _vala_assert (g_strcmp0 (_tmp23_, "one") == 0, "iterator.get () == \"one\"");
+ _vala_assert (g_strcmp0 (_tmp23_, "two") == 0, "iterator.get () == \"two\"");
_g_free0 (_tmp23_);
_tmp24_ = iterator;
_tmp25_ = gee_list_iterator_index (_tmp24_);
- _vala_assert (_tmp25_ == 0, "iterator.index () == 0");
+ _vala_assert (_tmp25_ == 1, "iterator.index () == 1");
_tmp26_ = iterator;
- gee_list_iterator_set (_tmp26_, "new one");
- _tmp27_ = iterator;
- _tmp28_ = gee_iterator_next ((GeeIterator*) _tmp27_);
- _vala_assert (_tmp28_, "iterator.next()");
+ gee_list_iterator_set (_tmp26_, "new two");
+ _tmp27_ = gee_collection_get_size ((GeeCollection*) test_list);
+ _tmp28_ = _tmp27_;
+ _vala_assert (_tmp28_ == 3, "test_list.size == 3");
_tmp29_ = iterator;
- _tmp30_ = gee_iterator_get ((GeeIterator*) _tmp29_);
- _tmp31_ = (gchar*) _tmp30_;
- _vala_assert (g_strcmp0 (_tmp31_, "two") == 0, "iterator.get () == \"two\"");
- _g_free0 (_tmp31_);
- _tmp32_ = iterator;
- _tmp33_ = gee_list_iterator_index (_tmp32_);
- _vala_assert (_tmp33_ == 1, "iterator.index () == 1");
+ _tmp30_ = gee_list_iterator_index (_tmp29_);
+ _vala_assert (_tmp30_ == 1, "iterator.index () == 1");
+ _tmp31_ = iterator;
+ gee_list_iterator_add (_tmp31_, "after two");
+ _tmp32_ = gee_collection_get_size ((GeeCollection*) test_list);
+ _tmp33_ = _tmp32_;
+ _vala_assert (_tmp33_ == 4, "test_list.size == 4");
_tmp34_ = iterator;
- gee_list_iterator_set (_tmp34_, "new two");
- _tmp35_ = gee_collection_get_size ((GeeCollection*) test_list);
- _tmp36_ = _tmp35_;
- _vala_assert (_tmp36_ == 3, "test_list.size == 3");
- _tmp37_ = iterator;
- _tmp38_ = gee_list_iterator_index (_tmp37_);
- _vala_assert (_tmp38_ == 1, "iterator.index () == 1");
- _tmp39_ = iterator;
- gee_list_iterator_insert (_tmp39_, "before two");
- _tmp40_ = gee_collection_get_size ((GeeCollection*) test_list);
- _tmp41_ = _tmp40_;
- _vala_assert (_tmp41_ == 4, "test_list.size == 4");
- _tmp42_ = iterator;
- _tmp43_ = gee_list_iterator_index (_tmp42_);
- _vala_assert (_tmp43_ == 2, "iterator.index () == 2");
+ _tmp35_ = gee_list_iterator_index (_tmp34_);
+ _vala_assert (_tmp35_ == 2, "iterator.index () == 2");
+ _tmp36_ = iterator;
+ _tmp37_ = gee_iterator_next ((GeeIterator*) _tmp36_);
+ _vala_assert (_tmp37_, "iterator.next()");
+ _tmp38_ = iterator;
+ _tmp39_ = gee_iterator_get ((GeeIterator*) _tmp38_);
+ _tmp40_ = (gchar*) _tmp39_;
+ _vala_assert (g_strcmp0 (_tmp40_, "three") == 0, "iterator.get () == \"three\"");
+ _g_free0 (_tmp40_);
+ _tmp41_ = iterator;
+ _tmp42_ = gee_list_iterator_index (_tmp41_);
+ _vala_assert (_tmp42_ == 3, "iterator.index () == 3");
+ _tmp43_ = iterator;
+ gee_list_iterator_set (_tmp43_, "new three");
_tmp44_ = iterator;
- gee_list_iterator_add (_tmp44_, "after two");
- _tmp45_ = gee_collection_get_size ((GeeCollection*) test_list);
- _tmp46_ = _tmp45_;
- _vala_assert (_tmp46_ == 5, "test_list.size == 5");
- _tmp47_ = iterator;
- _tmp48_ = gee_list_iterator_index (_tmp47_);
- _vala_assert (_tmp48_ == 3, "iterator.index () == 3");
+ _tmp45_ = gee_iterator_has_next ((GeeIterator*) _tmp44_);
+ _vala_assert (!_tmp45_, "! iterator.has_next ()");
+ _tmp46_ = iterator;
+ _tmp47_ = gee_iterator_next ((GeeIterator*) _tmp46_);
+ _vala_assert (!_tmp47_, "! iterator.next ()");
+ _tmp48_ = gee_list_list_iterator (test_list);
+ _g_object_unref0 (iterator);
+ iterator = _tmp48_;
_tmp49_ = iterator;
_tmp50_ = gee_iterator_next ((GeeIterator*) _tmp49_);
- _vala_assert (_tmp50_, "iterator.next()");
+ _vala_assert (_tmp50_, "iterator.next ()");
_tmp51_ = iterator;
_tmp52_ = gee_iterator_get ((GeeIterator*) _tmp51_);
_tmp53_ = (gchar*) _tmp52_;
- _vala_assert (g_strcmp0 (_tmp53_, "three") == 0, "iterator.get () == \"three\"");
+ _vala_assert (g_strcmp0 (_tmp53_, "new one") == 0, "iterator.get () == \"new one\"");
_g_free0 (_tmp53_);
_tmp54_ = iterator;
_tmp55_ = gee_list_iterator_index (_tmp54_);
- _vala_assert (_tmp55_ == 4, "iterator.index () == 4");
- _tmp56_ = iterator;
- gee_list_iterator_set (_tmp56_, "new three");
- _tmp57_ = iterator;
- _tmp58_ = gee_iterator_has_next ((GeeIterator*) _tmp57_);
- _vala_assert (!_tmp58_, "! iterator.has_next ()");
- _tmp59_ = iterator;
- _tmp60_ = gee_iterator_next ((GeeIterator*) _tmp59_);
- _vala_assert (!_tmp60_, "! iterator.next ()");
- _tmp61_ = iterator;
- _tmp62_ = gee_iterator_first ((GeeIterator*) _tmp61_);
- _vala_assert (_tmp62_, "iterator.first ()");
- _tmp63_ = iterator;
- _tmp64_ = gee_iterator_get ((GeeIterator*) _tmp63_);
- _tmp65_ = (gchar*) _tmp64_;
- _vala_assert (g_strcmp0 (_tmp65_, "new one") == 0, "iterator.get () == \"new one\"");
- _g_free0 (_tmp65_);
- _tmp66_ = iterator;
- _tmp67_ = gee_list_iterator_index (_tmp66_);
- _vala_assert (_tmp67_ == 0, "iterator.index () == 0");
- _tmp68_ = iterator;
- _tmp69_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp68_);
- _vala_assert (!_tmp69_, "! iterator.has_previous ()");
- _tmp70_ = iterator;
- _tmp71_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp70_);
- _vala_assert (!_tmp71_, "! iterator.previous ()");
- _tmp72_ = iterator;
- _tmp73_ = gee_bidir_iterator_last ((GeeBidirIterator*) _tmp72_);
- _vala_assert (_tmp73_, "iterator.last ()");
- _tmp74_ = iterator;
- _tmp75_ = gee_iterator_get ((GeeIterator*) _tmp74_);
- _tmp76_ = (gchar*) _tmp75_;
- _vala_assert (g_strcmp0 (_tmp76_, "new three") == 0, "iterator.get () == \"new three\"");
- _g_free0 (_tmp76_);
- _tmp77_ = iterator;
- _tmp78_ = gee_list_iterator_index (_tmp77_);
- _vala_assert (_tmp78_ == 4, "iterator.index () == 4");
- _tmp79_ = iterator;
- _tmp80_ = gee_iterator_has_next ((GeeIterator*) _tmp79_);
- _vala_assert (!_tmp80_, "! iterator.has_next ()");
- _tmp81_ = iterator;
- _tmp82_ = gee_iterator_next ((GeeIterator*) _tmp81_);
- _vala_assert (!_tmp82_, "! iterator.next ()");
- _tmp83_ = iterator;
- _tmp84_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp83_);
- _vala_assert (_tmp84_, "iterator.has_previous ()");
- _tmp85_ = iterator;
- _tmp86_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp85_);
- _vala_assert (_tmp86_, "iterator.previous ()");
- _tmp87_ = iterator;
- _tmp88_ = gee_iterator_get ((GeeIterator*) _tmp87_);
- _tmp89_ = (gchar*) _tmp88_;
- _vala_assert (g_strcmp0 (_tmp89_, "after two") == 0, "iterator.get () == \"after two\"");
- _g_free0 (_tmp89_);
- _tmp90_ = iterator;
- _tmp91_ = gee_list_iterator_index (_tmp90_);
- _vala_assert (_tmp91_ == 3, "iterator.index () == 3");
- _tmp92_ = iterator;
- _tmp93_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp92_);
- _vala_assert (_tmp93_, "iterator.has_previous ()");
- _tmp94_ = iterator;
- _tmp95_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp94_);
- _vala_assert (_tmp95_, "iterator.previous ()");
- _tmp96_ = iterator;
- _tmp97_ = gee_iterator_get ((GeeIterator*) _tmp96_);
- _tmp98_ = (gchar*) _tmp97_;
- _vala_assert (g_strcmp0 (_tmp98_, "new two") == 0, "iterator.get () == \"new two\"");
- _g_free0 (_tmp98_);
- _tmp99_ = iterator;
- _tmp100_ = gee_list_iterator_index (_tmp99_);
- _vala_assert (_tmp100_ == 2, "iterator.index () == 2");
- _tmp101_ = iterator;
- _tmp102_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp101_);
- _vala_assert (_tmp102_, "iterator.has_previous ()");
- _tmp103_ = iterator;
- _tmp104_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp103_);
- _vala_assert (_tmp104_, "iterator.previous ()");
- _tmp105_ = iterator;
- _tmp106_ = gee_iterator_get ((GeeIterator*) _tmp105_);
- _tmp107_ = (gchar*) _tmp106_;
- _vala_assert (g_strcmp0 (_tmp107_, "before two") == 0, "iterator.get () == \"before two\"");
- _g_free0 (_tmp107_);
- _tmp108_ = iterator;
- _tmp109_ = gee_list_iterator_index (_tmp108_);
- _vala_assert (_tmp109_ == 1, "iterator.index () == 1");
- _tmp110_ = iterator;
- _tmp111_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp110_);
- _vala_assert (_tmp111_, "iterator.has_previous ()");
- _tmp112_ = iterator;
- _tmp113_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp112_);
- _vala_assert (_tmp113_, "iterator.previous ()");
- _tmp114_ = iterator;
- _tmp115_ = gee_iterator_get ((GeeIterator*) _tmp114_);
- _tmp116_ = (gchar*) _tmp115_;
- _vala_assert (g_strcmp0 (_tmp116_, "new one") == 0, "iterator.get () == \"new one\"");
- _g_free0 (_tmp116_);
- _tmp117_ = iterator;
- _tmp118_ = gee_list_iterator_index (_tmp117_);
- _vala_assert (_tmp118_ == 0, "iterator.index () == 0");
+ _vala_assert (_tmp55_ == 0, "iterator.index () == 0");
_g_object_unref0 (iterator);
_g_object_unref0 (test_list);
}
@@ -1786,7 +1627,7 @@ void list_tests_test_insert_all (ListTests* self) {
test_list = _tmp1_;
_tmp2_ = test_list;
_vala_assert (_tmp2_ != NULL, "test_list != null");
- _tmp3_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp3_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = _tmp3_;
_tmp4_ = test_list;
_tmp5_ = gee_collection_add ((GeeCollection*) _tmp4_, "zero");
@@ -1802,7 +1643,7 @@ void list_tests_test_insert_all (ListTests* self) {
_tmp12_ = _tmp11_;
_vala_assert (_tmp12_ == 3, "test_list.size == 3");
_tmp13_ = dummy;
- _tmp14_ = gee_abstract_collection_get_is_empty ((GeeAbstractCollection*) _tmp13_);
+ _tmp14_ = gee_collection_get_is_empty ((GeeCollection*) _tmp13_);
_tmp15_ = _tmp14_;
_vala_assert (_tmp15_, "dummy.is_empty");
_tmp16_ = test_list;
@@ -1813,7 +1654,7 @@ void list_tests_test_insert_all (ListTests* self) {
_tmp20_ = _tmp19_;
_vala_assert (_tmp20_ == 3, "test_list.size == 3");
_tmp21_ = dummy;
- _tmp22_ = gee_abstract_collection_get_is_empty ((GeeAbstractCollection*) _tmp21_);
+ _tmp22_ = gee_collection_get_is_empty ((GeeCollection*) _tmp21_);
_tmp23_ = _tmp22_;
_vala_assert (_tmp23_, "dummy.is_empty");
_tmp24_ = test_list;
diff --git a/tests/testlist.vala b/tests/testlist.vala
index 48ca387..5b83b49 100644
--- a/tests/testlist.vala
+++ b/tests/testlist.vala
@@ -83,10 +83,6 @@ public abstract class ListTests : CollectionTests {
var iterator = test_list.list_iterator ();
assert (! iterator.has_next ());
assert (! iterator.next ());
- assert (! iterator.has_previous ());
- assert (! iterator.previous ());
- assert (! iterator.first ());
- assert (! iterator.last ());
// Check iterate list
assert (test_list.add ("one"));
@@ -104,45 +100,18 @@ public abstract class ListTests : CollectionTests {
iterator.set ("new two");
assert (test_list.size == 3);
assert (iterator.index () == 1);
- iterator.insert ("before two");
+ iterator.add ("after two");
assert (test_list.size == 4);
assert (iterator.index () == 2);
- iterator.add ("after two");
- assert (test_list.size == 5);
- assert (iterator.index () == 3);
assert (iterator.next());
assert (iterator.get () == "three");
- assert (iterator.index () == 4);
+ assert (iterator.index () == 3);
iterator.set ("new three");
assert (! iterator.has_next ());
assert (! iterator.next ());
- assert (iterator.first ());
- assert (iterator.get () == "new one");
- assert (iterator.index () == 0);
- assert (! iterator.has_previous ());
- assert (! iterator.previous ());
-
- assert (iterator.last ());
- assert (iterator.get () == "new three");
- assert (iterator.index () == 4);
- assert (! iterator.has_next ());
- assert (! iterator.next ());
-
- assert (iterator.has_previous ());
- assert (iterator.previous ());
- assert (iterator.get () == "after two");
- assert (iterator.index () == 3);
- assert (iterator.has_previous ());
- assert (iterator.previous ());
- assert (iterator.get () == "new two");
- assert (iterator.index () == 2);
- assert (iterator.has_previous ());
- assert (iterator.previous ());
- assert (iterator.get () == "before two");
- assert (iterator.index () == 1);
- assert (iterator.has_previous ());
- assert (iterator.previous ());
+ iterator = test_list.list_iterator ();
+ assert (iterator.next ());
assert (iterator.get () == "new one");
assert (iterator.index () == 0);
}
diff --git a/tests/testmain.c b/tests/testmain.c
index 2b62033..8a15ec4 100644
--- a/tests/testmain.c
+++ b/tests/testmain.c
@@ -28,6 +28,7 @@
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
+#include <gee.h>
#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
@@ -60,6 +61,16 @@ typedef struct _CollectionTestsClass CollectionTestsClass;
typedef struct _ListTests ListTests;
typedef struct _ListTestsClass ListTestsClass;
+#define TYPE_BIDIR_LIST_TESTS (bidir_list_tests_get_type ())
+#define BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTests))
+#define BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
+#define IS_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_LIST_TESTS))
+#define IS_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_LIST_TESTS))
+#define BIDIR_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_LIST_TESTS, BidirListTestsClass))
+
+typedef struct _BidirListTests BidirListTests;
+typedef struct _BidirListTestsClass BidirListTestsClass;
+
#define TYPE_ARRAY_LIST_TESTS (array_list_tests_get_type ())
#define ARRAY_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ARRAY_LIST_TESTS, ArrayListTests))
#define ARRAY_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ARRAY_LIST_TESTS, ArrayListTestsClass))
@@ -71,15 +82,85 @@ typedef struct _ArrayListTests ArrayListTests;
typedef struct _ArrayListTestsClass ArrayListTestsClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define TYPE_COMPARABLE_TESTS (comparable_tests_get_type ())
-#define COMPARABLE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMPARABLE_TESTS, ComparableTests))
-#define COMPARABLE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMPARABLE_TESTS, ComparableTestsClass))
-#define IS_COMPARABLE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMPARABLE_TESTS))
-#define IS_COMPARABLE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMPARABLE_TESTS))
-#define COMPARABLE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMPARABLE_TESTS, ComparableTestsClass))
+#define TYPE_QUEUE_TESTS (queue_tests_get_type ())
+#define QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUEUE_TESTS, QueueTests))
+#define QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_QUEUE_TESTS, QueueTestsClass))
+#define IS_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUEUE_TESTS))
+#define IS_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_QUEUE_TESTS))
+#define QUEUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_QUEUE_TESTS, QueueTestsClass))
+
+typedef struct _QueueTests QueueTests;
+typedef struct _QueueTestsClass QueueTestsClass;
+
+#define TYPE_DEQUE_TESTS (deque_tests_get_type ())
+#define DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEQUE_TESTS, DequeTests))
+#define DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEQUE_TESTS, DequeTestsClass))
+#define IS_DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEQUE_TESTS))
+#define IS_DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEQUE_TESTS))
+#define DEQUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEQUE_TESTS, DequeTestsClass))
+
+typedef struct _DequeTests DequeTests;
+typedef struct _DequeTestsClass DequeTestsClass;
+
+#define TYPE_ARRAY_QUEUE_TESTS (array_queue_tests_get_type ())
+#define ARRAY_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ARRAY_QUEUE_TESTS, ArrayQueueTests))
+#define ARRAY_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ARRAY_QUEUE_TESTS, ArrayQueueTestsClass))
+#define IS_ARRAY_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ARRAY_QUEUE_TESTS))
+#define IS_ARRAY_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ARRAY_QUEUE_TESTS))
+#define ARRAY_QUEUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ARRAY_QUEUE_TESTS, ArrayQueueTestsClass))
+
+typedef struct _ArrayQueueTests ArrayQueueTests;
+typedef struct _ArrayQueueTestsClass ArrayQueueTestsClass;
+
+#define TYPE_CONCURRENT_LIST_TESTS (concurrent_list_tests_get_type ())
+#define CONCURRENT_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONCURRENT_LIST_TESTS, ConcurrentListTests))
+#define CONCURRENT_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONCURRENT_LIST_TESTS, ConcurrentListTestsClass))
+#define IS_CONCURRENT_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONCURRENT_LIST_TESTS))
+#define IS_CONCURRENT_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONCURRENT_LIST_TESTS))
+#define CONCURRENT_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONCURRENT_LIST_TESTS, ConcurrentListTestsClass))
+
+typedef struct _ConcurrentListTests ConcurrentListTests;
+typedef struct _ConcurrentListTestsClass ConcurrentListTestsClass;
+
+#define TYPE_SET_TESTS (set_tests_get_type ())
+#define SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_TESTS, SetTests))
+#define SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_TESTS, SetTestsClass))
+#define IS_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_TESTS))
+#define IS_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_TESTS))
+#define SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_TESTS, SetTestsClass))
+
+typedef struct _SetTests SetTests;
+typedef struct _SetTestsClass SetTestsClass;
+
+#define TYPE_SORTED_SET_TESTS (sorted_set_tests_get_type ())
+#define SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SORTED_SET_TESTS, SortedSetTests))
+#define SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
+#define IS_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SORTED_SET_TESTS))
+#define IS_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SORTED_SET_TESTS))
+#define SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
+
+typedef struct _SortedSetTests SortedSetTests;
+typedef struct _SortedSetTestsClass SortedSetTestsClass;
+
+#define TYPE_CONCURRENT_SET_TESTS (concurrent_set_tests_get_type ())
+#define CONCURRENT_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTests))
+#define CONCURRENT_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTestsClass))
+#define IS_CONCURRENT_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONCURRENT_SET_TESTS))
+#define IS_CONCURRENT_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONCURRENT_SET_TESTS))
+#define CONCURRENT_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONCURRENT_SET_TESTS, ConcurrentSetTestsClass))
-typedef struct _ComparableTests ComparableTests;
-typedef struct _ComparableTestsClass ComparableTestsClass;
+typedef struct _ConcurrentSetTests ConcurrentSetTests;
+typedef struct _ConcurrentSetTestsClass ConcurrentSetTestsClass;
+
+#define TYPE_FUNCTIONS_TESTS (functions_tests_get_type ())
+#define FUNCTIONS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FUNCTIONS_TESTS, FunctionsTests))
+#define FUNCTIONS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FUNCTIONS_TESTS, FunctionsTestsClass))
+#define IS_FUNCTIONS_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FUNCTIONS_TESTS))
+#define IS_FUNCTIONS_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FUNCTIONS_TESTS))
+#define FUNCTIONS_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FUNCTIONS_TESTS, FunctionsTestsClass))
+
+typedef struct _FunctionsTests FunctionsTests;
+typedef struct _FunctionsTestsClass FunctionsTestsClass;
#define TYPE_MAP_TESTS (map_tests_get_type ())
#define MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAP_TESTS, MapTests))
@@ -141,16 +222,6 @@ typedef struct _MultiSetTestsClass MultiSetTestsClass;
typedef struct _HashMultiSetTests HashMultiSetTests;
typedef struct _HashMultiSetTestsClass HashMultiSetTestsClass;
-#define TYPE_SET_TESTS (set_tests_get_type ())
-#define SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_TESTS, SetTests))
-#define SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_TESTS, SetTestsClass))
-#define IS_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_TESTS))
-#define IS_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_TESTS))
-#define SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_TESTS, SetTestsClass))
-
-typedef struct _SetTests SetTests;
-typedef struct _SetTestsClass SetTestsClass;
-
#define TYPE_HASH_SET_TESTS (hash_set_tests_get_type ())
#define HASH_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HASH_SET_TESTS, HashSetTests))
#define HASH_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HASH_SET_TESTS, HashSetTestsClass))
@@ -171,26 +242,6 @@ typedef struct _HashSetTestsClass HashSetTestsClass;
typedef struct _LinkedListTests LinkedListTests;
typedef struct _LinkedListTestsClass LinkedListTestsClass;
-#define TYPE_QUEUE_TESTS (queue_tests_get_type ())
-#define QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUEUE_TESTS, QueueTests))
-#define QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_QUEUE_TESTS, QueueTestsClass))
-#define IS_QUEUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUEUE_TESTS))
-#define IS_QUEUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_QUEUE_TESTS))
-#define QUEUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_QUEUE_TESTS, QueueTestsClass))
-
-typedef struct _QueueTests QueueTests;
-typedef struct _QueueTestsClass QueueTestsClass;
-
-#define TYPE_DEQUE_TESTS (deque_tests_get_type ())
-#define DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DEQUE_TESTS, DequeTests))
-#define DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DEQUE_TESTS, DequeTestsClass))
-#define IS_DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEQUE_TESTS))
-#define IS_DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEQUE_TESTS))
-#define DEQUE_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DEQUE_TESTS, DequeTestsClass))
-
-typedef struct _DequeTests DequeTests;
-typedef struct _DequeTestsClass DequeTestsClass;
-
#define TYPE_LINKED_LIST_AS_DEQUE_TESTS (linked_list_as_deque_tests_get_type ())
#define LINKED_LIST_AS_DEQUE_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LINKED_LIST_AS_DEQUE_TESTS, LinkedListAsDequeTests))
#define LINKED_LIST_AS_DEQUE_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LINKED_LIST_AS_DEQUE_TESTS, LinkedListAsDequeTestsClass))
@@ -231,6 +282,16 @@ typedef struct _ReadOnlyCollectionTestsClass ReadOnlyCollectionTestsClass;
typedef struct _ReadOnlyListTests ReadOnlyListTests;
typedef struct _ReadOnlyListTestsClass ReadOnlyListTestsClass;
+#define TYPE_READ_ONLY_BIDIR_LIST_TESTS (read_only_bidir_list_tests_get_type ())
+#define READ_ONLY_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_READ_ONLY_BIDIR_LIST_TESTS, ReadOnlyBidirListTests))
+#define READ_ONLY_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_READ_ONLY_BIDIR_LIST_TESTS, ReadOnlyBidirListTestsClass))
+#define IS_READ_ONLY_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_READ_ONLY_BIDIR_LIST_TESTS))
+#define IS_READ_ONLY_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_READ_ONLY_BIDIR_LIST_TESTS))
+#define READ_ONLY_BIDIR_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_READ_ONLY_BIDIR_LIST_TESTS, ReadOnlyBidirListTestsClass))
+
+typedef struct _ReadOnlyBidirListTests ReadOnlyBidirListTests;
+typedef struct _ReadOnlyBidirListTestsClass ReadOnlyBidirListTestsClass;
+
#define TYPE_READ_ONLY_MAP_TESTS (read_only_map_tests_get_type ())
#define READ_ONLY_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_READ_ONLY_MAP_TESTS, ReadOnlyMapTests))
#define READ_ONLY_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_READ_ONLY_MAP_TESTS, ReadOnlyMapTestsClass))
@@ -251,6 +312,26 @@ typedef struct _ReadOnlyMapTestsClass ReadOnlyMapTestsClass;
typedef struct _ReadOnlySetTests ReadOnlySetTests;
typedef struct _ReadOnlySetTestsClass ReadOnlySetTestsClass;
+#define GEE_TYPE_SORTED_MAP_TESTS (gee_sorted_map_tests_get_type ())
+#define GEE_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTests))
+#define GEE_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTestsClass))
+#define GEE_IS_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SORTED_MAP_TESTS))
+#define GEE_IS_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_SORTED_MAP_TESTS))
+#define GEE_SORTED_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTestsClass))
+
+typedef struct _GeeSortedMapTests GeeSortedMapTests;
+typedef struct _GeeSortedMapTestsClass GeeSortedMapTestsClass;
+
+#define TYPE_BIDIR_SORTED_MAP_TESTS (bidir_sorted_map_tests_get_type ())
+#define BIDIR_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTests))
+#define BIDIR_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTestsClass))
+#define IS_BIDIR_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_SORTED_MAP_TESTS))
+#define IS_BIDIR_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_SORTED_MAP_TESTS))
+#define BIDIR_SORTED_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTestsClass))
+
+typedef struct _BidirSortedMapTests BidirSortedMapTests;
+typedef struct _BidirSortedMapTestsClass BidirSortedMapTestsClass;
+
#define TYPE_TREE_MAP_TESTS (tree_map_tests_get_type ())
#define TREE_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TREE_MAP_TESTS, TreeMapTests))
#define TREE_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TREE_MAP_TESTS, TreeMapTestsClass))
@@ -281,15 +362,15 @@ typedef struct _TreeMultiMapTestsClass TreeMultiMapTestsClass;
typedef struct _TreeMultiSetTests TreeMultiSetTests;
typedef struct _TreeMultiSetTestsClass TreeMultiSetTestsClass;
-#define TYPE_SORTED_SET_TESTS (sorted_set_tests_get_type ())
-#define SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SORTED_SET_TESTS, SortedSetTests))
-#define SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
-#define IS_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SORTED_SET_TESTS))
-#define IS_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SORTED_SET_TESTS))
-#define SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SORTED_SET_TESTS, SortedSetTestsClass))
+#define TYPE_BIDIR_SORTED_SET_TESTS (bidir_sorted_set_tests_get_type ())
+#define BIDIR_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTests))
+#define BIDIR_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTestsClass))
+#define IS_BIDIR_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_SORTED_SET_TESTS))
+#define IS_BIDIR_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_SORTED_SET_TESTS))
+#define BIDIR_SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTestsClass))
-typedef struct _SortedSetTests SortedSetTests;
-typedef struct _SortedSetTestsClass SortedSetTestsClass;
+typedef struct _BidirSortedSetTests BidirSortedSetTests;
+typedef struct _BidirSortedSetTestsClass BidirSortedSetTestsClass;
#define TYPE_TREE_SET_TESTS (tree_set_tests_get_type ())
#define TREE_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TREE_SET_TESTS, TreeSetTests))
@@ -309,11 +390,25 @@ ArrayListTests* array_list_tests_construct (GType object_type);
GType gee_test_case_get_type (void) G_GNUC_CONST;
GType collection_tests_get_type (void) G_GNUC_CONST;
GType list_tests_get_type (void) G_GNUC_CONST;
+GType bidir_list_tests_get_type (void) G_GNUC_CONST;
GType array_list_tests_get_type (void) G_GNUC_CONST;
GTestSuite* gee_test_case_get_suite (GeeTestCase* self);
-ComparableTests* comparable_tests_new (void);
-ComparableTests* comparable_tests_construct (GType object_type);
-GType comparable_tests_get_type (void) G_GNUC_CONST;
+ArrayQueueTests* array_queue_tests_new (void);
+ArrayQueueTests* array_queue_tests_construct (GType object_type);
+GType queue_tests_get_type (void) G_GNUC_CONST;
+GType deque_tests_get_type (void) G_GNUC_CONST;
+GType array_queue_tests_get_type (void) G_GNUC_CONST;
+ConcurrentListTests* concurrent_list_tests_new (void);
+ConcurrentListTests* concurrent_list_tests_construct (GType object_type);
+GType concurrent_list_tests_get_type (void) G_GNUC_CONST;
+ConcurrentSetTests* concurrent_set_tests_new (void);
+ConcurrentSetTests* concurrent_set_tests_construct (GType object_type);
+GType set_tests_get_type (void) G_GNUC_CONST;
+GType sorted_set_tests_get_type (void) G_GNUC_CONST;
+GType concurrent_set_tests_get_type (void) G_GNUC_CONST;
+FunctionsTests* functions_tests_new (void);
+FunctionsTests* functions_tests_construct (GType object_type);
+GType functions_tests_get_type (void) G_GNUC_CONST;
HashMapTests* hash_map_tests_new (void);
HashMapTests* hash_map_tests_construct (GType object_type);
GType map_tests_get_type (void) G_GNUC_CONST;
@@ -328,25 +423,25 @@ GType multi_set_tests_get_type (void) G_GNUC_CONST;
GType hash_multi_set_tests_get_type (void) G_GNUC_CONST;
HashSetTests* hash_set_tests_new (void);
HashSetTests* hash_set_tests_construct (GType object_type);
-GType set_tests_get_type (void) G_GNUC_CONST;
GType hash_set_tests_get_type (void) G_GNUC_CONST;
LinkedListTests* linked_list_tests_new (void);
LinkedListTests* linked_list_tests_construct (GType object_type);
GType linked_list_tests_get_type (void) G_GNUC_CONST;
LinkedListAsDequeTests* linked_list_as_deque_tests_new (void);
LinkedListAsDequeTests* linked_list_as_deque_tests_construct (GType object_type);
-GType queue_tests_get_type (void) G_GNUC_CONST;
-GType deque_tests_get_type (void) G_GNUC_CONST;
GType linked_list_as_deque_tests_get_type (void) G_GNUC_CONST;
PriorityQueueTests* priority_queue_tests_new (void);
PriorityQueueTests* priority_queue_tests_construct (GType object_type);
GType priority_queue_tests_get_type (void) G_GNUC_CONST;
+ReadOnlyBidirListTests* read_only_bidir_list_tests_new (void);
+ReadOnlyBidirListTests* read_only_bidir_list_tests_construct (GType object_type);
+GType read_only_collection_tests_get_type (void) G_GNUC_CONST;
+GType read_only_list_tests_get_type (void) G_GNUC_CONST;
+GType read_only_bidir_list_tests_get_type (void) G_GNUC_CONST;
ReadOnlyCollectionTests* read_only_collection_tests_new (void);
ReadOnlyCollectionTests* read_only_collection_tests_construct (GType object_type);
-GType read_only_collection_tests_get_type (void) G_GNUC_CONST;
ReadOnlyListTests* read_only_list_tests_new (void);
ReadOnlyListTests* read_only_list_tests_construct (GType object_type);
-GType read_only_list_tests_get_type (void) G_GNUC_CONST;
ReadOnlyMapTests* read_only_map_tests_new (void);
ReadOnlyMapTests* read_only_map_tests_construct (GType object_type);
GType read_only_map_tests_get_type (void) G_GNUC_CONST;
@@ -355,6 +450,8 @@ ReadOnlySetTests* read_only_set_tests_construct (GType object_type);
GType read_only_set_tests_get_type (void) G_GNUC_CONST;
TreeMapTests* tree_map_tests_new (void);
TreeMapTests* tree_map_tests_construct (GType object_type);
+GType gee_sorted_map_tests_get_type (void) G_GNUC_CONST;
+GType bidir_sorted_map_tests_get_type (void) G_GNUC_CONST;
GType tree_map_tests_get_type (void) G_GNUC_CONST;
TreeMultiMapTests* tree_multi_map_tests_new (void);
TreeMultiMapTests* tree_multi_map_tests_construct (GType object_type);
@@ -364,7 +461,7 @@ TreeMultiSetTests* tree_multi_set_tests_construct (GType object_type);
GType tree_multi_set_tests_get_type (void) G_GNUC_CONST;
TreeSetTests* tree_set_tests_new (void);
TreeSetTests* tree_set_tests_construct (GType object_type);
-GType sorted_set_tests_get_type (void) G_GNUC_CONST;
+GType bidir_sorted_set_tests_get_type (void) G_GNUC_CONST;
GType tree_set_tests_get_type (void) G_GNUC_CONST;
@@ -374,70 +471,87 @@ void _vala_main (gchar** args, int args_length1) {
ArrayListTests* _tmp2_;
GTestSuite* _tmp3_ = NULL;
GTestSuite* _tmp4_ = NULL;
- ComparableTests* _tmp5_;
- ComparableTests* _tmp6_;
+ ArrayQueueTests* _tmp5_;
+ ArrayQueueTests* _tmp6_;
GTestSuite* _tmp7_ = NULL;
GTestSuite* _tmp8_ = NULL;
- HashMapTests* _tmp9_;
- HashMapTests* _tmp10_;
+ ConcurrentListTests* _tmp9_;
+ ConcurrentListTests* _tmp10_;
GTestSuite* _tmp11_ = NULL;
GTestSuite* _tmp12_ = NULL;
- HashMultiMapTests* _tmp13_;
- HashMultiMapTests* _tmp14_;
+ ConcurrentSetTests* _tmp13_;
+ ConcurrentSetTests* _tmp14_;
GTestSuite* _tmp15_ = NULL;
GTestSuite* _tmp16_ = NULL;
- HashMultiSetTests* _tmp17_;
- HashMultiSetTests* _tmp18_;
+ FunctionsTests* _tmp17_;
+ FunctionsTests* _tmp18_;
GTestSuite* _tmp19_ = NULL;
GTestSuite* _tmp20_ = NULL;
- HashSetTests* _tmp21_;
- HashSetTests* _tmp22_;
+ HashMapTests* _tmp21_;
+ HashMapTests* _tmp22_;
GTestSuite* _tmp23_ = NULL;
GTestSuite* _tmp24_ = NULL;
- LinkedListTests* _tmp25_;
- LinkedListTests* _tmp26_;
+ HashMultiMapTests* _tmp25_;
+ HashMultiMapTests* _tmp26_;
GTestSuite* _tmp27_ = NULL;
GTestSuite* _tmp28_ = NULL;
- LinkedListAsDequeTests* _tmp29_;
- LinkedListAsDequeTests* _tmp30_;
+ HashMultiSetTests* _tmp29_;
+ HashMultiSetTests* _tmp30_;
GTestSuite* _tmp31_ = NULL;
GTestSuite* _tmp32_ = NULL;
- PriorityQueueTests* _tmp33_;
- PriorityQueueTests* _tmp34_;
+ HashSetTests* _tmp33_;
+ HashSetTests* _tmp34_;
GTestSuite* _tmp35_ = NULL;
GTestSuite* _tmp36_ = NULL;
- ReadOnlyCollectionTests* _tmp37_;
- ReadOnlyCollectionTests* _tmp38_;
+ LinkedListTests* _tmp37_;
+ LinkedListTests* _tmp38_;
GTestSuite* _tmp39_ = NULL;
GTestSuite* _tmp40_ = NULL;
- ReadOnlyListTests* _tmp41_;
- ReadOnlyListTests* _tmp42_;
+ LinkedListAsDequeTests* _tmp41_;
+ LinkedListAsDequeTests* _tmp42_;
GTestSuite* _tmp43_ = NULL;
GTestSuite* _tmp44_ = NULL;
- ReadOnlyMapTests* _tmp45_;
- ReadOnlyMapTests* _tmp46_;
+ PriorityQueueTests* _tmp45_;
+ PriorityQueueTests* _tmp46_;
GTestSuite* _tmp47_ = NULL;
GTestSuite* _tmp48_ = NULL;
- ReadOnlySetTests* _tmp49_;
- ReadOnlySetTests* _tmp50_;
+ ReadOnlyBidirListTests* _tmp49_;
+ ReadOnlyBidirListTests* _tmp50_;
GTestSuite* _tmp51_ = NULL;
GTestSuite* _tmp52_ = NULL;
- TreeMapTests* _tmp53_;
- TreeMapTests* _tmp54_;
+ ReadOnlyCollectionTests* _tmp53_;
+ ReadOnlyCollectionTests* _tmp54_;
GTestSuite* _tmp55_ = NULL;
GTestSuite* _tmp56_ = NULL;
- TreeMultiMapTests* _tmp57_;
- TreeMultiMapTests* _tmp58_;
+ ReadOnlyListTests* _tmp57_;
+ ReadOnlyListTests* _tmp58_;
GTestSuite* _tmp59_ = NULL;
GTestSuite* _tmp60_ = NULL;
- TreeMultiSetTests* _tmp61_;
- TreeMultiSetTests* _tmp62_;
+ ReadOnlyMapTests* _tmp61_;
+ ReadOnlyMapTests* _tmp62_;
GTestSuite* _tmp63_ = NULL;
GTestSuite* _tmp64_ = NULL;
- TreeSetTests* _tmp65_;
- TreeSetTests* _tmp66_;
+ ReadOnlySetTests* _tmp65_;
+ ReadOnlySetTests* _tmp66_;
GTestSuite* _tmp67_ = NULL;
+ GTestSuite* _tmp68_ = NULL;
+ TreeMapTests* _tmp69_;
+ TreeMapTests* _tmp70_;
+ GTestSuite* _tmp71_ = NULL;
+ GTestSuite* _tmp72_ = NULL;
+ TreeMultiMapTests* _tmp73_;
+ TreeMultiMapTests* _tmp74_;
+ GTestSuite* _tmp75_ = NULL;
+ GTestSuite* _tmp76_ = NULL;
+ TreeMultiSetTests* _tmp77_;
+ TreeMultiSetTests* _tmp78_;
+ GTestSuite* _tmp79_ = NULL;
+ GTestSuite* _tmp80_ = NULL;
+ TreeSetTests* _tmp81_;
+ TreeSetTests* _tmp82_;
+ GTestSuite* _tmp83_ = NULL;
g_test_init (&args_length1, &args, NULL);
+ gee_hazard_pointer_set_release_policy (GEE_HAZARD_POINTER_RELEASE_POLICY_MAIN_LOOP);
_tmp0_ = g_test_get_root ();
_tmp1_ = array_list_tests_new ();
_tmp2_ = _tmp1_;
@@ -445,101 +559,125 @@ void _vala_main (gchar** args, int args_length1) {
g_test_suite_add_suite (_tmp0_, _tmp3_);
_g_object_unref0 (_tmp2_);
_tmp4_ = g_test_get_root ();
- _tmp5_ = comparable_tests_new ();
+ _tmp5_ = array_queue_tests_new ();
_tmp6_ = _tmp5_;
_tmp7_ = gee_test_case_get_suite ((GeeTestCase*) _tmp6_);
g_test_suite_add_suite (_tmp4_, _tmp7_);
_g_object_unref0 (_tmp6_);
_tmp8_ = g_test_get_root ();
- _tmp9_ = hash_map_tests_new ();
+ _tmp9_ = concurrent_list_tests_new ();
_tmp10_ = _tmp9_;
_tmp11_ = gee_test_case_get_suite ((GeeTestCase*) _tmp10_);
g_test_suite_add_suite (_tmp8_, _tmp11_);
_g_object_unref0 (_tmp10_);
_tmp12_ = g_test_get_root ();
- _tmp13_ = hash_multi_map_tests_new ();
+ _tmp13_ = concurrent_set_tests_new ();
_tmp14_ = _tmp13_;
_tmp15_ = gee_test_case_get_suite ((GeeTestCase*) _tmp14_);
g_test_suite_add_suite (_tmp12_, _tmp15_);
_g_object_unref0 (_tmp14_);
_tmp16_ = g_test_get_root ();
- _tmp17_ = hash_multi_set_tests_new ();
+ _tmp17_ = functions_tests_new ();
_tmp18_ = _tmp17_;
_tmp19_ = gee_test_case_get_suite ((GeeTestCase*) _tmp18_);
g_test_suite_add_suite (_tmp16_, _tmp19_);
_g_object_unref0 (_tmp18_);
_tmp20_ = g_test_get_root ();
- _tmp21_ = hash_set_tests_new ();
+ _tmp21_ = hash_map_tests_new ();
_tmp22_ = _tmp21_;
_tmp23_ = gee_test_case_get_suite ((GeeTestCase*) _tmp22_);
g_test_suite_add_suite (_tmp20_, _tmp23_);
_g_object_unref0 (_tmp22_);
_tmp24_ = g_test_get_root ();
- _tmp25_ = linked_list_tests_new ();
+ _tmp25_ = hash_multi_map_tests_new ();
_tmp26_ = _tmp25_;
_tmp27_ = gee_test_case_get_suite ((GeeTestCase*) _tmp26_);
g_test_suite_add_suite (_tmp24_, _tmp27_);
_g_object_unref0 (_tmp26_);
_tmp28_ = g_test_get_root ();
- _tmp29_ = linked_list_as_deque_tests_new ();
+ _tmp29_ = hash_multi_set_tests_new ();
_tmp30_ = _tmp29_;
_tmp31_ = gee_test_case_get_suite ((GeeTestCase*) _tmp30_);
g_test_suite_add_suite (_tmp28_, _tmp31_);
_g_object_unref0 (_tmp30_);
_tmp32_ = g_test_get_root ();
- _tmp33_ = priority_queue_tests_new ();
+ _tmp33_ = hash_set_tests_new ();
_tmp34_ = _tmp33_;
_tmp35_ = gee_test_case_get_suite ((GeeTestCase*) _tmp34_);
g_test_suite_add_suite (_tmp32_, _tmp35_);
_g_object_unref0 (_tmp34_);
_tmp36_ = g_test_get_root ();
- _tmp37_ = read_only_collection_tests_new ();
+ _tmp37_ = linked_list_tests_new ();
_tmp38_ = _tmp37_;
_tmp39_ = gee_test_case_get_suite ((GeeTestCase*) _tmp38_);
g_test_suite_add_suite (_tmp36_, _tmp39_);
_g_object_unref0 (_tmp38_);
_tmp40_ = g_test_get_root ();
- _tmp41_ = read_only_list_tests_new ();
+ _tmp41_ = linked_list_as_deque_tests_new ();
_tmp42_ = _tmp41_;
_tmp43_ = gee_test_case_get_suite ((GeeTestCase*) _tmp42_);
g_test_suite_add_suite (_tmp40_, _tmp43_);
_g_object_unref0 (_tmp42_);
_tmp44_ = g_test_get_root ();
- _tmp45_ = read_only_map_tests_new ();
+ _tmp45_ = priority_queue_tests_new ();
_tmp46_ = _tmp45_;
_tmp47_ = gee_test_case_get_suite ((GeeTestCase*) _tmp46_);
g_test_suite_add_suite (_tmp44_, _tmp47_);
_g_object_unref0 (_tmp46_);
_tmp48_ = g_test_get_root ();
- _tmp49_ = read_only_set_tests_new ();
+ _tmp49_ = read_only_bidir_list_tests_new ();
_tmp50_ = _tmp49_;
_tmp51_ = gee_test_case_get_suite ((GeeTestCase*) _tmp50_);
g_test_suite_add_suite (_tmp48_, _tmp51_);
_g_object_unref0 (_tmp50_);
_tmp52_ = g_test_get_root ();
- _tmp53_ = tree_map_tests_new ();
+ _tmp53_ = read_only_collection_tests_new ();
_tmp54_ = _tmp53_;
_tmp55_ = gee_test_case_get_suite ((GeeTestCase*) _tmp54_);
g_test_suite_add_suite (_tmp52_, _tmp55_);
_g_object_unref0 (_tmp54_);
_tmp56_ = g_test_get_root ();
- _tmp57_ = tree_multi_map_tests_new ();
+ _tmp57_ = read_only_list_tests_new ();
_tmp58_ = _tmp57_;
_tmp59_ = gee_test_case_get_suite ((GeeTestCase*) _tmp58_);
g_test_suite_add_suite (_tmp56_, _tmp59_);
_g_object_unref0 (_tmp58_);
_tmp60_ = g_test_get_root ();
- _tmp61_ = tree_multi_set_tests_new ();
+ _tmp61_ = read_only_map_tests_new ();
_tmp62_ = _tmp61_;
_tmp63_ = gee_test_case_get_suite ((GeeTestCase*) _tmp62_);
g_test_suite_add_suite (_tmp60_, _tmp63_);
_g_object_unref0 (_tmp62_);
_tmp64_ = g_test_get_root ();
- _tmp65_ = tree_set_tests_new ();
+ _tmp65_ = read_only_set_tests_new ();
_tmp66_ = _tmp65_;
_tmp67_ = gee_test_case_get_suite ((GeeTestCase*) _tmp66_);
g_test_suite_add_suite (_tmp64_, _tmp67_);
_g_object_unref0 (_tmp66_);
+ _tmp68_ = g_test_get_root ();
+ _tmp69_ = tree_map_tests_new ();
+ _tmp70_ = _tmp69_;
+ _tmp71_ = gee_test_case_get_suite ((GeeTestCase*) _tmp70_);
+ g_test_suite_add_suite (_tmp68_, _tmp71_);
+ _g_object_unref0 (_tmp70_);
+ _tmp72_ = g_test_get_root ();
+ _tmp73_ = tree_multi_map_tests_new ();
+ _tmp74_ = _tmp73_;
+ _tmp75_ = gee_test_case_get_suite ((GeeTestCase*) _tmp74_);
+ g_test_suite_add_suite (_tmp72_, _tmp75_);
+ _g_object_unref0 (_tmp74_);
+ _tmp76_ = g_test_get_root ();
+ _tmp77_ = tree_multi_set_tests_new ();
+ _tmp78_ = _tmp77_;
+ _tmp79_ = gee_test_case_get_suite ((GeeTestCase*) _tmp78_);
+ g_test_suite_add_suite (_tmp76_, _tmp79_);
+ _g_object_unref0 (_tmp78_);
+ _tmp80_ = g_test_get_root ();
+ _tmp81_ = tree_set_tests_new ();
+ _tmp82_ = _tmp81_;
+ _tmp83_ = gee_test_case_get_suite ((GeeTestCase*) _tmp82_);
+ g_test_suite_add_suite (_tmp80_, _tmp83_);
+ _g_object_unref0 (_tmp82_);
g_test_run ();
}
diff --git a/tests/testmain.vala b/tests/testmain.vala
index ad6e992..312c6ba 100644
--- a/tests/testmain.vala
+++ b/tests/testmain.vala
@@ -24,8 +24,13 @@
void main (string[] args) {
Test.init (ref args);
+ Gee.HazardPointer.set_release_policy(Gee.HazardPointer.ReleasePolicy.MAIN_LOOP);
+
TestSuite.get_root ().add_suite (new ArrayListTests ().get_suite ());
- TestSuite.get_root ().add_suite (new ComparableTests ().get_suite ());
+ TestSuite.get_root ().add_suite (new ArrayQueueTests ().get_suite ());
+ TestSuite.get_root ().add_suite (new ConcurrentListTests ().get_suite ());
+ TestSuite.get_root ().add_suite (new ConcurrentSetTests ().get_suite ());
+ TestSuite.get_root ().add_suite (new FunctionsTests ().get_suite ());
TestSuite.get_root ().add_suite (new HashMapTests ().get_suite ());
TestSuite.get_root ().add_suite (new HashMultiMapTests ().get_suite ());
TestSuite.get_root ().add_suite (new HashMultiSetTests ().get_suite ());
@@ -33,6 +38,7 @@ void main (string[] args) {
TestSuite.get_root ().add_suite (new LinkedListTests ().get_suite ());
TestSuite.get_root ().add_suite (new LinkedListAsDequeTests ().get_suite ());
TestSuite.get_root ().add_suite (new PriorityQueueTests ().get_suite ());
+ TestSuite.get_root ().add_suite (new ReadOnlyBidirListTests ().get_suite ());
TestSuite.get_root ().add_suite (new ReadOnlyCollectionTests ().get_suite ());
TestSuite.get_root ().add_suite (new ReadOnlyListTests ().get_suite ());
TestSuite.get_root ().add_suite (new ReadOnlyMapTests ().get_suite ());
diff --git a/tests/testmap.c b/tests/testmap.c
index e49ca88..aeded81 100644
--- a/tests/testmap.c
+++ b/tests/testmap.c
@@ -3,8 +3,8 @@
/* testmap.vala
*
- * Copyright (C) 2008 Jürg Billeter, Maciej Piechotka
- * Copyright (C) 2009 Didier Villevalois, Julien Peeters
+ * Copyright (C) 2008 Jürg Billeter
+ * Copyright (C) 2009 Didier Villevalois, Julien Peeters, Maciej Piechotka
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -66,6 +66,7 @@ typedef struct _MapTestsPrivate MapTestsPrivate;
typedef struct _MapTestsTestEntry MapTestsTestEntry;
typedef struct _MapTestsTestEntryClass MapTestsTestEntryClass;
+typedef struct _Block9Data Block9Data;
typedef struct _MapTestsTestEntryPrivate MapTestsTestEntryPrivate;
#define _k_destroy_func0(var) (((var == NULL) || (k_destroy_func == NULL)) ? NULL : (var = (k_destroy_func (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
@@ -92,6 +93,12 @@ struct _MapTestsClass {
};
typedef void (*GeeTestCaseTestMethod) (void* user_data);
+struct _Block9Data {
+ int _ref_count_;
+ MapTests * self;
+ gint count;
+};
+
struct _MapTestsTestEntry {
GeeMapEntry parent_instance;
MapTestsTestEntryPrivate * priv;
@@ -123,7 +130,7 @@ enum {
};
MapTests* map_tests_construct (GType object_type, const gchar* name);
GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void map_tests_test_type_correctness (MapTests* self);
static void _map_tests_test_type_correctness_gee_test_case_test_method (gpointer self);
void map_tests_test_has_key_size_is_empty (MapTests* self);
@@ -142,10 +149,27 @@ void map_tests_test_has_all (MapTests* self);
static void _map_tests_test_has_all_gee_test_case_test_method (gpointer self);
void map_tests_test_gobject_properties (MapTests* self);
static void _map_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
-MapTestsTestEntry* map_tests_test_entry_new (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, gconstpointer key, gconstpointer value);
-MapTestsTestEntry* map_tests_test_entry_construct (GType object_type, GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, gconstpointer key, gconstpointer value);
-GType map_tests_test_entry_get_type (void) G_GNUC_CONST;
+void map_tests_test_fold (MapTests* self);
+static void _map_tests_test_fold_gee_test_case_test_method (gpointer self);
+void map_tests_test_foreach (MapTests* self);
+static void _map_tests_test_foreach_gee_test_case_test_method (gpointer self);
+static MapTestsTestEntry* map_tests_test_entry_new (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, gconstpointer key, gconstpointer value);
+static MapTestsTestEntry* map_tests_test_entry_construct (GType object_type, GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, gconstpointer key, gconstpointer value);
+static GType map_tests_test_entry_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
void map_tests_test_clear (MapTests* self);
+static gint __lambda15_ (MapTests* self, const gchar* x, const gchar* y, gint z);
+static gpointer ___lambda15__gee_fold_map_func (gconstpointer k, gconstpointer v, gpointer a, gpointer self);
+static gint __lambda16_ (MapTests* self, const gchar* x, const gchar* y, gint z);
+static gpointer ___lambda16__gee_fold_map_func (gconstpointer k, gconstpointer v, gpointer a, gpointer self);
+static Block9Data* block9_data_ref (Block9Data* _data9_);
+static void block9_data_unref (void * _userdata_);
+static gboolean __lambda17_ (Block9Data* _data9_, const gchar* x, const gchar* y);
+static gboolean ___lambda17__gee_forall_map_func (gconstpointer k, gconstpointer v, gpointer self);
+static gboolean __lambda18_ (Block9Data* _data9_, const gchar* x, const gchar* y);
+static gboolean ___lambda18__gee_forall_map_func (gconstpointer k, gconstpointer v, gpointer self);
+GeeMapEntry* map_tests_entry_for (const gchar* key, const gchar* value);
+gboolean map_tests_check_entry (GeeMapEntry* e, const gchar* key, const gchar* value);
+void map_tests_assert_entry (GeeMapEntry* e, const gchar* key, const gchar* value);
#define MAP_TESTS_TEST_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MAP_TESTS_TYPE_TEST_ENTRY, MapTestsTestEntryPrivate))
enum {
MAP_TESTS_TEST_ENTRY_DUMMY_PROPERTY,
@@ -156,7 +180,8 @@ enum {
MAP_TESTS_TEST_ENTRY_V_DUP_FUNC,
MAP_TESTS_TEST_ENTRY_V_DESTROY_FUNC,
MAP_TESTS_TEST_ENTRY_KEY,
- MAP_TESTS_TEST_ENTRY_VALUE
+ MAP_TESTS_TEST_ENTRY_VALUE,
+ MAP_TESTS_TEST_ENTRY_READ_ONLY
};
static void map_tests_test_entry_finalize (GObject* obj);
static void _vala_map_tests_test_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
@@ -209,21 +234,33 @@ static void _map_tests_test_gobject_properties_gee_test_case_test_method (gpoint
}
+static void _map_tests_test_fold_gee_test_case_test_method (gpointer self) {
+ map_tests_test_fold (self);
+}
+
+
+static void _map_tests_test_foreach_gee_test_case_test_method (gpointer self) {
+ map_tests_test_foreach (self);
+}
+
+
MapTests* map_tests_construct (GType object_type, const gchar* name) {
MapTests * self = NULL;
const gchar* _tmp0_;
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (MapTests*) gee_test_case_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] type correctness", _map_tests_test_type_correctness_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] has_key, size and is_empty", _map_tests_test_has_key_size_is_empty_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] keys", _map_tests_test_keys_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] values", _map_tests_test_values_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] entries", _map_tests_test_entries_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] set all", _map_tests_test_set_all_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] unset all", _map_tests_test_unset_all_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] has all", _map_tests_test_has_all_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Map] GObject properties", _map_tests_test_gobject_properties_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] type correctness", _map_tests_test_type_correctness_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] has_key, size and is_empty", _map_tests_test_has_key_size_is_empty_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] keys", _map_tests_test_keys_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] values", _map_tests_test_values_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] entries", _map_tests_test_entries_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] set all", _map_tests_test_set_all_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] unset all", _map_tests_test_unset_all_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] has all", _map_tests_test_has_all_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] GObject properties", _map_tests_test_gobject_properties_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] fold", _map_tests_test_fold_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] foreach", _map_tests_test_foreach_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -1349,30 +1386,30 @@ void map_tests_test_clear (MapTests* self) {
void map_tests_test_set_all (MapTests* self) {
- GHashFunc _tmp0_;
- GEqualFunc _tmp1_;
- GEqualFunc _tmp2_;
- GeeHashMap* _tmp3_;
+ GeeHashMap* _tmp0_;
GeeHashMap* another_map;
+ GeeMap* _tmp1_;
+ GeeMap* _tmp2_;
+ GeeMap* _tmp3_;
GeeMap* _tmp4_;
GeeMap* _tmp5_;
- GeeMap* _tmp6_;
- GeeMap* _tmp7_;
+ gint _tmp6_;
+ gint _tmp7_;
GeeMap* _tmp8_;
- gint _tmp9_;
- gint _tmp10_;
- GeeMap* _tmp11_;
- gboolean _tmp12_ = FALSE;
- GeeMap* _tmp13_;
- gboolean _tmp14_ = FALSE;
- GeeMap* _tmp15_;
- gboolean _tmp16_ = FALSE;
- GeeMap* _tmp17_;
- gboolean _tmp18_ = FALSE;
- GeeMap* _tmp19_;
- gboolean _tmp20_ = FALSE;
- GeeMap* _tmp21_;
- gboolean _tmp22_ = FALSE;
+ gboolean _tmp9_ = FALSE;
+ GeeMap* _tmp10_;
+ gboolean _tmp11_ = FALSE;
+ GeeMap* _tmp12_;
+ gboolean _tmp13_ = FALSE;
+ GeeMap* _tmp14_;
+ gboolean _tmp15_ = FALSE;
+ GeeMap* _tmp16_;
+ gboolean _tmp17_ = FALSE;
+ GeeMap* _tmp18_;
+ gboolean _tmp19_ = FALSE;
+ GeeMap* _tmp20_;
+ gpointer _tmp21_ = NULL;
+ gchar* _tmp22_;
GeeMap* _tmp23_;
gpointer _tmp24_ = NULL;
gchar* _tmp25_;
@@ -1388,299 +1425,287 @@ void map_tests_test_set_all (MapTests* self) {
GeeMap* _tmp35_;
gpointer _tmp36_ = NULL;
gchar* _tmp37_;
- GeeMap* _tmp38_;
- gpointer _tmp39_ = NULL;
- gchar* _tmp40_;
g_return_if_fail (self != NULL);
- _tmp0_ = g_str_hash;
- _tmp1_ = g_str_equal;
- _tmp2_ = g_str_equal;
- _tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_, _tmp2_);
- another_map = _tmp3_;
- _tmp4_ = self->test_map;
- gee_map_set (_tmp4_, "one", "value_of_one");
- _tmp5_ = self->test_map;
- gee_map_set (_tmp5_, "two", "value_of_two");
- _tmp6_ = self->test_map;
- gee_map_set (_tmp6_, "three", "value_of_three");
+ _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ another_map = _tmp0_;
+ _tmp1_ = self->test_map;
+ gee_map_set (_tmp1_, "one", "value_of_one");
+ _tmp2_ = self->test_map;
+ gee_map_set (_tmp2_, "two", "value_of_two");
+ _tmp3_ = self->test_map;
+ gee_map_set (_tmp3_, "three", "value_of_three");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "four", "value_of_four");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "five", "value_of_five");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "six", "value_of_six");
- _tmp7_ = self->test_map;
- gee_map_set_all (_tmp7_, (GeeMap*) another_map);
+ _tmp4_ = self->test_map;
+ gee_map_set_all (_tmp4_, (GeeMap*) another_map);
+ _tmp5_ = self->test_map;
+ _tmp6_ = gee_map_get_size (_tmp5_);
+ _tmp7_ = _tmp6_;
+ _vala_assert (_tmp7_ == 6, "test_map.size == 6");
_tmp8_ = self->test_map;
- _tmp9_ = gee_map_get_size (_tmp8_);
- _tmp10_ = _tmp9_;
- _vala_assert (_tmp10_ == 6, "test_map.size == 6");
- _tmp11_ = self->test_map;
- _tmp12_ = gee_map_has_key (_tmp11_, "one");
- _vala_assert (_tmp12_, "test_map.has_key (\"one\")");
- _tmp13_ = self->test_map;
- _tmp14_ = gee_map_has_key (_tmp13_, "two");
- _vala_assert (_tmp14_, "test_map.has_key (\"two\")");
- _tmp15_ = self->test_map;
- _tmp16_ = gee_map_has_key (_tmp15_, "three");
- _vala_assert (_tmp16_, "test_map.has_key (\"three\")");
- _tmp17_ = self->test_map;
- _tmp18_ = gee_map_has_key (_tmp17_, "four");
- _vala_assert (_tmp18_, "test_map.has_key (\"four\")");
- _tmp19_ = self->test_map;
- _tmp20_ = gee_map_has_key (_tmp19_, "five");
- _vala_assert (_tmp20_, "test_map.has_key (\"five\")");
- _tmp21_ = self->test_map;
- _tmp22_ = gee_map_has_key (_tmp21_, "six");
- _vala_assert (_tmp22_, "test_map.has_key (\"six\")");
+ _tmp9_ = gee_map_has_key (_tmp8_, "one");
+ _vala_assert (_tmp9_, "test_map.has_key (\"one\")");
+ _tmp10_ = self->test_map;
+ _tmp11_ = gee_map_has_key (_tmp10_, "two");
+ _vala_assert (_tmp11_, "test_map.has_key (\"two\")");
+ _tmp12_ = self->test_map;
+ _tmp13_ = gee_map_has_key (_tmp12_, "three");
+ _vala_assert (_tmp13_, "test_map.has_key (\"three\")");
+ _tmp14_ = self->test_map;
+ _tmp15_ = gee_map_has_key (_tmp14_, "four");
+ _vala_assert (_tmp15_, "test_map.has_key (\"four\")");
+ _tmp16_ = self->test_map;
+ _tmp17_ = gee_map_has_key (_tmp16_, "five");
+ _vala_assert (_tmp17_, "test_map.has_key (\"five\")");
+ _tmp18_ = self->test_map;
+ _tmp19_ = gee_map_has_key (_tmp18_, "six");
+ _vala_assert (_tmp19_, "test_map.has_key (\"six\")");
+ _tmp20_ = self->test_map;
+ _tmp21_ = gee_map_get (_tmp20_, "one");
+ _tmp22_ = (gchar*) _tmp21_;
+ _vala_assert (g_strcmp0 (_tmp22_, "value_of_one") == 0, "test_map.get (\"one\") == \"value_of_one\"");
+ _g_free0 (_tmp22_);
_tmp23_ = self->test_map;
- _tmp24_ = gee_map_get (_tmp23_, "one");
+ _tmp24_ = gee_map_get (_tmp23_, "two");
_tmp25_ = (gchar*) _tmp24_;
- _vala_assert (g_strcmp0 (_tmp25_, "value_of_one") == 0, "test_map.get (\"one\") == \"value_of_one\"");
+ _vala_assert (g_strcmp0 (_tmp25_, "value_of_two") == 0, "test_map.get (\"two\") == \"value_of_two\"");
_g_free0 (_tmp25_);
_tmp26_ = self->test_map;
- _tmp27_ = gee_map_get (_tmp26_, "two");
+ _tmp27_ = gee_map_get (_tmp26_, "three");
_tmp28_ = (gchar*) _tmp27_;
- _vala_assert (g_strcmp0 (_tmp28_, "value_of_two") == 0, "test_map.get (\"two\") == \"value_of_two\"");
+ _vala_assert (g_strcmp0 (_tmp28_, "value_of_three") == 0, "test_map.get (\"three\") == \"value_of_three\"");
_g_free0 (_tmp28_);
_tmp29_ = self->test_map;
- _tmp30_ = gee_map_get (_tmp29_, "three");
+ _tmp30_ = gee_map_get (_tmp29_, "four");
_tmp31_ = (gchar*) _tmp30_;
- _vala_assert (g_strcmp0 (_tmp31_, "value_of_three") == 0, "test_map.get (\"three\") == \"value_of_three\"");
+ _vala_assert (g_strcmp0 (_tmp31_, "value_of_four") == 0, "test_map.get (\"four\") == \"value_of_four\"");
_g_free0 (_tmp31_);
_tmp32_ = self->test_map;
- _tmp33_ = gee_map_get (_tmp32_, "four");
+ _tmp33_ = gee_map_get (_tmp32_, "five");
_tmp34_ = (gchar*) _tmp33_;
- _vala_assert (g_strcmp0 (_tmp34_, "value_of_four") == 0, "test_map.get (\"four\") == \"value_of_four\"");
+ _vala_assert (g_strcmp0 (_tmp34_, "value_of_five") == 0, "test_map.get (\"five\") == \"value_of_five\"");
_g_free0 (_tmp34_);
_tmp35_ = self->test_map;
- _tmp36_ = gee_map_get (_tmp35_, "five");
+ _tmp36_ = gee_map_get (_tmp35_, "six");
_tmp37_ = (gchar*) _tmp36_;
- _vala_assert (g_strcmp0 (_tmp37_, "value_of_five") == 0, "test_map.get (\"five\") == \"value_of_five\"");
+ _vala_assert (g_strcmp0 (_tmp37_, "value_of_six") == 0, "test_map.get (\"six\") == \"value_of_six\"");
_g_free0 (_tmp37_);
- _tmp38_ = self->test_map;
- _tmp39_ = gee_map_get (_tmp38_, "six");
- _tmp40_ = (gchar*) _tmp39_;
- _vala_assert (g_strcmp0 (_tmp40_, "value_of_six") == 0, "test_map.get (\"six\") == \"value_of_six\"");
- _g_free0 (_tmp40_);
_g_object_unref0 (another_map);
}
void map_tests_test_unset_all (MapTests* self) {
- GHashFunc _tmp0_;
- GEqualFunc _tmp1_;
- GEqualFunc _tmp2_;
- GeeHashMap* _tmp3_;
+ GeeHashMap* _tmp0_;
GeeHashMap* another_map;
- GeeMap* _tmp4_;
+ GeeMap* _tmp1_;
+ gboolean _tmp2_;
+ gboolean _tmp3_;
+ gboolean _tmp4_;
gboolean _tmp5_;
- gboolean _tmp6_;
- gboolean _tmp7_;
- gboolean _tmp8_;
- GeeMap* _tmp9_;
- gboolean _tmp10_ = FALSE;
- GeeMap* _tmp11_;
+ GeeMap* _tmp6_;
+ gboolean _tmp7_ = FALSE;
+ GeeMap* _tmp8_;
+ gboolean _tmp9_;
+ gboolean _tmp10_;
+ gboolean _tmp11_;
gboolean _tmp12_;
- gboolean _tmp13_;
- gboolean _tmp14_;
+ GeeMap* _tmp13_;
+ GeeMap* _tmp14_;
gboolean _tmp15_;
- GeeMap* _tmp16_;
- GeeMap* _tmp17_;
- gboolean _tmp18_;
- gboolean _tmp19_;
- gint _tmp20_;
- gint _tmp21_;
- GeeMap* _tmp22_;
- gboolean _tmp23_ = FALSE;
- GeeMap* _tmp24_;
- gboolean _tmp25_;
- gboolean _tmp26_;
- gint _tmp27_;
- gint _tmp28_;
+ gboolean _tmp16_;
+ gint _tmp17_;
+ gint _tmp18_;
+ GeeMap* _tmp19_;
+ gboolean _tmp20_ = FALSE;
+ GeeMap* _tmp21_;
+ gboolean _tmp22_;
+ gboolean _tmp23_;
+ gint _tmp24_;
+ gint _tmp25_;
+ GeeMap* _tmp26_;
+ GeeMap* _tmp27_;
+ GeeMap* _tmp28_;
GeeMap* _tmp29_;
- GeeMap* _tmp30_;
- GeeMap* _tmp31_;
- GeeMap* _tmp32_;
- gint _tmp33_;
- gint _tmp34_;
- gboolean _tmp35_;
- gboolean _tmp36_;
- GeeMap* _tmp37_;
- gboolean _tmp38_ = FALSE;
- GeeMap* _tmp39_;
- gint _tmp40_;
- gint _tmp41_;
- gboolean _tmp42_;
- gboolean _tmp43_;
+ gint _tmp30_;
+ gint _tmp31_;
+ gboolean _tmp32_;
+ gboolean _tmp33_;
+ GeeMap* _tmp34_;
+ gboolean _tmp35_ = FALSE;
+ GeeMap* _tmp36_;
+ gint _tmp37_;
+ gint _tmp38_;
+ gboolean _tmp39_;
+ gboolean _tmp40_;
+ GeeMap* _tmp41_;
+ GeeMap* _tmp42_;
+ GeeMap* _tmp43_;
GeeMap* _tmp44_;
- GeeMap* _tmp45_;
- GeeMap* _tmp46_;
- GeeMap* _tmp47_;
+ gint _tmp45_;
+ gint _tmp46_;
+ gint _tmp47_;
gint _tmp48_;
- gint _tmp49_;
- gint _tmp50_;
- gint _tmp51_;
- GeeMap* _tmp52_;
- gboolean _tmp53_ = FALSE;
- GeeMap* _tmp54_;
- gboolean _tmp55_;
- gboolean _tmp56_;
- gint _tmp57_;
- gint _tmp58_;
+ GeeMap* _tmp49_;
+ gboolean _tmp50_ = FALSE;
+ GeeMap* _tmp51_;
+ gboolean _tmp52_;
+ gboolean _tmp53_;
+ gint _tmp54_;
+ gint _tmp55_;
+ GeeMap* _tmp56_;
+ GeeMap* _tmp57_;
+ GeeMap* _tmp58_;
GeeMap* _tmp59_;
GeeMap* _tmp60_;
- GeeMap* _tmp61_;
- GeeMap* _tmp62_;
- GeeMap* _tmp63_;
+ gint _tmp61_;
+ gint _tmp62_;
+ gint _tmp63_;
gint _tmp64_;
- gint _tmp65_;
- gint _tmp66_;
- gint _tmp67_;
- GeeMap* _tmp68_;
- gboolean _tmp69_ = FALSE;
- GeeMap* _tmp70_;
+ GeeMap* _tmp65_;
+ gboolean _tmp66_ = FALSE;
+ GeeMap* _tmp67_;
+ gint _tmp68_;
+ gint _tmp69_;
+ gint _tmp70_;
gint _tmp71_;
- gint _tmp72_;
- gint _tmp73_;
- gint _tmp74_;
- GeeMap* _tmp75_;
- gboolean _tmp76_ = FALSE;
+ GeeMap* _tmp72_;
+ gboolean _tmp73_ = FALSE;
g_return_if_fail (self != NULL);
- _tmp0_ = g_str_hash;
- _tmp1_ = g_str_equal;
- _tmp2_ = g_str_equal;
- _tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_, _tmp2_);
- another_map = _tmp3_;
- _tmp4_ = self->test_map;
- _tmp5_ = gee_map_get_is_empty (_tmp4_);
- _tmp6_ = _tmp5_;
- _vala_assert (_tmp6_, "test_map.is_empty");
- _tmp7_ = gee_abstract_map_get_is_empty ((GeeAbstractMap*) another_map);
- _tmp8_ = _tmp7_;
- _vala_assert (_tmp8_, "another_map.is_empty");
- _tmp9_ = self->test_map;
- _tmp10_ = gee_map_unset_all (_tmp9_, (GeeMap*) another_map);
- _vala_assert (!_tmp10_, "! test_map.unset_all (another_map)");
- _tmp11_ = self->test_map;
- _tmp12_ = gee_map_get_is_empty (_tmp11_);
- _tmp13_ = _tmp12_;
- _vala_assert (_tmp13_, "test_map.is_empty");
- _tmp14_ = gee_abstract_map_get_is_empty ((GeeAbstractMap*) another_map);
- _tmp15_ = _tmp14_;
- _vala_assert (_tmp15_, "another_map.is_empty");
- _tmp16_ = self->test_map;
- gee_map_clear (_tmp16_);
+ _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ another_map = _tmp0_;
+ _tmp1_ = self->test_map;
+ _tmp2_ = gee_map_get_is_empty (_tmp1_);
+ _tmp3_ = _tmp2_;
+ _vala_assert (_tmp3_, "test_map.is_empty");
+ _tmp4_ = gee_map_get_is_empty ((GeeMap*) another_map);
+ _tmp5_ = _tmp4_;
+ _vala_assert (_tmp5_, "another_map.is_empty");
+ _tmp6_ = self->test_map;
+ _tmp7_ = gee_map_unset_all (_tmp6_, (GeeMap*) another_map);
+ _vala_assert (!_tmp7_, "! test_map.unset_all (another_map)");
+ _tmp8_ = self->test_map;
+ _tmp9_ = gee_map_get_is_empty (_tmp8_);
+ _tmp10_ = _tmp9_;
+ _vala_assert (_tmp10_, "test_map.is_empty");
+ _tmp11_ = gee_map_get_is_empty ((GeeMap*) another_map);
+ _tmp12_ = _tmp11_;
+ _vala_assert (_tmp12_, "another_map.is_empty");
+ _tmp13_ = self->test_map;
+ gee_map_clear (_tmp13_);
gee_abstract_map_clear ((GeeAbstractMap*) another_map);
gee_abstract_map_set ((GeeAbstractMap*) another_map, "one", "value_of_one");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "two", "value_of_two");
- _tmp17_ = self->test_map;
- _tmp18_ = gee_map_get_is_empty (_tmp17_);
- _tmp19_ = _tmp18_;
- _vala_assert (_tmp19_, "test_map.is_empty");
- _tmp20_ = gee_abstract_map_get_size ((GeeMap*) another_map);
- _tmp21_ = _tmp20_;
- _vala_assert (_tmp21_ == 2, "another_map.size == 2");
- _tmp22_ = self->test_map;
- _tmp23_ = gee_map_unset_all (_tmp22_, (GeeMap*) another_map);
- _vala_assert (!_tmp23_, "! test_map.unset_all (another_map)");
- _tmp24_ = self->test_map;
- _tmp25_ = gee_map_get_is_empty (_tmp24_);
- _tmp26_ = _tmp25_;
- _vala_assert (_tmp26_, "test_map.is_empty");
- _tmp27_ = gee_abstract_map_get_size ((GeeMap*) another_map);
- _tmp28_ = _tmp27_;
- _vala_assert (_tmp28_ == 2, "another_map.size == 2");
- _tmp29_ = self->test_map;
- gee_map_clear (_tmp29_);
+ _tmp14_ = self->test_map;
+ _tmp15_ = gee_map_get_is_empty (_tmp14_);
+ _tmp16_ = _tmp15_;
+ _vala_assert (_tmp16_, "test_map.is_empty");
+ _tmp17_ = gee_abstract_map_get_size ((GeeMap*) another_map);
+ _tmp18_ = _tmp17_;
+ _vala_assert (_tmp18_ == 2, "another_map.size == 2");
+ _tmp19_ = self->test_map;
+ _tmp20_ = gee_map_unset_all (_tmp19_, (GeeMap*) another_map);
+ _vala_assert (!_tmp20_, "! test_map.unset_all (another_map)");
+ _tmp21_ = self->test_map;
+ _tmp22_ = gee_map_get_is_empty (_tmp21_);
+ _tmp23_ = _tmp22_;
+ _vala_assert (_tmp23_, "test_map.is_empty");
+ _tmp24_ = gee_abstract_map_get_size ((GeeMap*) another_map);
+ _tmp25_ = _tmp24_;
+ _vala_assert (_tmp25_ == 2, "another_map.size == 2");
+ _tmp26_ = self->test_map;
+ gee_map_clear (_tmp26_);
gee_abstract_map_clear ((GeeAbstractMap*) another_map);
- _tmp30_ = self->test_map;
- gee_map_set (_tmp30_, "one", "value_of_one");
- _tmp31_ = self->test_map;
- gee_map_set (_tmp31_, "two", "value_of_two");
- _tmp32_ = self->test_map;
- _tmp33_ = gee_map_get_size (_tmp32_);
- _tmp34_ = _tmp33_;
- _vala_assert (_tmp34_ == 2, "test_map.size == 2");
- _tmp35_ = gee_abstract_map_get_is_empty ((GeeAbstractMap*) another_map);
- _tmp36_ = _tmp35_;
- _vala_assert (_tmp36_, "another_map.is_empty");
- _tmp37_ = self->test_map;
- _tmp38_ = gee_map_unset_all (_tmp37_, (GeeMap*) another_map);
- _vala_assert (!_tmp38_, "! test_map.unset_all (another_map)");
- _tmp39_ = self->test_map;
- _tmp40_ = gee_map_get_size (_tmp39_);
- _tmp41_ = _tmp40_;
- _vala_assert (_tmp41_ == 2, "test_map.size == 2");
- _tmp42_ = gee_abstract_map_get_is_empty ((GeeAbstractMap*) another_map);
- _tmp43_ = _tmp42_;
- _vala_assert (_tmp43_, "another_map.is_empty");
- _tmp44_ = self->test_map;
- gee_map_clear (_tmp44_);
+ _tmp27_ = self->test_map;
+ gee_map_set (_tmp27_, "one", "value_of_one");
+ _tmp28_ = self->test_map;
+ gee_map_set (_tmp28_, "two", "value_of_two");
+ _tmp29_ = self->test_map;
+ _tmp30_ = gee_map_get_size (_tmp29_);
+ _tmp31_ = _tmp30_;
+ _vala_assert (_tmp31_ == 2, "test_map.size == 2");
+ _tmp32_ = gee_map_get_is_empty ((GeeMap*) another_map);
+ _tmp33_ = _tmp32_;
+ _vala_assert (_tmp33_, "another_map.is_empty");
+ _tmp34_ = self->test_map;
+ _tmp35_ = gee_map_unset_all (_tmp34_, (GeeMap*) another_map);
+ _vala_assert (!_tmp35_, "! test_map.unset_all (another_map)");
+ _tmp36_ = self->test_map;
+ _tmp37_ = gee_map_get_size (_tmp36_);
+ _tmp38_ = _tmp37_;
+ _vala_assert (_tmp38_ == 2, "test_map.size == 2");
+ _tmp39_ = gee_map_get_is_empty ((GeeMap*) another_map);
+ _tmp40_ = _tmp39_;
+ _vala_assert (_tmp40_, "another_map.is_empty");
+ _tmp41_ = self->test_map;
+ gee_map_clear (_tmp41_);
gee_abstract_map_clear ((GeeAbstractMap*) another_map);
- _tmp45_ = self->test_map;
- gee_map_set (_tmp45_, "one", "value_of_one");
- _tmp46_ = self->test_map;
- gee_map_set (_tmp46_, "two", "value_of_two");
+ _tmp42_ = self->test_map;
+ gee_map_set (_tmp42_, "one", "value_of_one");
+ _tmp43_ = self->test_map;
+ gee_map_set (_tmp43_, "two", "value_of_two");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "one", "value_of_one");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "two", "value_of_two");
- _tmp47_ = self->test_map;
- _tmp48_ = gee_map_get_size (_tmp47_);
- _tmp49_ = _tmp48_;
- _vala_assert (_tmp49_ == 2, "test_map.size == 2");
- _tmp50_ = gee_abstract_map_get_size ((GeeMap*) another_map);
- _tmp51_ = _tmp50_;
- _vala_assert (_tmp51_ == 2, "another_map.size == 2");
- _tmp52_ = self->test_map;
- _tmp53_ = gee_map_unset_all (_tmp52_, (GeeMap*) another_map);
- _vala_assert (_tmp53_, "test_map.unset_all (another_map)");
- _tmp54_ = self->test_map;
- _tmp55_ = gee_map_get_is_empty (_tmp54_);
- _tmp56_ = _tmp55_;
- _vala_assert (_tmp56_, "test_map.is_empty");
- _tmp57_ = gee_abstract_map_get_size ((GeeMap*) another_map);
- _tmp58_ = _tmp57_;
- _vala_assert (_tmp58_ == 2, "another_map.size == 2");
- _tmp59_ = self->test_map;
- gee_map_clear (_tmp59_);
+ _tmp44_ = self->test_map;
+ _tmp45_ = gee_map_get_size (_tmp44_);
+ _tmp46_ = _tmp45_;
+ _vala_assert (_tmp46_ == 2, "test_map.size == 2");
+ _tmp47_ = gee_abstract_map_get_size ((GeeMap*) another_map);
+ _tmp48_ = _tmp47_;
+ _vala_assert (_tmp48_ == 2, "another_map.size == 2");
+ _tmp49_ = self->test_map;
+ _tmp50_ = gee_map_unset_all (_tmp49_, (GeeMap*) another_map);
+ _vala_assert (_tmp50_, "test_map.unset_all (another_map)");
+ _tmp51_ = self->test_map;
+ _tmp52_ = gee_map_get_is_empty (_tmp51_);
+ _tmp53_ = _tmp52_;
+ _vala_assert (_tmp53_, "test_map.is_empty");
+ _tmp54_ = gee_abstract_map_get_size ((GeeMap*) another_map);
+ _tmp55_ = _tmp54_;
+ _vala_assert (_tmp55_ == 2, "another_map.size == 2");
+ _tmp56_ = self->test_map;
+ gee_map_clear (_tmp56_);
gee_abstract_map_clear ((GeeAbstractMap*) another_map);
- _tmp60_ = self->test_map;
- gee_map_set (_tmp60_, "one", "value_of_one");
- _tmp61_ = self->test_map;
- gee_map_set (_tmp61_, "two", "value_of_two");
- _tmp62_ = self->test_map;
- gee_map_set (_tmp62_, "three", "value_of_three");
+ _tmp57_ = self->test_map;
+ gee_map_set (_tmp57_, "one", "value_of_one");
+ _tmp58_ = self->test_map;
+ gee_map_set (_tmp58_, "two", "value_of_two");
+ _tmp59_ = self->test_map;
+ gee_map_set (_tmp59_, "three", "value_of_three");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "two", "value_of_two");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "three", "value_of_three");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "four", "value_of_four");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "five", "value_of_five");
- _tmp63_ = self->test_map;
- _tmp64_ = gee_map_get_size (_tmp63_);
- _tmp65_ = _tmp64_;
- _vala_assert (_tmp65_ == 3, "test_map.size == 3");
- _tmp66_ = gee_abstract_map_get_size ((GeeMap*) another_map);
- _tmp67_ = _tmp66_;
- _vala_assert (_tmp67_ == 4, "another_map.size == 4");
- _tmp68_ = self->test_map;
- _tmp69_ = gee_map_unset_all (_tmp68_, (GeeMap*) another_map);
- _vala_assert (_tmp69_, "test_map.unset_all (another_map)");
- _tmp70_ = self->test_map;
- _tmp71_ = gee_map_get_size (_tmp70_);
- _tmp72_ = _tmp71_;
- _vala_assert (_tmp72_ == 1, "test_map.size == 1");
- _tmp73_ = gee_abstract_map_get_size ((GeeMap*) another_map);
- _tmp74_ = _tmp73_;
- _vala_assert (_tmp74_ == 4, "another_map.size == 4");
- _tmp75_ = self->test_map;
- _tmp76_ = gee_map_has_key (_tmp75_, "one");
- _vala_assert (_tmp76_, "test_map.has_key (\"one\")");
+ _tmp60_ = self->test_map;
+ _tmp61_ = gee_map_get_size (_tmp60_);
+ _tmp62_ = _tmp61_;
+ _vala_assert (_tmp62_ == 3, "test_map.size == 3");
+ _tmp63_ = gee_abstract_map_get_size ((GeeMap*) another_map);
+ _tmp64_ = _tmp63_;
+ _vala_assert (_tmp64_ == 4, "another_map.size == 4");
+ _tmp65_ = self->test_map;
+ _tmp66_ = gee_map_unset_all (_tmp65_, (GeeMap*) another_map);
+ _vala_assert (_tmp66_, "test_map.unset_all (another_map)");
+ _tmp67_ = self->test_map;
+ _tmp68_ = gee_map_get_size (_tmp67_);
+ _tmp69_ = _tmp68_;
+ _vala_assert (_tmp69_ == 1, "test_map.size == 1");
+ _tmp70_ = gee_abstract_map_get_size ((GeeMap*) another_map);
+ _tmp71_ = _tmp70_;
+ _vala_assert (_tmp71_ == 4, "another_map.size == 4");
+ _tmp72_ = self->test_map;
+ _tmp73_ = gee_map_has_key (_tmp72_, "one");
+ _vala_assert (_tmp73_, "test_map.has_key (\"one\")");
_g_object_unref0 (another_map);
}
void map_tests_test_has_all (MapTests* self) {
- GHashFunc _tmp0_;
- GEqualFunc _tmp1_;
- GEqualFunc _tmp2_;
- GeeHashMap* _tmp3_;
+ GeeHashMap* _tmp0_;
GeeHashMap* another_map;
+ GeeMap* _tmp1_;
+ gboolean _tmp2_ = FALSE;
+ GeeMap* _tmp3_;
GeeMap* _tmp4_;
gboolean _tmp5_ = FALSE;
GeeMap* _tmp6_;
@@ -1688,136 +1713,130 @@ void map_tests_test_has_all (MapTests* self) {
gboolean _tmp8_ = FALSE;
GeeMap* _tmp9_;
GeeMap* _tmp10_;
- gboolean _tmp11_ = FALSE;
+ GeeMap* _tmp11_;
GeeMap* _tmp12_;
- GeeMap* _tmp13_;
+ gboolean _tmp13_ = FALSE;
GeeMap* _tmp14_;
GeeMap* _tmp15_;
- gboolean _tmp16_ = FALSE;
+ GeeMap* _tmp16_;
GeeMap* _tmp17_;
- GeeMap* _tmp18_;
+ gboolean _tmp18_ = FALSE;
GeeMap* _tmp19_;
GeeMap* _tmp20_;
- gboolean _tmp21_ = FALSE;
- GeeMap* _tmp22_;
+ GeeMap* _tmp21_;
+ gboolean _tmp22_ = FALSE;
GeeMap* _tmp23_;
GeeMap* _tmp24_;
- gboolean _tmp25_ = FALSE;
+ GeeMap* _tmp25_;
GeeMap* _tmp26_;
GeeMap* _tmp27_;
GeeMap* _tmp28_;
GeeMap* _tmp29_;
GeeMap* _tmp30_;
- GeeMap* _tmp31_;
+ gboolean _tmp31_ = FALSE;
GeeMap* _tmp32_;
GeeMap* _tmp33_;
- gboolean _tmp34_ = FALSE;
+ GeeMap* _tmp34_;
GeeMap* _tmp35_;
GeeMap* _tmp36_;
GeeMap* _tmp37_;
GeeMap* _tmp38_;
GeeMap* _tmp39_;
- GeeMap* _tmp40_;
- GeeMap* _tmp41_;
- GeeMap* _tmp42_;
- gboolean _tmp43_ = FALSE;
+ gboolean _tmp40_ = FALSE;
g_return_if_fail (self != NULL);
- _tmp0_ = g_str_hash;
- _tmp1_ = g_str_equal;
- _tmp2_ = g_str_equal;
- _tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_, _tmp2_);
- another_map = _tmp3_;
+ _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ another_map = _tmp0_;
+ _tmp1_ = self->test_map;
+ _tmp2_ = gee_map_has_all (_tmp1_, (GeeMap*) another_map);
+ _vala_assert (_tmp2_, "test_map.has_all (another_map)");
+ _tmp3_ = self->test_map;
+ gee_map_set (_tmp3_, "one", "value_of_one");
_tmp4_ = self->test_map;
_tmp5_ = gee_map_has_all (_tmp4_, (GeeMap*) another_map);
_vala_assert (_tmp5_, "test_map.has_all (another_map)");
_tmp6_ = self->test_map;
- gee_map_set (_tmp6_, "one", "value_of_one");
+ gee_map_clear (_tmp6_);
+ gee_abstract_map_clear ((GeeAbstractMap*) another_map);
+ gee_abstract_map_set ((GeeAbstractMap*) another_map, "one", "value_of_one");
_tmp7_ = self->test_map;
_tmp8_ = gee_map_has_all (_tmp7_, (GeeMap*) another_map);
- _vala_assert (_tmp8_, "test_map.has_all (another_map)");
+ _vala_assert (!_tmp8_, "! test_map.has_all (another_map)");
_tmp9_ = self->test_map;
gee_map_clear (_tmp9_);
gee_abstract_map_clear ((GeeAbstractMap*) another_map);
- gee_abstract_map_set ((GeeAbstractMap*) another_map, "one", "value_of_one");
_tmp10_ = self->test_map;
- _tmp11_ = gee_map_has_all (_tmp10_, (GeeMap*) another_map);
- _vala_assert (!_tmp11_, "! test_map.has_all (another_map)");
- _tmp12_ = self->test_map;
- gee_map_clear (_tmp12_);
- gee_abstract_map_clear ((GeeAbstractMap*) another_map);
- _tmp13_ = self->test_map;
- gee_map_set (_tmp13_, "one", "value_of_one");
- _tmp14_ = self->test_map;
- gee_map_set (_tmp14_, "two", "value_of_two");
+ gee_map_set (_tmp10_, "one", "value_of_one");
+ _tmp11_ = self->test_map;
+ gee_map_set (_tmp11_, "two", "value_of_two");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "one", "value_of_one");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "two", "value_of_two");
- _tmp15_ = self->test_map;
- _tmp16_ = gee_map_has_all (_tmp15_, (GeeMap*) another_map);
- _vala_assert (_tmp16_, "test_map.has_all (another_map)");
- _tmp17_ = self->test_map;
- gee_map_clear (_tmp17_);
+ _tmp12_ = self->test_map;
+ _tmp13_ = gee_map_has_all (_tmp12_, (GeeMap*) another_map);
+ _vala_assert (_tmp13_, "test_map.has_all (another_map)");
+ _tmp14_ = self->test_map;
+ gee_map_clear (_tmp14_);
gee_abstract_map_clear ((GeeAbstractMap*) another_map);
- _tmp18_ = self->test_map;
- gee_map_set (_tmp18_, "one", "value_of_one");
- _tmp19_ = self->test_map;
- gee_map_set (_tmp19_, "two", "value_of_two");
+ _tmp15_ = self->test_map;
+ gee_map_set (_tmp15_, "one", "value_of_one");
+ _tmp16_ = self->test_map;
+ gee_map_set (_tmp16_, "two", "value_of_two");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "one", "another_value_of_one");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "two", "another_value_of_two");
- _tmp20_ = self->test_map;
- _tmp21_ = gee_map_has_all (_tmp20_, (GeeMap*) another_map);
- _vala_assert (!_tmp21_, "! test_map.has_all (another_map)");
- _tmp22_ = self->test_map;
- gee_map_clear (_tmp22_);
+ _tmp17_ = self->test_map;
+ _tmp18_ = gee_map_has_all (_tmp17_, (GeeMap*) another_map);
+ _vala_assert (!_tmp18_, "! test_map.has_all (another_map)");
+ _tmp19_ = self->test_map;
+ gee_map_clear (_tmp19_);
gee_abstract_map_clear ((GeeAbstractMap*) another_map);
- _tmp23_ = self->test_map;
- gee_map_set (_tmp23_, "one", "value_of_one");
+ _tmp20_ = self->test_map;
+ gee_map_set (_tmp20_, "one", "value_of_one");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "two", "value_of_two");
+ _tmp21_ = self->test_map;
+ _tmp22_ = gee_map_has_all (_tmp21_, (GeeMap*) another_map);
+ _vala_assert (!_tmp22_, "! test_map.has_all (another_map)");
+ _tmp23_ = self->test_map;
+ gee_map_clear (_tmp23_);
+ gee_abstract_map_clear ((GeeAbstractMap*) another_map);
_tmp24_ = self->test_map;
- _tmp25_ = gee_map_has_all (_tmp24_, (GeeMap*) another_map);
- _vala_assert (!_tmp25_, "! test_map.has_all (another_map)");
+ gee_map_set (_tmp24_, "one", "value_of_one");
+ _tmp25_ = self->test_map;
+ gee_map_set (_tmp25_, "two", "value_of_two");
_tmp26_ = self->test_map;
- gee_map_clear (_tmp26_);
- gee_abstract_map_clear ((GeeAbstractMap*) another_map);
+ gee_map_set (_tmp26_, "three", "value_of_three");
_tmp27_ = self->test_map;
- gee_map_set (_tmp27_, "one", "value_of_one");
+ gee_map_set (_tmp27_, "four", "value_of_four");
_tmp28_ = self->test_map;
- gee_map_set (_tmp28_, "two", "value_of_two");
+ gee_map_set (_tmp28_, "five", "value_of_five");
_tmp29_ = self->test_map;
- gee_map_set (_tmp29_, "three", "value_of_three");
- _tmp30_ = self->test_map;
- gee_map_set (_tmp30_, "four", "value_of_four");
- _tmp31_ = self->test_map;
- gee_map_set (_tmp31_, "five", "value_of_five");
- _tmp32_ = self->test_map;
- gee_map_set (_tmp32_, "six", "value_of_six");
+ gee_map_set (_tmp29_, "six", "value_of_six");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "two", "value_of_two");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "three", "value_of_three");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "four", "value_of_four");
+ _tmp30_ = self->test_map;
+ _tmp31_ = gee_map_has_all (_tmp30_, (GeeMap*) another_map);
+ _vala_assert (_tmp31_, "test_map.has_all (another_map)");
+ _tmp32_ = self->test_map;
+ gee_map_clear (_tmp32_);
+ gee_abstract_map_clear ((GeeAbstractMap*) another_map);
_tmp33_ = self->test_map;
- _tmp34_ = gee_map_has_all (_tmp33_, (GeeMap*) another_map);
- _vala_assert (_tmp34_, "test_map.has_all (another_map)");
+ gee_map_set (_tmp33_, "one", "value_of_one");
+ _tmp34_ = self->test_map;
+ gee_map_set (_tmp34_, "two", "value_of_two");
_tmp35_ = self->test_map;
- gee_map_clear (_tmp35_);
- gee_abstract_map_clear ((GeeAbstractMap*) another_map);
+ gee_map_set (_tmp35_, "three", "value_of_three");
_tmp36_ = self->test_map;
- gee_map_set (_tmp36_, "one", "value_of_one");
+ gee_map_set (_tmp36_, "four", "value_of_four");
_tmp37_ = self->test_map;
- gee_map_set (_tmp37_, "two", "value_of_two");
+ gee_map_set (_tmp37_, "five", "value_of_five");
_tmp38_ = self->test_map;
- gee_map_set (_tmp38_, "three", "value_of_three");
- _tmp39_ = self->test_map;
- gee_map_set (_tmp39_, "four", "value_of_four");
- _tmp40_ = self->test_map;
- gee_map_set (_tmp40_, "five", "value_of_five");
- _tmp41_ = self->test_map;
- gee_map_set (_tmp41_, "six", "value_of_six");
+ gee_map_set (_tmp38_, "six", "value_of_six");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "two", "value_of_two");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "three", "value_of_three");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "four", "value_of_four");
gee_abstract_map_set ((GeeAbstractMap*) another_map, "height", "value_of_height");
- _tmp42_ = self->test_map;
- _tmp43_ = gee_map_has_all (_tmp42_, (GeeMap*) another_map);
- _vala_assert (!_tmp43_, "! test_map.has_all (another_map)");
+ _tmp39_ = self->test_map;
+ _tmp40_ = gee_map_has_all (_tmp39_, (GeeMap*) another_map);
+ _vala_assert (!_tmp40_, "! test_map.has_all (another_map)");
_g_object_unref0 (another_map);
}
@@ -1828,49 +1847,287 @@ void map_tests_test_gobject_properties (MapTests* self) {
GValue _tmp1_ = {0};
GValue _tmp2_;
GeeMap* _tmp3_;
- gboolean _tmp4_ = FALSE;
+ gint _tmp4_ = 0;
GeeMap* _tmp5_;
- gboolean _tmp6_;
- gboolean _tmp7_;
- GValue _tmp8_ = {0};
- GValue _tmp9_;
- GeeMap* _tmp10_;
- gint _tmp11_ = 0;
- GeeMap* _tmp12_;
- gint _tmp13_;
- gint _tmp14_;
+ gint _tmp6_;
+ gint _tmp7_;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_map;
_vala_assert (_tmp0_ != NULL, "test_map != null");
- g_value_init (&_tmp1_, G_TYPE_BOOLEAN);
+ g_value_init (&_tmp1_, G_TYPE_INT);
G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
value = _tmp1_;
_tmp2_ = value;
_tmp3_ = self->test_map;
- g_object_get_property ((GObject*) _tmp3_, "is-empty", &value);
- _tmp4_ = g_value_get_boolean (&value);
+ g_object_get_property ((GObject*) _tmp3_, "size", &value);
+ _tmp4_ = g_value_get_int (&value);
_tmp5_ = self->test_map;
- _tmp6_ = gee_map_get_is_empty (_tmp5_);
+ _tmp6_ = gee_map_get_size (_tmp5_);
_tmp7_ = _tmp6_;
- _vala_assert (_tmp4_ == _tmp7_, "value.get_boolean () == test_map.is_empty");
- g_value_unset (&value);
- g_value_init (&_tmp8_, G_TYPE_INT);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp8_;
- _tmp9_ = value;
- _tmp10_ = self->test_map;
- g_object_get_property ((GObject*) _tmp10_, "size", &value);
- _tmp11_ = g_value_get_int (&value);
- _tmp12_ = self->test_map;
- _tmp13_ = gee_map_get_size (_tmp12_);
- _tmp14_ = _tmp13_;
- _vala_assert (_tmp11_ == _tmp14_, "value.get_int () == test_map.size");
+ _vala_assert (_tmp4_ == _tmp7_, "value.get_int () == test_map.size");
g_value_unset (&value);
G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
}
-MapTestsTestEntry* map_tests_test_entry_construct (GType object_type, GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, gconstpointer key, gconstpointer value) {
+static gint __lambda15_ (MapTests* self, const gchar* x, const gchar* y, gint z) {
+ gint result = 0;
+ gint _tmp0_;
+ g_return_val_if_fail (x != NULL, 0);
+ g_return_val_if_fail (y != NULL, 0);
+ _tmp0_ = z;
+ result = _tmp0_ + 1;
+ return result;
+}
+
+
+static gpointer ___lambda15__gee_fold_map_func (gconstpointer k, gconstpointer v, gpointer a, gpointer self) {
+ gpointer result;
+ result = __lambda15_ (self, k, v, a);
+ return result;
+}
+
+
+static gint __lambda16_ (MapTests* self, const gchar* x, const gchar* y, gint z) {
+ gint result = 0;
+ gint _tmp0_;
+ g_return_val_if_fail (x != NULL, 0);
+ g_return_val_if_fail (y != NULL, 0);
+ _tmp0_ = z;
+ result = _tmp0_ + 1;
+ return result;
+}
+
+
+static gpointer ___lambda16__gee_fold_map_func (gconstpointer k, gconstpointer v, gpointer a, gpointer self) {
+ gpointer result;
+ result = __lambda16_ (self, k, v, a);
+ return result;
+}
+
+
+void map_tests_test_fold (MapTests* self) {
+ GeeMap* _tmp0_;
+ GeeMap* _tmp1_;
+ GeeMap* _tmp2_;
+ gint count = 0;
+ GeeMap* _tmp3_;
+ GeeMapIterator* _tmp4_ = NULL;
+ GeeMapIterator* _tmp5_;
+ gpointer _tmp6_ = NULL;
+ gint _tmp7_;
+ GeeMap* _tmp8_;
+ GeeMapIterator* _tmp9_ = NULL;
+ GeeMapIterator* iter;
+ gboolean _tmp10_ = FALSE;
+ gpointer _tmp11_ = NULL;
+ gint _tmp12_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->test_map;
+ gee_map_set (_tmp0_, "one", "one");
+ _tmp1_ = self->test_map;
+ gee_map_set (_tmp1_, "two", "two");
+ _tmp2_ = self->test_map;
+ gee_map_set (_tmp2_, "three", "three");
+ _tmp3_ = self->test_map;
+ _tmp4_ = gee_map_map_iterator (_tmp3_);
+ _tmp5_ = _tmp4_;
+ _tmp6_ = gee_map_iterator_fold (_tmp5_, G_TYPE_INT, NULL, NULL, ___lambda15__gee_fold_map_func, self, (gpointer) ((gintptr) 0));
+ count = (gint) ((gintptr) _tmp6_);
+ _g_object_unref0 (_tmp5_);
+ _tmp7_ = count;
+ _vala_assert (_tmp7_ == 3, "count == 3");
+ _tmp8_ = self->test_map;
+ _tmp9_ = gee_map_map_iterator (_tmp8_);
+ iter = _tmp9_;
+ _tmp10_ = gee_map_iterator_next (iter);
+ _vala_assert (_tmp10_, "iter.next ()");
+ _tmp11_ = gee_map_iterator_fold (iter, G_TYPE_INT, NULL, NULL, ___lambda16__gee_fold_map_func, self, (gpointer) ((gintptr) 0));
+ count = (gint) ((gintptr) _tmp11_);
+ _tmp12_ = count;
+ _vala_assert (_tmp12_ == 3, "count == 3");
+ _g_object_unref0 (iter);
+}
+
+
+static Block9Data* block9_data_ref (Block9Data* _data9_) {
+ g_atomic_int_inc (&_data9_->_ref_count_);
+ return _data9_;
+}
+
+
+static void block9_data_unref (void * _userdata_) {
+ Block9Data* _data9_;
+ _data9_ = (Block9Data*) _userdata_;
+ if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
+ MapTests * self;
+ self = _data9_->self;
+ _g_object_unref0 (self);
+ g_slice_free (Block9Data, _data9_);
+ }
+}
+
+
+static gboolean __lambda17_ (Block9Data* _data9_, const gchar* x, const gchar* y) {
+ MapTests * self;
+ gboolean result = FALSE;
+ gint _tmp0_;
+ self = _data9_->self;
+ g_return_val_if_fail (x != NULL, FALSE);
+ g_return_val_if_fail (y != NULL, FALSE);
+ _tmp0_ = _data9_->count;
+ _data9_->count = _tmp0_ + 1;
+ result = TRUE;
+ return result;
+}
+
+
+static gboolean ___lambda17__gee_forall_map_func (gconstpointer k, gconstpointer v, gpointer self) {
+ gboolean result;
+ result = __lambda17_ (self, k, v);
+ return result;
+}
+
+
+static gboolean __lambda18_ (Block9Data* _data9_, const gchar* x, const gchar* y) {
+ MapTests * self;
+ gboolean result = FALSE;
+ gint _tmp0_;
+ self = _data9_->self;
+ g_return_val_if_fail (x != NULL, FALSE);
+ g_return_val_if_fail (y != NULL, FALSE);
+ _tmp0_ = _data9_->count;
+ _data9_->count = _tmp0_ + 1;
+ result = TRUE;
+ return result;
+}
+
+
+static gboolean ___lambda18__gee_forall_map_func (gconstpointer k, gconstpointer v, gpointer self) {
+ gboolean result;
+ result = __lambda18_ (self, k, v);
+ return result;
+}
+
+
+void map_tests_test_foreach (MapTests* self) {
+ Block9Data* _data9_;
+ GeeMap* _tmp0_;
+ GeeMap* _tmp1_;
+ GeeMap* _tmp2_;
+ GeeMap* _tmp3_;
+ GeeMapIterator* _tmp4_ = NULL;
+ GeeMapIterator* _tmp5_;
+ GeeMap* _tmp6_;
+ GeeMapIterator* _tmp7_ = NULL;
+ GeeMapIterator* iter;
+ gboolean _tmp8_ = FALSE;
+ g_return_if_fail (self != NULL);
+ _data9_ = g_slice_new0 (Block9Data);
+ _data9_->_ref_count_ = 1;
+ _data9_->self = g_object_ref (self);
+ _tmp0_ = self->test_map;
+ gee_map_set (_tmp0_, "one", "one");
+ _tmp1_ = self->test_map;
+ gee_map_set (_tmp1_, "two", "two");
+ _tmp2_ = self->test_map;
+ gee_map_set (_tmp2_, "three", "three");
+ _data9_->count = 0;
+ _tmp3_ = self->test_map;
+ _tmp4_ = gee_map_map_iterator (_tmp3_);
+ _tmp5_ = _tmp4_;
+ gee_map_iterator_foreach (_tmp5_, ___lambda17__gee_forall_map_func, _data9_);
+ _g_object_unref0 (_tmp5_);
+ _vala_assert (_data9_->count == 3, "count == 3");
+ _tmp6_ = self->test_map;
+ _tmp7_ = gee_map_map_iterator (_tmp6_);
+ iter = _tmp7_;
+ _tmp8_ = gee_map_iterator_next (iter);
+ _vala_assert (_tmp8_, "iter.next ()");
+ gee_map_iterator_foreach (iter, ___lambda18__gee_forall_map_func, _data9_);
+ _vala_assert (_data9_->count == 6, "count == 6");
+ _g_object_unref0 (iter);
+ block9_data_unref (_data9_);
+ _data9_ = NULL;
+}
+
+
+GeeMapEntry* map_tests_entry_for (const gchar* key, const gchar* value) {
+ GeeMapEntry* result = NULL;
+ const gchar* _tmp0_;
+ const gchar* _tmp1_;
+ MapTestsTestEntry* _tmp2_;
+ g_return_val_if_fail (key != NULL, NULL);
+ g_return_val_if_fail (value != NULL, NULL);
+ _tmp0_ = key;
+ _tmp1_ = value;
+ _tmp2_ = map_tests_test_entry_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_);
+ result = (GeeMapEntry*) _tmp2_;
+ return result;
+}
+
+
+gboolean map_tests_check_entry (GeeMapEntry* e, const gchar* key, const gchar* value) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+ GeeMapEntry* _tmp1_;
+ gconstpointer _tmp2_;
+ const gchar* _tmp3_;
+ const gchar* _tmp4_;
+ gboolean _tmp9_;
+ g_return_val_if_fail (e != NULL, FALSE);
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+ _tmp1_ = e;
+ _tmp2_ = gee_map_entry_get_key (_tmp1_);
+ _tmp3_ = _tmp2_;
+ _tmp4_ = key;
+ if (g_strcmp0 ((const gchar*) _tmp3_, _tmp4_) == 0) {
+ GeeMapEntry* _tmp5_;
+ gconstpointer _tmp6_;
+ const gchar* _tmp7_;
+ const gchar* _tmp8_;
+ _tmp5_ = e;
+ _tmp6_ = gee_map_entry_get_value (_tmp5_);
+ _tmp7_ = _tmp6_;
+ _tmp8_ = value;
+ _tmp0_ = g_strcmp0 ((const gchar*) _tmp7_, _tmp8_) == 0;
+ } else {
+ _tmp0_ = FALSE;
+ }
+ _tmp9_ = _tmp0_;
+ result = _tmp9_;
+ _g_object_unref0 (e);
+ return result;
+}
+
+
+void map_tests_assert_entry (GeeMapEntry* e, const gchar* key, const gchar* value) {
+ GeeMapEntry* _tmp0_;
+ gconstpointer _tmp1_;
+ const gchar* _tmp2_;
+ const gchar* _tmp3_;
+ GeeMapEntry* _tmp4_;
+ gconstpointer _tmp5_;
+ const gchar* _tmp6_;
+ const gchar* _tmp7_;
+ g_return_if_fail (e != NULL);
+ g_return_if_fail (key != NULL);
+ g_return_if_fail (value != NULL);
+ _tmp0_ = e;
+ _tmp1_ = gee_map_entry_get_key (_tmp0_);
+ _tmp2_ = _tmp1_;
+ _tmp3_ = key;
+ _vala_assert (g_strcmp0 ((const gchar*) _tmp2_, _tmp3_) == 0, "e.key == key");
+ _tmp4_ = e;
+ _tmp5_ = gee_map_entry_get_value (_tmp4_);
+ _tmp6_ = _tmp5_;
+ _tmp7_ = value;
+ _vala_assert (g_strcmp0 ((const gchar*) _tmp6_, _tmp7_) == 0, "e.value == value");
+}
+
+
+static MapTestsTestEntry* map_tests_test_entry_construct (GType object_type, GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, gconstpointer key, gconstpointer value) {
MapTestsTestEntry * self = NULL;
gconstpointer _tmp0_;
gpointer _tmp1_;
@@ -1892,7 +2149,7 @@ MapTestsTestEntry* map_tests_test_entry_construct (GType object_type, GType k_ty
}
-MapTestsTestEntry* map_tests_test_entry_new (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, gconstpointer key, gconstpointer value) {
+static MapTestsTestEntry* map_tests_test_entry_new (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, gconstpointer key, gconstpointer value) {
return map_tests_test_entry_construct (MAP_TESTS_TYPE_TEST_ENTRY, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, key, value);
}
@@ -1932,12 +2189,22 @@ static void map_tests_test_entry_real_set_value (GeeMapEntry* base, gconstpointe
}
+static gboolean map_tests_test_entry_real_get_read_only (GeeMapEntry* base) {
+ gboolean result;
+ MapTestsTestEntry* self;
+ self = (MapTestsTestEntry*) base;
+ result = FALSE;
+ return result;
+}
+
+
static void map_tests_test_entry_class_init (MapTestsTestEntryClass * klass) {
map_tests_test_entry_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (MapTestsTestEntryPrivate));
GEE_MAP_ENTRY_CLASS (klass)->get_key = map_tests_test_entry_real_get_key;
GEE_MAP_ENTRY_CLASS (klass)->get_value = map_tests_test_entry_real_get_value;
GEE_MAP_ENTRY_CLASS (klass)->set_value = map_tests_test_entry_real_set_value;
+ GEE_MAP_ENTRY_CLASS (klass)->get_read_only = map_tests_test_entry_real_get_read_only;
G_OBJECT_CLASS (klass)->get_property = _vala_map_tests_test_entry_get_property;
G_OBJECT_CLASS (klass)->set_property = _vala_map_tests_test_entry_set_property;
G_OBJECT_CLASS (klass)->finalize = map_tests_test_entry_finalize;
@@ -1949,6 +2216,7 @@ static void map_tests_test_entry_class_init (MapTestsTestEntryClass * klass) {
g_object_class_install_property (G_OBJECT_CLASS (klass), MAP_TESTS_TEST_ENTRY_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (G_OBJECT_CLASS (klass), MAP_TESTS_TEST_ENTRY_KEY, g_param_spec_pointer ("key", "key", "key", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), MAP_TESTS_TEST_ENTRY_VALUE, g_param_spec_pointer ("value", "value", "value", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), MAP_TESTS_TEST_ENTRY_READ_ONLY, g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}
@@ -1966,7 +2234,7 @@ static void map_tests_test_entry_finalize (GObject* obj) {
}
-GType map_tests_test_entry_get_type (void) {
+static GType map_tests_test_entry_get_type (void) {
static volatile gsize map_tests_test_entry_type_id__volatile = 0;
if (g_once_init_enter (&map_tests_test_entry_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (MapTestsTestEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) map_tests_test_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MapTestsTestEntry), 0, (GInstanceInitFunc) map_tests_test_entry_instance_init, NULL };
@@ -1988,6 +2256,9 @@ static void _vala_map_tests_test_entry_get_property (GObject * object, guint pro
case MAP_TESTS_TEST_ENTRY_VALUE:
g_value_set_pointer (value, gee_map_entry_get_value ((GeeMapEntry*) self));
break;
+ case MAP_TESTS_TEST_ENTRY_READ_ONLY:
+ g_value_set_boolean (value, gee_map_entry_get_read_only ((GeeMapEntry*) self));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
diff --git a/tests/testmap.vala b/tests/testmap.vala
index 19fc091..5a63cf8 100644
--- a/tests/testmap.vala
+++ b/tests/testmap.vala
@@ -1,7 +1,7 @@
/* testmap.vala
*
- * Copyright (C) 2008 Jürg Billeter, Maciej Piechotka
- * Copyright (C) 2009 Didier Villevalois, Julien Peeters
+ * Copyright (C) 2008 Jürg Billeter
+ * Copyright (C) 2009 Didier Villevalois, Julien Peeters, Maciej Piechotka
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -39,6 +39,8 @@ public abstract class MapTests : Gee.TestCase {
add_test ("[Map] unset all", test_unset_all);
add_test ("[Map] has all", test_has_all);
add_test ("[Map] GObject properties", test_gobject_properties);
+ add_test ("[Map] fold", test_fold);
+ add_test ("[Map] foreach", test_foreach);
}
protected Map<string, string> test_map;
@@ -314,9 +316,7 @@ public abstract class MapTests : Gee.TestCase {
}
public void test_set_all () {
- var another_map = new HashMap<string,string> (str_hash,
- str_equal,
- str_equal);
+ var another_map = new HashMap<string,string> ();
test_map.set ("one", "value_of_one");
test_map.set ("two", "value_of_two");
@@ -344,9 +344,7 @@ public abstract class MapTests : Gee.TestCase {
}
public void test_unset_all () {
- var another_map = new HashMap<string,string> (str_hash,
- str_equal,
- str_equal);
+ var another_map = new HashMap<string,string> ();
// Check unset all on empty maps.
assert (test_map.is_empty);
@@ -431,9 +429,7 @@ public abstract class MapTests : Gee.TestCase {
}
public void test_has_all () {
- var another_map = new HashMap<string,string> (str_hash,
- str_equal,
- str_equal);
+ var another_map = new HashMap<string,string> ();
// Check empty.
assert (test_map.has_all (another_map));
@@ -523,27 +519,67 @@ public abstract class MapTests : Gee.TestCase {
assert (test_map != null);
Value value;
- value = Value (typeof (bool));
- test_map.get_property ("is-empty", ref value);
- assert (value.get_boolean () == test_map.is_empty);
- value.unset ();
-
value = Value (typeof (int));
test_map.get_property ("size", ref value);
assert (value.get_int () == test_map.size);
value.unset ();
}
+ public void test_fold () {
+ test_map.set ("one", "one");
+ test_map.set ("two", "two");
+ test_map.set ("three", "three");
+
+ int count;
+
+ count = test_map.map_iterator ().fold<int> ((x, y, z) => {return z + 1;}, 0);
+ assert (count == 3);
+
+ var iter = test_map.map_iterator ();
+ assert (iter.next ());
+ count = iter.fold<int> ((x, y, z) => {return z + 1;}, 0);
+ assert (count == 3);
+ }
+
+ public void test_foreach () {
+ test_map.set ("one", "one");
+ test_map.set ("two", "two");
+ test_map.set ("three", "three");
+
+ int count = 0;
+
+ test_map.map_iterator ().foreach ((x, y) => {count++; return true;});
+ assert (count == 3);
+
+ var iter = test_map.map_iterator ();
+ assert (iter.next ());
+ iter.foreach ((x, y) => {count++; return true;});
+ assert (count == 6);
+ }
-
- public class TestEntry<K,V> : Map.Entry<K,V> {
+ public static Map.Entry<string,string> entry_for (string key, string value) {
+ return new TestEntry<string,string> (key, value);
+ }
+
+ public static bool check_entry (owned Map.Entry<string,string> e, string key, string value) {
+ return e.key == key && e.value == value;
+ }
+
+ public static void assert_entry (Map.Entry<string,string> e, string key, string value) {
+ assert (e.key == key);
+ assert (e.value == value);
+ }
+
+ private class TestEntry<K,V> : Map.Entry<K,V> {
public TestEntry (K key, V value) {
this._key = key;
this.value = value;
}
-
+
public override K key { get {return _key; } }
private K _key;
public override V value { get; set; }
+ public override bool read_only { get { return false; } }
}
}
+
diff --git a/tests/testmultimap.c b/tests/testmultimap.c
index f341696..d9a4204 100644
--- a/tests/testmultimap.c
+++ b/tests/testmultimap.c
@@ -90,7 +90,9 @@ enum {
};
MultiMapTests* multi_map_tests_construct (GType object_type, const gchar* name);
GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
+void multi_map_tests_test_type_correctness (MultiMapTests* self);
+static void _multi_map_tests_test_type_correctness_gee_test_case_test_method (gpointer self);
static void multi_map_tests_test_size (MultiMapTests* self);
static void _multi_map_tests_test_size_gee_test_case_test_method (gpointer self);
static void multi_map_tests_test_getting_setting (MultiMapTests* self);
@@ -100,6 +102,11 @@ static void _multi_map_tests_test_keys_all_keys_values_gee_test_case_test_method
static void multi_map_tests_finalize (GObject* obj);
+static void _multi_map_tests_test_type_correctness_gee_test_case_test_method (gpointer self) {
+ multi_map_tests_test_type_correctness (self);
+}
+
+
static void _multi_map_tests_test_size_gee_test_case_test_method (gpointer self) {
multi_map_tests_test_size (self);
}
@@ -121,13 +128,36 @@ MultiMapTests* multi_map_tests_construct (GType object_type, const gchar* name)
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (MultiMapTests*) gee_test_case_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] size", _multi_map_tests_test_size_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] getting and setting", _multi_map_tests_test_getting_setting_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] keys, all keys and values", _multi_map_tests_test_keys_all_keys_values_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] type correctness", _multi_map_tests_test_type_correctness_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] size", _multi_map_tests_test_size_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] getting and setting", _multi_map_tests_test_getting_setting_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[MultiMap] keys, all keys and values", _multi_map_tests_test_keys_all_keys_values_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
+void multi_map_tests_test_type_correctness (MultiMapTests* self) {
+ GeeMultiMap* _tmp0_;
+ GeeMultiMap* _tmp1_;
+ GType _tmp2_;
+ GType _tmp3_;
+ GeeMultiMap* _tmp4_;
+ GType _tmp5_;
+ GType _tmp6_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->test_multi_map;
+ _vala_assert (_tmp0_ != NULL, "test_multi_map != null");
+ _tmp1_ = self->test_multi_map;
+ _tmp2_ = gee_multi_map_get_key_type (_tmp1_);
+ _tmp3_ = _tmp2_;
+ _vala_assert (_tmp3_ == G_TYPE_STRING, "test_multi_map.key_type == typeof (string)");
+ _tmp4_ = self->test_multi_map;
+ _tmp5_ = gee_multi_map_get_value_type (_tmp4_);
+ _tmp6_ = _tmp5_;
+ _vala_assert (_tmp6_ == G_TYPE_STRING, "test_multi_map.value_type == typeof (string)");
+}
+
+
static void multi_map_tests_test_size (MultiMapTests* self) {
GeeMultiMap* _tmp0_;
GeeMultiMap* _tmp1_;
diff --git a/tests/testmultimap.vala b/tests/testmultimap.vala
index 7a2f9e0..0531be6 100644
--- a/tests/testmultimap.vala
+++ b/tests/testmultimap.vala
@@ -30,6 +30,7 @@ public abstract class MultiMapTests : Gee.TestCase {
public MultiMapTests (string name) {
base (name);
+ add_test ("[MultiMap] type correctness", test_type_correctness);
add_test ("[MultiMap] size", test_size);
add_test ("[MultiMap] getting and setting", test_getting_setting);
add_test ("[MultiMap] keys, all keys and values", test_keys_all_keys_values);
@@ -37,6 +38,15 @@ public abstract class MultiMapTests : Gee.TestCase {
protected MultiMap<string,string> test_multi_map;
+ public void test_type_correctness () {
+ // Check the multimap exists
+ assert (test_multi_map != null);
+
+ // Check the advertised key and value types
+ assert (test_multi_map.key_type == typeof (string));
+ assert (test_multi_map.value_type == typeof (string));
+ }
+
private void test_size () {
// Check the map exists
assert (test_multi_map != null);
diff --git a/tests/testmultiset.c b/tests/testmultiset.c
index 81a4598..0ce6326 100644
--- a/tests/testmultiset.c
+++ b/tests/testmultiset.c
@@ -110,7 +110,7 @@ enum {
};
MultiSetTests* multi_set_tests_construct (GType object_type, const gchar* name);
CollectionTests* collection_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
static void multi_set_tests_test_duplicates_are_retained (MultiSetTests* self);
static void _multi_set_tests_test_duplicates_are_retained_gee_test_case_test_method (gpointer self);
@@ -126,7 +126,7 @@ MultiSetTests* multi_set_tests_construct (GType object_type, const gchar* name)
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (MultiSetTests*) collection_tests_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[MultiSet] duplicates are retained", _multi_set_tests_test_duplicates_are_retained_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[MultiSet] duplicates are retained", _multi_set_tests_test_duplicates_are_retained_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
diff --git a/tests/testpriorityqueue.c b/tests/testpriorityqueue.c
index 8bdbd4f..b64fc35 100644
--- a/tests/testpriorityqueue.c
+++ b/tests/testpriorityqueue.c
@@ -130,27 +130,13 @@ enum {
PriorityQueueTests* priority_queue_tests_new (void);
PriorityQueueTests* priority_queue_tests_construct (GType object_type);
QueueTests* queue_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-static void priority_queue_tests_test_selected_functions (PriorityQueueTests* self);
-static void _priority_queue_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
-void priority_queue_tests_test_gobject_properties (PriorityQueueTests* self);
-static void _priority_queue_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
static void priority_queue_tests_test_poll_gives_minimum (PriorityQueueTests* self);
static void _priority_queue_tests_test_poll_gives_minimum_gee_test_case_test_method (gpointer self);
static void priority_queue_tests_real_set_up (GeeTestCase* base);
static void priority_queue_tests_real_tear_down (GeeTestCase* base);
-static void _priority_queue_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- priority_queue_tests_test_selected_functions (self);
-}
-
-
-static void _priority_queue_tests_test_gobject_properties_gee_test_case_test_method (gpointer self) {
- priority_queue_tests_test_gobject_properties (self);
-}
-
-
static void _priority_queue_tests_test_poll_gives_minimum_gee_test_case_test_method (gpointer self) {
priority_queue_tests_test_poll_gives_minimum (self);
}
@@ -159,9 +145,7 @@ static void _priority_queue_tests_test_poll_gives_minimum_gee_test_case_test_met
PriorityQueueTests* priority_queue_tests_construct (GType object_type) {
PriorityQueueTests * self = NULL;
self = (PriorityQueueTests*) queue_tests_construct (object_type, "PriorityQueue");
- gee_test_case_add_test ((GeeTestCase*) self, "[PriorityQueue] selected functions", _priority_queue_tests_test_selected_functions_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[PriorityQueue] GObject properties", _priority_queue_tests_test_gobject_properties_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[PriorityQueue] poll gives minimum", _priority_queue_tests_test_poll_gives_minimum_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[PriorityQueue] poll gives minimum", _priority_queue_tests_test_poll_gives_minimum_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -175,7 +159,7 @@ static void priority_queue_tests_real_set_up (GeeTestCase* base) {
PriorityQueueTests * self;
GeePriorityQueue* _tmp0_;
self = (PriorityQueueTests*) base;
- _tmp0_ = gee_priority_queue_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp0_ = gee_priority_queue_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
_g_object_unref0 (((CollectionTests*) self)->test_collection);
((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}
@@ -194,56 +178,6 @@ static gpointer _g_object_ref0 (gpointer self) {
}
-static void priority_queue_tests_test_selected_functions (PriorityQueueTests* self) {
- GeeCollection* _tmp0_;
- GeePriorityQueue* _tmp1_;
- GeePriorityQueue* test_queue;
- GCompareFunc _tmp2_;
- GCompareFunc _tmp3_;
- GCompareFunc _tmp4_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_PRIORITY_QUEUE) ? ((GeePriorityQueue*) _tmp0_) : NULL);
- test_queue = _tmp1_;
- _vala_assert (test_queue != NULL, "test_queue != null");
- _tmp2_ = gee_priority_queue_get_compare_func (test_queue);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_strcmp0;
- _vala_assert (_tmp3_ == ((GCompareFunc) _tmp4_), "test_queue.compare_func == (CompareFunc) strcmp");
- _g_object_unref0 (test_queue);
-}
-
-
-void priority_queue_tests_test_gobject_properties (PriorityQueueTests* self) {
- GeeCollection* _tmp0_;
- GeePriorityQueue* _tmp1_;
- GeePriorityQueue* test_queue;
- GValue value = {0};
- GValue _tmp2_ = {0};
- GValue _tmp3_;
- void* _tmp4_ = NULL;
- GCompareFunc _tmp5_;
- GCompareFunc _tmp6_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_PRIORITY_QUEUE) ? ((GeePriorityQueue*) _tmp0_) : NULL);
- test_queue = _tmp1_;
- _vala_assert (test_queue != NULL, "test_queue != null");
- g_value_init (&_tmp2_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp2_;
- _tmp3_ = value;
- g_object_get_property ((GObject*) test_queue, "compare-func", &value);
- _tmp4_ = g_value_get_pointer (&value);
- _tmp5_ = gee_priority_queue_get_compare_func (test_queue);
- _tmp6_ = _tmp5_;
- _vala_assert (_tmp4_ == ((void*) _tmp6_), "value.get_pointer () == (void*) test_queue.compare_func");
- g_value_unset (&value);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- _g_object_unref0 (test_queue);
-}
-
-
static void priority_queue_tests_test_poll_gives_minimum (PriorityQueueTests* self) {
GeeCollection* _tmp0_;
GeeQueue* _tmp1_;
diff --git a/tests/testpriorityqueue.vala b/tests/testpriorityqueue.vala
index cbeac2f..676a814 100644
--- a/tests/testpriorityqueue.vala
+++ b/tests/testpriorityqueue.vala
@@ -26,8 +26,6 @@ public class PriorityQueueTests : QueueTests {
public PriorityQueueTests () {
base ("PriorityQueue");
- add_test ("[PriorityQueue] selected functions", test_selected_functions);
- add_test ("[PriorityQueue] GObject properties", test_gobject_properties);
add_test ("[PriorityQueue] poll gives minimum", test_poll_gives_minimum);
}
@@ -39,29 +37,6 @@ public class PriorityQueueTests : QueueTests {
test_collection = null;
}
- private void test_selected_functions () {
- var test_queue = test_collection as PriorityQueue<string>;
-
- // Check the queue exists
- assert (test_queue != null);
-
- // Check the selected compare function
- assert (test_queue.compare_func == (CompareFunc) strcmp);
- }
-
- public new void test_gobject_properties () {
- var test_queue = test_collection as PriorityQueue<string>;
-
- // Check the list exists
- assert (test_queue != null);
- Value value;
-
- value = Value (typeof (CompareFunc));
- test_queue.get_property ("compare-func", ref value);
- assert (value.get_pointer () == (void*) test_queue.compare_func);
- value.unset ();
- }
-
private void test_poll_gives_minimum () {
var test_queue = test_collection as Gee.Queue<string>;
diff --git a/tests/testqueue.c b/tests/testqueue.c
index d31807b..549499b 100644
--- a/tests/testqueue.c
+++ b/tests/testqueue.c
@@ -108,7 +108,7 @@ enum {
};
QueueTests* queue_tests_construct (GType object_type, const gchar* name);
CollectionTests* collection_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void queue_tests_test_capacity_bound (QueueTests* self);
static void _queue_tests_test_capacity_bound_gee_test_case_test_method (gpointer self);
void queue_tests_test_one_element_operation (QueueTests* self);
@@ -138,9 +138,9 @@ QueueTests* queue_tests_construct (GType object_type, const gchar* name) {
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (QueueTests*) collection_tests_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[Queue] capacity bound", _queue_tests_test_capacity_bound_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Queue] one element operation", _queue_tests_test_one_element_operation_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Queue] GObject properties", _queue_tests_test_gobject_properties_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Queue] capacity bound", _queue_tests_test_capacity_bound_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Queue] one element operation", _queue_tests_test_one_element_operation_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Queue] GObject properties", _queue_tests_test_gobject_properties_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -368,7 +368,7 @@ void queue_tests_test_one_element_operation (QueueTests* self) {
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_QUEUE) ? ((GeeQueue*) _tmp0_) : NULL);
test_queue = _tmp1_;
- _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
recipient = _tmp2_;
_vala_assert (test_queue != NULL, "test_queue != null");
_tmp3_ = gee_queue_offer (test_queue, "one");
diff --git a/tests/testreadonlybidirlist.c b/tests/testreadonlybidirlist.c
new file mode 100644
index 0000000..7b22f36
--- /dev/null
+++ b/tests/testreadonlybidirlist.c
@@ -0,0 +1,525 @@
+/* testreadonlybidirlist.c generated by valac 0.18.0, the Vala compiler
+ * generated from testreadonlybidirlist.vala, do not modify */
+
+/* testreadonlybidirlist.vala
+ *
+ * Copyright (C) 2011 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_READ_ONLY_COLLECTION_TESTS (read_only_collection_tests_get_type ())
+#define READ_ONLY_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_READ_ONLY_COLLECTION_TESTS, ReadOnlyCollectionTests))
+#define READ_ONLY_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_READ_ONLY_COLLECTION_TESTS, ReadOnlyCollectionTestsClass))
+#define IS_READ_ONLY_COLLECTION_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_READ_ONLY_COLLECTION_TESTS))
+#define IS_READ_ONLY_COLLECTION_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_READ_ONLY_COLLECTION_TESTS))
+#define READ_ONLY_COLLECTION_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_READ_ONLY_COLLECTION_TESTS, ReadOnlyCollectionTestsClass))
+
+typedef struct _ReadOnlyCollectionTests ReadOnlyCollectionTests;
+typedef struct _ReadOnlyCollectionTestsClass ReadOnlyCollectionTestsClass;
+typedef struct _ReadOnlyCollectionTestsPrivate ReadOnlyCollectionTestsPrivate;
+
+#define TYPE_READ_ONLY_LIST_TESTS (read_only_list_tests_get_type ())
+#define READ_ONLY_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_READ_ONLY_LIST_TESTS, ReadOnlyListTests))
+#define READ_ONLY_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_READ_ONLY_LIST_TESTS, ReadOnlyListTestsClass))
+#define IS_READ_ONLY_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_READ_ONLY_LIST_TESTS))
+#define IS_READ_ONLY_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_READ_ONLY_LIST_TESTS))
+#define READ_ONLY_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_READ_ONLY_LIST_TESTS, ReadOnlyListTestsClass))
+
+typedef struct _ReadOnlyListTests ReadOnlyListTests;
+typedef struct _ReadOnlyListTestsClass ReadOnlyListTestsClass;
+typedef struct _ReadOnlyListTestsPrivate ReadOnlyListTestsPrivate;
+
+#define TYPE_READ_ONLY_BIDIR_LIST_TESTS (read_only_bidir_list_tests_get_type ())
+#define READ_ONLY_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_READ_ONLY_BIDIR_LIST_TESTS, ReadOnlyBidirListTests))
+#define READ_ONLY_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_READ_ONLY_BIDIR_LIST_TESTS, ReadOnlyBidirListTestsClass))
+#define IS_READ_ONLY_BIDIR_LIST_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_READ_ONLY_BIDIR_LIST_TESTS))
+#define IS_READ_ONLY_BIDIR_LIST_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_READ_ONLY_BIDIR_LIST_TESTS))
+#define READ_ONLY_BIDIR_LIST_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_READ_ONLY_BIDIR_LIST_TESTS, ReadOnlyBidirListTestsClass))
+
+typedef struct _ReadOnlyBidirListTests ReadOnlyBidirListTests;
+typedef struct _ReadOnlyBidirListTestsClass ReadOnlyBidirListTestsClass;
+typedef struct _ReadOnlyBidirListTestsPrivate ReadOnlyBidirListTestsPrivate;
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _ReadOnlyCollectionTests {
+ GeeTestCase parent_instance;
+ ReadOnlyCollectionTestsPrivate * priv;
+ GeeCollection* test_collection;
+ GeeCollection* ro_collection;
+};
+
+struct _ReadOnlyCollectionTestsClass {
+ GeeTestCaseClass parent_class;
+ GeeCollection* (*get_ro_view) (ReadOnlyCollectionTests* self, GeeCollection* collection);
+};
+
+struct _ReadOnlyListTests {
+ ReadOnlyCollectionTests parent_instance;
+ ReadOnlyListTestsPrivate * priv;
+};
+
+struct _ReadOnlyListTestsClass {
+ ReadOnlyCollectionTestsClass parent_class;
+};
+
+struct _ReadOnlyBidirListTests {
+ ReadOnlyListTests parent_instance;
+ ReadOnlyBidirListTestsPrivate * priv;
+};
+
+struct _ReadOnlyBidirListTestsClass {
+ ReadOnlyListTestsClass parent_class;
+};
+
+typedef void (*GeeTestCaseTestMethod) (void* user_data);
+
+static gpointer read_only_bidir_list_tests_parent_class = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType read_only_collection_tests_get_type (void) G_GNUC_CONST;
+GType read_only_list_tests_get_type (void) G_GNUC_CONST;
+GType read_only_bidir_list_tests_get_type (void) G_GNUC_CONST;
+enum {
+ READ_ONLY_BIDIR_LIST_TESTS_DUMMY_PROPERTY
+};
+ReadOnlyBidirListTests* read_only_bidir_list_tests_new (void);
+ReadOnlyBidirListTests* read_only_bidir_list_tests_construct (GType object_type);
+ReadOnlyListTests* read_only_list_tests_new_with_name (const gchar* name);
+ReadOnlyListTests* read_only_list_tests_construct_with_name (GType object_type, const gchar* name);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
+void read_only_bidir_list_tests_test_immutable_iterator (ReadOnlyBidirListTests* self);
+static void _read_only_bidir_list_tests_test_immutable_iterator_gee_test_case_test_method (gpointer self);
+static GeeCollection* read_only_bidir_list_tests_real_get_ro_view (ReadOnlyCollectionTests* base, GeeCollection* collection);
+
+
+static void _read_only_bidir_list_tests_test_immutable_iterator_gee_test_case_test_method (gpointer self) {
+ read_only_bidir_list_tests_test_immutable_iterator (self);
+}
+
+
+ReadOnlyBidirListTests* read_only_bidir_list_tests_construct (GType object_type) {
+ ReadOnlyBidirListTests * self = NULL;
+ self = (ReadOnlyBidirListTests*) read_only_list_tests_construct_with_name (object_type, "ReadOnlyBidirList");
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyBidirList] immutable iterator", _read_only_bidir_list_tests_test_immutable_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ return self;
+}
+
+
+ReadOnlyBidirListTests* read_only_bidir_list_tests_new (void) {
+ return read_only_bidir_list_tests_construct (TYPE_READ_ONLY_BIDIR_LIST_TESTS);
+}
+
+
+static GeeCollection* read_only_bidir_list_tests_real_get_ro_view (ReadOnlyCollectionTests* base, GeeCollection* collection) {
+ ReadOnlyBidirListTests * self;
+ GeeCollection* result = NULL;
+ GeeCollection* _tmp0_;
+ GeeBidirList* _tmp1_;
+ GeeBidirList* _tmp2_;
+ self = (ReadOnlyBidirListTests*) base;
+ g_return_val_if_fail (collection != NULL, NULL);
+ _tmp0_ = collection;
+ _tmp1_ = gee_bidir_list_get_read_only_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_BIDIR_LIST, GeeBidirList));
+ _tmp2_ = _tmp1_;
+ result = (GeeCollection*) _tmp2_;
+ return result;
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+ return self ? g_object_ref (self) : NULL;
+}
+
+
+void read_only_bidir_list_tests_test_immutable_iterator (ReadOnlyBidirListTests* self) {
+ GeeCollection* _tmp0_;
+ GeeBidirList* _tmp1_;
+ GeeBidirList* test_list;
+ GeeCollection* _tmp2_;
+ GeeBidirList* _tmp3_;
+ GeeBidirList* ro_list;
+ GeeBidirList* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ GeeBidirList* _tmp6_;
+ gboolean _tmp7_ = FALSE;
+ GeeBidirList* _tmp8_;
+ gint _tmp9_;
+ gint _tmp10_;
+ GeeBidirList* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ gchar* _tmp13_;
+ GeeBidirList* _tmp14_;
+ gpointer _tmp15_ = NULL;
+ gchar* _tmp16_;
+ GeeBidirList* _tmp17_;
+ GeeBidirListIterator* _tmp18_ = NULL;
+ GeeBidirListIterator* iterator;
+ GeeBidirListIterator* _tmp19_;
+ gboolean _tmp20_ = FALSE;
+ GeeBidirListIterator* _tmp21_;
+ gboolean _tmp22_ = FALSE;
+ GeeBidirListIterator* _tmp23_;
+ gpointer _tmp24_ = NULL;
+ gchar* _tmp25_;
+ GeeBidirListIterator* _tmp26_;
+ gint _tmp27_ = 0;
+ GeeBidirListIterator* _tmp28_;
+ gboolean _tmp29_ = FALSE;
+ GeeBidirListIterator* _tmp30_;
+ gboolean _tmp31_ = FALSE;
+ GeeBidirListIterator* _tmp32_;
+ gpointer _tmp33_ = NULL;
+ gchar* _tmp34_;
+ GeeBidirListIterator* _tmp35_;
+ gint _tmp36_ = 0;
+ GeeBidirListIterator* _tmp37_;
+ gboolean _tmp38_ = FALSE;
+ GeeBidirListIterator* _tmp39_;
+ gboolean _tmp40_ = FALSE;
+ GeeBidirListIterator* _tmp41_;
+ gboolean _tmp42_ = FALSE;
+ GeeBidirListIterator* _tmp43_;
+ gboolean _tmp44_ = FALSE;
+ GeeBidirListIterator* _tmp45_;
+ gpointer _tmp46_ = NULL;
+ gchar* _tmp47_;
+ GeeBidirListIterator* _tmp48_;
+ gint _tmp49_ = 0;
+ GeeBidirListIterator* _tmp50_;
+ gboolean _tmp51_ = FALSE;
+ GeeBidirListIterator* _tmp52_;
+ gpointer _tmp53_ = NULL;
+ gchar* _tmp54_;
+ GeeBidirListIterator* _tmp55_;
+ gint _tmp56_ = 0;
+ GeeBidirListIterator* _tmp57_;
+ gboolean _tmp58_ = FALSE;
+ GeeBidirListIterator* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ gchar* _tmp61_;
+ GeeBidirListIterator* _tmp62_;
+ gint _tmp63_ = 0;
+ gboolean _tmp64_ = FALSE;
+ GeeBidirList* _tmp66_;
+ gint _tmp67_;
+ gint _tmp68_;
+ GeeBidirList* _tmp69_;
+ gpointer _tmp70_ = NULL;
+ gchar* _tmp71_;
+ GeeBidirList* _tmp72_;
+ gpointer _tmp73_ = NULL;
+ gchar* _tmp74_;
+ GeeBidirListIterator* _tmp75_;
+ gint _tmp76_ = 0;
+ gboolean _tmp77_ = FALSE;
+ GeeBidirList* _tmp79_;
+ gint _tmp80_;
+ gint _tmp81_;
+ GeeBidirList* _tmp82_;
+ gpointer _tmp83_ = NULL;
+ gchar* _tmp84_;
+ GeeBidirList* _tmp85_;
+ gpointer _tmp86_ = NULL;
+ gchar* _tmp87_;
+ GeeBidirListIterator* _tmp88_;
+ gint _tmp89_ = 0;
+ gboolean _tmp90_ = FALSE;
+ GeeBidirList* _tmp92_;
+ gint _tmp93_;
+ gint _tmp94_;
+ GeeBidirList* _tmp95_;
+ gpointer _tmp96_ = NULL;
+ gchar* _tmp97_;
+ GeeBidirList* _tmp98_;
+ gpointer _tmp99_ = NULL;
+ gchar* _tmp100_;
+ GeeBidirListIterator* _tmp101_;
+ gint _tmp102_ = 0;
+ gboolean _tmp103_ = FALSE;
+ GeeBidirList* _tmp105_;
+ gint _tmp106_;
+ gint _tmp107_;
+ GeeBidirList* _tmp108_;
+ gpointer _tmp109_ = NULL;
+ gchar* _tmp110_;
+ GeeBidirList* _tmp111_;
+ gpointer _tmp112_ = NULL;
+ gchar* _tmp113_;
+ GeeBidirListIterator* _tmp114_;
+ gint _tmp115_ = 0;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((ReadOnlyCollectionTests*) self)->test_collection;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_BIDIR_LIST) ? ((GeeBidirList*) _tmp0_) : NULL);
+ test_list = _tmp1_;
+ _tmp2_ = ((ReadOnlyCollectionTests*) self)->ro_collection;
+ _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_BIDIR_LIST) ? ((GeeBidirList*) _tmp2_) : NULL);
+ ro_list = _tmp3_;
+ _tmp4_ = test_list;
+ _tmp5_ = gee_collection_add ((GeeCollection*) _tmp4_, "one");
+ _vala_assert (_tmp5_, "test_list.add (\"one\")");
+ _tmp6_ = test_list;
+ _tmp7_ = gee_collection_add ((GeeCollection*) _tmp6_, "two");
+ _vala_assert (_tmp7_, "test_list.add (\"two\")");
+ _tmp8_ = ro_list;
+ _tmp9_ = gee_collection_get_size ((GeeCollection*) _tmp8_);
+ _tmp10_ = _tmp9_;
+ _vala_assert (_tmp10_ == 2, "ro_list.size == 2");
+ _tmp11_ = ro_list;
+ _tmp12_ = gee_list_get ((GeeList*) _tmp11_, 0);
+ _tmp13_ = (gchar*) _tmp12_;
+ _vala_assert (g_strcmp0 (_tmp13_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp13_);
+ _tmp14_ = ro_list;
+ _tmp15_ = gee_list_get ((GeeList*) _tmp14_, 1);
+ _tmp16_ = (gchar*) _tmp15_;
+ _vala_assert (g_strcmp0 (_tmp16_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp16_);
+ _tmp17_ = ro_list;
+ _tmp18_ = gee_bidir_list_bidir_list_iterator (_tmp17_);
+ iterator = _tmp18_;
+ _tmp19_ = iterator;
+ _tmp20_ = gee_iterator_has_next ((GeeIterator*) _tmp19_);
+ _vala_assert (_tmp20_, "iterator.has_next ()");
+ _tmp21_ = iterator;
+ _tmp22_ = gee_iterator_next ((GeeIterator*) _tmp21_);
+ _vala_assert (_tmp22_, "iterator.next ()");
+ _tmp23_ = iterator;
+ _tmp24_ = gee_iterator_get ((GeeIterator*) _tmp23_);
+ _tmp25_ = (gchar*) _tmp24_;
+ _vala_assert (g_strcmp0 (_tmp25_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp25_);
+ _tmp26_ = iterator;
+ _tmp27_ = gee_list_iterator_index ((GeeListIterator*) _tmp26_);
+ _vala_assert (_tmp27_ == 0, "iterator.index () == 0");
+ _tmp28_ = iterator;
+ _tmp29_ = gee_iterator_has_next ((GeeIterator*) _tmp28_);
+ _vala_assert (_tmp29_, "iterator.has_next ()");
+ _tmp30_ = iterator;
+ _tmp31_ = gee_iterator_next ((GeeIterator*) _tmp30_);
+ _vala_assert (_tmp31_, "iterator.next ()");
+ _tmp32_ = iterator;
+ _tmp33_ = gee_iterator_get ((GeeIterator*) _tmp32_);
+ _tmp34_ = (gchar*) _tmp33_;
+ _vala_assert (g_strcmp0 (_tmp34_, "two") == 0, "iterator.get () == \"two\"");
+ _g_free0 (_tmp34_);
+ _tmp35_ = iterator;
+ _tmp36_ = gee_list_iterator_index ((GeeListIterator*) _tmp35_);
+ _vala_assert (_tmp36_ == 1, "iterator.index () == 1");
+ _tmp37_ = iterator;
+ _tmp38_ = gee_iterator_has_next ((GeeIterator*) _tmp37_);
+ _vala_assert (!_tmp38_, "! iterator.has_next ()");
+ _tmp39_ = iterator;
+ _tmp40_ = gee_iterator_next ((GeeIterator*) _tmp39_);
+ _vala_assert (!_tmp40_, "! iterator.next ()");
+ _tmp41_ = iterator;
+ _tmp42_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp41_);
+ _vala_assert (_tmp42_, "iterator.has_previous ()");
+ _tmp43_ = iterator;
+ _tmp44_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp43_);
+ _vala_assert (_tmp44_, "iterator.previous ()");
+ _tmp45_ = iterator;
+ _tmp46_ = gee_iterator_get ((GeeIterator*) _tmp45_);
+ _tmp47_ = (gchar*) _tmp46_;
+ _vala_assert (g_strcmp0 (_tmp47_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp47_);
+ _tmp48_ = iterator;
+ _tmp49_ = gee_list_iterator_index ((GeeListIterator*) _tmp48_);
+ _vala_assert (_tmp49_ == 0, "iterator.index () == 0");
+ _tmp50_ = iterator;
+ _tmp51_ = gee_bidir_iterator_last ((GeeBidirIterator*) _tmp50_);
+ _vala_assert (_tmp51_, "iterator.last ()");
+ _tmp52_ = iterator;
+ _tmp53_ = gee_iterator_get ((GeeIterator*) _tmp52_);
+ _tmp54_ = (gchar*) _tmp53_;
+ _vala_assert (g_strcmp0 (_tmp54_, "two") == 0, "iterator.get () == \"two\"");
+ _g_free0 (_tmp54_);
+ _tmp55_ = iterator;
+ _tmp56_ = gee_list_iterator_index ((GeeListIterator*) _tmp55_);
+ _vala_assert (_tmp56_ == 1, "iterator.index () == 1");
+ _tmp57_ = iterator;
+ _tmp58_ = gee_bidir_iterator_first ((GeeBidirIterator*) _tmp57_);
+ _vala_assert (_tmp58_, "iterator.first ()");
+ _tmp59_ = iterator;
+ _tmp60_ = gee_iterator_get ((GeeIterator*) _tmp59_);
+ _tmp61_ = (gchar*) _tmp60_;
+ _vala_assert (g_strcmp0 (_tmp61_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp61_);
+ _tmp62_ = iterator;
+ _tmp63_ = gee_list_iterator_index ((GeeListIterator*) _tmp62_);
+ _vala_assert (_tmp63_ == 0, "iterator.index () == 0");
+ _tmp64_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp64_) {
+ GeeBidirListIterator* _tmp65_;
+ _tmp65_ = iterator;
+ gee_iterator_remove ((GeeIterator*) _tmp65_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp66_ = ro_list;
+ _tmp67_ = gee_collection_get_size ((GeeCollection*) _tmp66_);
+ _tmp68_ = _tmp67_;
+ _vala_assert (_tmp68_ == 2, "ro_list.size == 2");
+ _tmp69_ = ro_list;
+ _tmp70_ = gee_list_get ((GeeList*) _tmp69_, 0);
+ _tmp71_ = (gchar*) _tmp70_;
+ _vala_assert (g_strcmp0 (_tmp71_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp71_);
+ _tmp72_ = ro_list;
+ _tmp73_ = gee_list_get ((GeeList*) _tmp72_, 1);
+ _tmp74_ = (gchar*) _tmp73_;
+ _vala_assert (g_strcmp0 (_tmp74_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp74_);
+ _tmp75_ = iterator;
+ _tmp76_ = gee_list_iterator_index ((GeeListIterator*) _tmp75_);
+ _vala_assert (_tmp76_ == 0, "iterator.index () == 0");
+ _tmp77_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp77_) {
+ GeeBidirListIterator* _tmp78_;
+ _tmp78_ = iterator;
+ g_object_set ((GObject*) _tmp78_, "three", NULL);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp79_ = ro_list;
+ _tmp80_ = gee_collection_get_size ((GeeCollection*) _tmp79_);
+ _tmp81_ = _tmp80_;
+ _vala_assert (_tmp81_ == 2, "ro_list.size == 2");
+ _tmp82_ = ro_list;
+ _tmp83_ = gee_list_get ((GeeList*) _tmp82_, 0);
+ _tmp84_ = (gchar*) _tmp83_;
+ _vala_assert (g_strcmp0 (_tmp84_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp84_);
+ _tmp85_ = ro_list;
+ _tmp86_ = gee_list_get ((GeeList*) _tmp85_, 1);
+ _tmp87_ = (gchar*) _tmp86_;
+ _vala_assert (g_strcmp0 (_tmp87_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp87_);
+ _tmp88_ = iterator;
+ _tmp89_ = gee_list_iterator_index ((GeeListIterator*) _tmp88_);
+ _vala_assert (_tmp89_ == 0, "iterator.index () == 0");
+ _tmp90_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp90_) {
+ GeeBidirListIterator* _tmp91_;
+ _tmp91_ = iterator;
+ gee_bidir_list_iterator_insert (_tmp91_, "three");
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp92_ = ro_list;
+ _tmp93_ = gee_collection_get_size ((GeeCollection*) _tmp92_);
+ _tmp94_ = _tmp93_;
+ _vala_assert (_tmp94_ == 2, "ro_list.size == 2");
+ _tmp95_ = ro_list;
+ _tmp96_ = gee_list_get ((GeeList*) _tmp95_, 0);
+ _tmp97_ = (gchar*) _tmp96_;
+ _vala_assert (g_strcmp0 (_tmp97_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp97_);
+ _tmp98_ = ro_list;
+ _tmp99_ = gee_list_get ((GeeList*) _tmp98_, 1);
+ _tmp100_ = (gchar*) _tmp99_;
+ _vala_assert (g_strcmp0 (_tmp100_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp100_);
+ _tmp101_ = iterator;
+ _tmp102_ = gee_list_iterator_index ((GeeListIterator*) _tmp101_);
+ _vala_assert (_tmp102_ == 0, "iterator.index () == 0");
+ _tmp103_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp103_) {
+ GeeBidirListIterator* _tmp104_;
+ _tmp104_ = iterator;
+ gee_list_iterator_add ((GeeListIterator*) _tmp104_, "three");
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp105_ = ro_list;
+ _tmp106_ = gee_collection_get_size ((GeeCollection*) _tmp105_);
+ _tmp107_ = _tmp106_;
+ _vala_assert (_tmp107_ == 2, "ro_list.size == 2");
+ _tmp108_ = ro_list;
+ _tmp109_ = gee_list_get ((GeeList*) _tmp108_, 0);
+ _tmp110_ = (gchar*) _tmp109_;
+ _vala_assert (g_strcmp0 (_tmp110_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp110_);
+ _tmp111_ = ro_list;
+ _tmp112_ = gee_list_get ((GeeList*) _tmp111_, 1);
+ _tmp113_ = (gchar*) _tmp112_;
+ _vala_assert (g_strcmp0 (_tmp113_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp113_);
+ _tmp114_ = iterator;
+ _tmp115_ = gee_list_iterator_index ((GeeListIterator*) _tmp114_);
+ _vala_assert (_tmp115_ == 0, "iterator.index () == 0");
+ _g_object_unref0 (iterator);
+ _g_object_unref0 (ro_list);
+ _g_object_unref0 (test_list);
+}
+
+
+static void read_only_bidir_list_tests_class_init (ReadOnlyBidirListTestsClass * klass) {
+ read_only_bidir_list_tests_parent_class = g_type_class_peek_parent (klass);
+ READ_ONLY_COLLECTION_TESTS_CLASS (klass)->get_ro_view = read_only_bidir_list_tests_real_get_ro_view;
+}
+
+
+static void read_only_bidir_list_tests_instance_init (ReadOnlyBidirListTests * self) {
+}
+
+
+GType read_only_bidir_list_tests_get_type (void) {
+ static volatile gsize read_only_bidir_list_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&read_only_bidir_list_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (ReadOnlyBidirListTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) read_only_bidir_list_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ReadOnlyBidirListTests), 0, (GInstanceInitFunc) read_only_bidir_list_tests_instance_init, NULL };
+ GType read_only_bidir_list_tests_type_id;
+ read_only_bidir_list_tests_type_id = g_type_register_static (TYPE_READ_ONLY_LIST_TESTS, "ReadOnlyBidirListTests", &g_define_type_info, 0);
+ g_once_init_leave (&read_only_bidir_list_tests_type_id__volatile, read_only_bidir_list_tests_type_id);
+ }
+ return read_only_bidir_list_tests_type_id__volatile;
+}
+
+
+
diff --git a/tests/testreadonlybidirlist.vala b/tests/testreadonlybidirlist.vala
new file mode 100644
index 0000000..409e744
--- /dev/null
+++ b/tests/testreadonlybidirlist.vala
@@ -0,0 +1,119 @@
+/* testreadonlybidirlist.vala
+ *
+ * Copyright (C) 2011 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+using Gee;
+
+public class ReadOnlyBidirListTests : ReadOnlyListTests {
+
+ public ReadOnlyBidirListTests () {
+ base.with_name ("ReadOnlyBidirList");
+ add_test ("[ReadOnlyBidirList] immutable iterator", test_immutable_iterator);
+ }
+
+ protected override Collection<string> get_ro_view (Collection<string> collection) {
+ return ((Gee.BidirList) collection).read_only_view;
+ }
+
+ public new void test_immutable_iterator () {
+ var test_list = test_collection as Gee.BidirList<string>;
+ var ro_list = ro_collection as Gee.BidirList<string>;
+
+ assert (test_list.add ("one"));
+ assert (test_list.add ("two"));
+
+ assert (ro_list.size == 2);
+ assert (ro_list.get (0) == "one");
+ assert (ro_list.get (1) == "two");
+
+ Gee.BidirListIterator<string> iterator = ro_list.bidir_list_iterator ();
+
+ assert (iterator.has_next ());
+ assert (iterator.next ());
+ assert (iterator.get () == "one");
+ assert (iterator.index () == 0);
+
+ assert (iterator.has_next ());
+ assert (iterator.next ());
+ assert (iterator.get () == "two");
+ assert (iterator.index () == 1);
+
+ assert (! iterator.has_next ());
+ assert (! iterator.next ());
+
+ assert (iterator.has_previous ());
+ assert (iterator.previous ());
+ assert (iterator.get () == "one");
+ assert (iterator.index () == 0);
+
+ assert (iterator.last ());
+ assert (iterator.get () == "two");
+ assert (iterator.index () == 1);
+
+ assert (iterator.first ());
+ assert (iterator.get () == "one");
+ assert (iterator.index () == 0);
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ iterator.remove ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ assert (ro_list.size == 2);
+ assert (ro_list.get (0) == "one");
+ assert (ro_list.get (1) == "two");
+ assert (iterator.index () == 0);
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ iterator.set ("three");
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ assert (ro_list.size == 2);
+ assert (ro_list.get (0) == "one");
+ assert (ro_list.get (1) == "two");
+ assert (iterator.index () == 0);
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ iterator.insert ("three");
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ assert (ro_list.size == 2);
+ assert (ro_list.get (0) == "one");
+ assert (ro_list.get (1) == "two");
+ assert (iterator.index () == 0);
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ iterator.add ("three");
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ assert (ro_list.size == 2);
+ assert (ro_list.get (0) == "one");
+ assert (ro_list.get (1) == "two");
+ assert (iterator.index () == 0);
+ }
+}
diff --git a/tests/testreadonlycollection.c b/tests/testreadonlycollection.c
index 96122b6..db2b240 100644
--- a/tests/testreadonlycollection.c
+++ b/tests/testreadonlycollection.c
@@ -93,7 +93,7 @@ ReadOnlyCollectionTests* read_only_collection_tests_construct (GType object_type
ReadOnlyCollectionTests* read_only_collection_tests_new_with_name (const gchar* name);
ReadOnlyCollectionTests* read_only_collection_tests_construct_with_name (GType object_type, const gchar* name);
GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void read_only_collection_tests_test_unique_read_only_view_instance (ReadOnlyCollectionTests* self);
static void _read_only_collection_tests_test_unique_read_only_view_instance_gee_test_case_test_method (gpointer self);
void read_only_collection_tests_test_immutable_iterator (ReadOnlyCollectionTests* self);
@@ -147,10 +147,10 @@ ReadOnlyCollectionTests* read_only_collection_tests_construct_with_name (GType o
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (ReadOnlyCollectionTests*) gee_test_case_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyCollection] unique read-only view instance", _read_only_collection_tests_test_unique_read_only_view_instance_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyCollection] immutable iterator", _read_only_collection_tests_test_immutable_iterator_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyCollection] immutable", _read_only_collection_tests_test_immutable_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyCollection] accurate view", _read_only_collection_tests_test_accurate_view_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyCollection] unique read-only view instance", _read_only_collection_tests_test_unique_read_only_view_instance_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyCollection] immutable iterator", _read_only_collection_tests_test_immutable_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyCollection] immutable", _read_only_collection_tests_test_immutable_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyCollection] accurate view", _read_only_collection_tests_test_accurate_view_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -166,7 +166,7 @@ static void read_only_collection_tests_real_set_up (GeeTestCase* base) {
GeeCollection* _tmp1_;
GeeCollection* _tmp2_ = NULL;
self = (ReadOnlyCollectionTests*) base;
- _tmp0_ = gee_hash_multi_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ _tmp0_ = gee_hash_multi_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL);
_g_object_unref0 (self->test_collection);
self->test_collection = (GeeCollection*) _tmp0_;
_tmp1_ = self->test_collection;
@@ -275,22 +275,29 @@ void read_only_collection_tests_test_immutable_iterator (ReadOnlyCollectionTests
GeeIterator* iterator;
gboolean one_found;
gboolean two_found;
- gboolean _tmp22_;
- gboolean _tmp23_;
- GeeIterator* _tmp24_;
- gboolean _tmp25_ = FALSE;
- GeeIterator* _tmp26_;
- gboolean _tmp27_ = FALSE;
- GeeIterator* _tmp28_;
- gboolean _tmp29_ = FALSE;
+ gboolean _tmp25_;
+ gboolean _tmp26_;
+ GeeIterator* _tmp27_;
+ gboolean _tmp28_ = FALSE;
+ GeeIterator* _tmp29_;
gboolean _tmp30_ = FALSE;
- GeeCollection* _tmp32_;
- gint _tmp33_;
- gint _tmp34_;
- GeeCollection* _tmp35_;
+ GeeCollection* _tmp31_;
+ GeeIterator* _tmp32_ = NULL;
+ GeeIterator* _tmp33_;
+ gboolean _tmp34_ = FALSE;
+ GeeIterator* _tmp35_;
gboolean _tmp36_ = FALSE;
- GeeCollection* _tmp37_;
- gboolean _tmp38_ = FALSE;
+ GeeIterator* _tmp37_;
+ gboolean _tmp38_;
+ gboolean _tmp39_;
+ gboolean _tmp40_ = FALSE;
+ GeeCollection* _tmp42_;
+ gint _tmp43_;
+ gint _tmp44_;
+ GeeCollection* _tmp45_;
+ gboolean _tmp46_ = FALSE;
+ GeeCollection* _tmp47_;
+ gboolean _tmp48_ = FALSE;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_collection;
_tmp1_ = gee_collection_add (_tmp0_, "one");
@@ -317,39 +324,46 @@ void read_only_collection_tests_test_immutable_iterator (ReadOnlyCollectionTests
GeeIterator* _tmp13_;
gboolean _tmp14_ = FALSE;
GeeIterator* _tmp15_;
- gpointer _tmp16_ = NULL;
- gchar* _tmp17_;
- GQuark _tmp19_ = 0U;
- static GQuark _tmp18_label0 = 0;
- static GQuark _tmp18_label1 = 0;
+ gboolean _tmp16_;
+ gboolean _tmp17_;
+ GeeIterator* _tmp18_;
+ gpointer _tmp19_ = NULL;
+ gchar* _tmp20_;
+ GQuark _tmp22_ = 0U;
+ static GQuark _tmp21_label0 = 0;
+ static GQuark _tmp21_label1 = 0;
_tmp13_ = iterator;
_tmp14_ = gee_iterator_next (_tmp13_);
if (!_tmp14_) {
break;
}
_tmp15_ = iterator;
- _tmp16_ = gee_iterator_get (_tmp15_);
- _tmp17_ = (gchar*) _tmp16_;
- _tmp19_ = (NULL == _tmp17_) ? 0 : g_quark_from_string (_tmp17_);
- g_free (_tmp17_);
- if (_tmp19_ == ((0 != _tmp18_label0) ? _tmp18_label0 : (_tmp18_label0 = g_quark_from_static_string ("one")))) {
+ _tmp16_ = gee_iterator_get_valid (_tmp15_);
+ _tmp17_ = _tmp16_;
+ _vala_assert (_tmp17_, "iterator.valid");
+ _tmp18_ = iterator;
+ _tmp19_ = gee_iterator_get (_tmp18_);
+ _tmp20_ = (gchar*) _tmp19_;
+ _tmp22_ = (NULL == _tmp20_) ? 0 : g_quark_from_string (_tmp20_);
+ g_free (_tmp20_);
+ if (_tmp22_ == ((0 != _tmp21_label0) ? _tmp21_label0 : (_tmp21_label0 = g_quark_from_static_string ("one")))) {
switch (0) {
default:
{
- gboolean _tmp20_;
- _tmp20_ = one_found;
- _vala_assert (!_tmp20_, "! one_found");
+ gboolean _tmp23_;
+ _tmp23_ = one_found;
+ _vala_assert (!_tmp23_, "! one_found");
one_found = TRUE;
break;
}
}
- } else if (_tmp19_ == ((0 != _tmp18_label1) ? _tmp18_label1 : (_tmp18_label1 = g_quark_from_static_string ("two")))) {
+ } else if (_tmp22_ == ((0 != _tmp21_label1) ? _tmp21_label1 : (_tmp21_label1 = g_quark_from_static_string ("two")))) {
switch (0) {
default:
{
- gboolean _tmp21_;
- _tmp21_ = two_found;
- _vala_assert (!_tmp21_, "! two_found");
+ gboolean _tmp24_;
+ _tmp24_ = two_found;
+ _vala_assert (!_tmp24_, "! two_found");
two_found = TRUE;
break;
}
@@ -363,37 +377,48 @@ void read_only_collection_tests_test_immutable_iterator (ReadOnlyCollectionTests
}
}
}
- _tmp22_ = one_found;
- _vala_assert (_tmp22_, "one_found");
- _tmp23_ = two_found;
- _vala_assert (_tmp23_, "two_found");
- _tmp24_ = iterator;
- _tmp25_ = gee_iterator_has_next (_tmp24_);
- _vala_assert (!_tmp25_, "! iterator.has_next ()");
- _tmp26_ = iterator;
- _tmp27_ = gee_iterator_next (_tmp26_);
- _vala_assert (!_tmp27_, "! iterator.next ()");
- _tmp28_ = iterator;
- _tmp29_ = gee_iterator_first (_tmp28_);
- _vala_assert (_tmp29_, "iterator.first ()");
- _tmp30_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp30_) {
- GeeIterator* _tmp31_;
- _tmp31_ = iterator;
- gee_iterator_remove (_tmp31_);
+ _tmp25_ = one_found;
+ _vala_assert (_tmp25_, "one_found");
+ _tmp26_ = two_found;
+ _vala_assert (_tmp26_, "two_found");
+ _tmp27_ = iterator;
+ _tmp28_ = gee_iterator_has_next (_tmp27_);
+ _vala_assert (!_tmp28_, "! iterator.has_next ()");
+ _tmp29_ = iterator;
+ _tmp30_ = gee_iterator_next (_tmp29_);
+ _vala_assert (!_tmp30_, "! iterator.next ()");
+ _tmp31_ = self->ro_collection;
+ _tmp32_ = gee_iterable_iterator ((GeeIterable*) _tmp31_);
+ _g_object_unref0 (iterator);
+ iterator = _tmp32_;
+ _tmp33_ = iterator;
+ _tmp34_ = gee_iterator_has_next (_tmp33_);
+ _vala_assert (_tmp34_, "iterator.has_next ()");
+ _tmp35_ = iterator;
+ _tmp36_ = gee_iterator_next (_tmp35_);
+ _vala_assert (_tmp36_, "iterator.next ()");
+ _tmp37_ = iterator;
+ _tmp38_ = gee_iterator_get_read_only (_tmp37_);
+ _tmp39_ = _tmp38_;
+ _vala_assert (_tmp39_, "iterator.read_only");
+ _tmp40_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp40_) {
+ GeeIterator* _tmp41_;
+ _tmp41_ = iterator;
+ gee_iterator_remove (_tmp41_);
exit (0);
}
g_test_trap_assert_failed ();
- _tmp32_ = self->ro_collection;
- _tmp33_ = gee_collection_get_size (_tmp32_);
- _tmp34_ = _tmp33_;
- _vala_assert (_tmp34_ == 2, "ro_collection.size == 2");
- _tmp35_ = self->ro_collection;
- _tmp36_ = gee_collection_contains (_tmp35_, "one");
- _vala_assert (_tmp36_, "ro_collection.contains (\"one\")");
- _tmp37_ = self->ro_collection;
- _tmp38_ = gee_collection_contains (_tmp37_, "two");
- _vala_assert (_tmp38_, "ro_collection.contains (\"two\")");
+ _tmp42_ = self->ro_collection;
+ _tmp43_ = gee_collection_get_size (_tmp42_);
+ _tmp44_ = _tmp43_;
+ _vala_assert (_tmp44_ == 2, "ro_collection.size == 2");
+ _tmp45_ = self->ro_collection;
+ _tmp46_ = gee_collection_contains (_tmp45_, "one");
+ _vala_assert (_tmp46_, "ro_collection.contains (\"one\")");
+ _tmp47_ = self->ro_collection;
+ _tmp48_ = gee_collection_contains (_tmp47_, "two");
+ _vala_assert (_tmp48_, "ro_collection.contains (\"two\")");
_g_object_unref0 (iterator);
}
@@ -461,7 +486,7 @@ void read_only_collection_tests_test_immutable (ReadOnlyCollectionTests* self) {
_tmp5_ = self->ro_collection;
_tmp6_ = gee_collection_contains (_tmp5_, "one");
_vala_assert (_tmp6_, "ro_collection.contains (\"one\")");
- _tmp7_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp7_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = (GeeCollection*) _tmp7_;
_tmp8_ = dummy;
_tmp9_ = gee_collection_add (_tmp8_, "one");
@@ -648,14 +673,14 @@ void read_only_collection_tests_test_accurate_view (ReadOnlyCollectionTests* sel
GeeCollection* _tmp61_;
gboolean _tmp62_ = FALSE;
g_return_if_fail (self != NULL);
- _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = (GeeCollection*) _tmp0_;
_tmp1_ = gee_collection_add (dummy, "one");
_vala_assert (_tmp1_, "dummy.add (\"one\")");
_tmp2_ = gee_collection_add (dummy, "two");
_vala_assert (_tmp2_, "dummy.add (\"two\")");
_tmp3_ = self->ro_collection;
- _tmp4_ = gee_iterable_get_element_type ((GeeIterable*) _tmp3_);
+ _tmp4_ = gee_traversable_get_element_type ((GeeTraversable*) _tmp3_);
_tmp5_ = _tmp4_;
_vala_assert (_tmp5_ == G_TYPE_STRING, "ro_collection.element_type == typeof (string)");
_tmp6_ = self->ro_collection;
diff --git a/tests/testreadonlycollection.vala b/tests/testreadonlycollection.vala
index 42134f5..c2b7fc0 100644
--- a/tests/testreadonlycollection.vala
+++ b/tests/testreadonlycollection.vala
@@ -87,6 +87,7 @@ public class ReadOnlyCollectionTests : Gee.TestCase {
bool two_found = false;
while (iterator.next ()) {
+ assert (iterator.valid);
switch(iterator.get ()) {
case "one":
assert (! one_found);
@@ -107,8 +108,11 @@ public class ReadOnlyCollectionTests : Gee.TestCase {
assert (! iterator.has_next ());
assert (! iterator.next ());
- assert (iterator.first ());
+ iterator = ro_collection.iterator ();
+ assert (iterator.has_next ());
+ assert (iterator.next ());
+ assert (iterator.read_only);
if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
TestTrapFlags.SILENCE_STDERR)) {
iterator.remove ();
diff --git a/tests/testreadonlylist.c b/tests/testreadonlylist.c
index 9a53a3c..b21055b 100644
--- a/tests/testreadonlylist.c
+++ b/tests/testreadonlylist.c
@@ -113,9 +113,11 @@ enum {
};
ReadOnlyListTests* read_only_list_tests_new (void);
ReadOnlyListTests* read_only_list_tests_construct (GType object_type);
+ReadOnlyListTests* read_only_list_tests_new_with_name (const gchar* name);
+ReadOnlyListTests* read_only_list_tests_construct_with_name (GType object_type, const gchar* name);
ReadOnlyCollectionTests* read_only_collection_tests_new_with_name (const gchar* name);
ReadOnlyCollectionTests* read_only_collection_tests_construct_with_name (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void read_only_list_tests_test_immutable_iterator (ReadOnlyListTests* self);
static void _read_only_list_tests_test_immutable_iterator_gee_test_case_test_method (gpointer self);
void read_only_list_tests_test_immutable (ReadOnlyListTests* self);
@@ -128,6 +130,18 @@ static void read_only_list_tests_real_tear_down (GeeTestCase* base);
static GeeCollection* read_only_list_tests_real_get_ro_view (ReadOnlyCollectionTests* base, GeeCollection* collection);
+ReadOnlyListTests* read_only_list_tests_construct (GType object_type) {
+ ReadOnlyListTests * self = NULL;
+ self = (ReadOnlyListTests*) read_only_list_tests_construct_with_name (object_type, "ReadOnlyList");
+ return self;
+}
+
+
+ReadOnlyListTests* read_only_list_tests_new (void) {
+ return read_only_list_tests_construct (TYPE_READ_ONLY_LIST_TESTS);
+}
+
+
static void _read_only_list_tests_test_immutable_iterator_gee_test_case_test_method (gpointer self) {
read_only_list_tests_test_immutable_iterator (self);
}
@@ -143,18 +157,21 @@ static void _read_only_list_tests_test_accurate_view_gee_test_case_test_method (
}
-ReadOnlyListTests* read_only_list_tests_construct (GType object_type) {
+ReadOnlyListTests* read_only_list_tests_construct_with_name (GType object_type, const gchar* name) {
ReadOnlyListTests * self = NULL;
- self = (ReadOnlyListTests*) read_only_collection_tests_construct_with_name (object_type, "ReadOnlyList");
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyList] immutable iterator", _read_only_list_tests_test_immutable_iterator_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyList] immutable", _read_only_list_tests_test_immutable_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyList] accurate view", _read_only_list_tests_test_accurate_view_gee_test_case_test_method, self);
+ const gchar* _tmp0_;
+ g_return_val_if_fail (name != NULL, NULL);
+ _tmp0_ = name;
+ self = (ReadOnlyListTests*) read_only_collection_tests_construct_with_name (object_type, _tmp0_);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyList] immutable iterator", _read_only_list_tests_test_immutable_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyList] immutable", _read_only_list_tests_test_immutable_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyList] accurate view", _read_only_list_tests_test_accurate_view_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
-ReadOnlyListTests* read_only_list_tests_new (void) {
- return read_only_list_tests_construct (TYPE_READ_ONLY_LIST_TESTS);
+ReadOnlyListTests* read_only_list_tests_new_with_name (const gchar* name) {
+ return read_only_list_tests_construct_with_name (TYPE_READ_ONLY_LIST_TESTS, name);
}
@@ -164,7 +181,7 @@ static void read_only_list_tests_real_set_up (GeeTestCase* base) {
GeeCollection* _tmp1_;
GeeCollection* _tmp2_ = NULL;
self = (ReadOnlyListTests*) base;
- _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
_g_object_unref0 (((ReadOnlyCollectionTests*) self)->test_collection);
((ReadOnlyCollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
_tmp1_ = ((ReadOnlyCollectionTests*) self)->test_collection;
@@ -250,77 +267,57 @@ void read_only_list_tests_test_immutable_iterator (ReadOnlyListTests* self) {
gboolean _tmp38_ = FALSE;
GeeListIterator* _tmp39_;
gboolean _tmp40_ = FALSE;
- GeeListIterator* _tmp41_;
- gboolean _tmp42_ = FALSE;
+ GeeList* _tmp41_;
+ GeeListIterator* _tmp42_ = NULL;
GeeListIterator* _tmp43_;
gboolean _tmp44_ = FALSE;
- GeeListIterator* _tmp45_;
- gpointer _tmp46_ = NULL;
- gchar* _tmp47_;
- GeeListIterator* _tmp48_;
- gint _tmp49_ = 0;
- GeeListIterator* _tmp50_;
- gboolean _tmp51_ = FALSE;
- GeeListIterator* _tmp52_;
- gpointer _tmp53_ = NULL;
- gchar* _tmp54_;
- GeeListIterator* _tmp55_;
- gint _tmp56_ = 0;
- GeeListIterator* _tmp57_;
+ gboolean _tmp45_ = FALSE;
+ GeeList* _tmp47_;
+ gint _tmp48_;
+ gint _tmp49_;
+ GeeList* _tmp50_;
+ gpointer _tmp51_ = NULL;
+ gchar* _tmp52_;
+ GeeList* _tmp53_;
+ gpointer _tmp54_ = NULL;
+ gchar* _tmp55_;
+ GeeListIterator* _tmp56_;
+ gint _tmp57_ = 0;
gboolean _tmp58_ = FALSE;
- GeeListIterator* _tmp59_;
- gpointer _tmp60_ = NULL;
- gchar* _tmp61_;
- GeeListIterator* _tmp62_;
- gint _tmp63_ = 0;
- gboolean _tmp64_ = FALSE;
+ GeeList* _tmp60_;
+ gint _tmp61_;
+ gint _tmp62_;
+ GeeList* _tmp63_;
+ gpointer _tmp64_ = NULL;
+ gchar* _tmp65_;
GeeList* _tmp66_;
- gint _tmp67_;
- gint _tmp68_;
- GeeList* _tmp69_;
- gpointer _tmp70_ = NULL;
- gchar* _tmp71_;
- GeeList* _tmp72_;
- gpointer _tmp73_ = NULL;
- gchar* _tmp74_;
- GeeListIterator* _tmp75_;
- gint _tmp76_ = 0;
- gboolean _tmp77_ = FALSE;
- GeeList* _tmp79_;
- gint _tmp80_;
- gint _tmp81_;
- GeeList* _tmp82_;
- gpointer _tmp83_ = NULL;
- gchar* _tmp84_;
- GeeList* _tmp85_;
- gpointer _tmp86_ = NULL;
- gchar* _tmp87_;
- GeeListIterator* _tmp88_;
- gint _tmp89_ = 0;
- gboolean _tmp90_ = FALSE;
- GeeList* _tmp92_;
- gint _tmp93_;
- gint _tmp94_;
- GeeList* _tmp95_;
- gpointer _tmp96_ = NULL;
- gchar* _tmp97_;
- GeeList* _tmp98_;
- gpointer _tmp99_ = NULL;
- gchar* _tmp100_;
- GeeListIterator* _tmp101_;
- gint _tmp102_ = 0;
- gboolean _tmp103_ = FALSE;
- GeeList* _tmp105_;
- gint _tmp106_;
- gint _tmp107_;
- GeeList* _tmp108_;
- gpointer _tmp109_ = NULL;
- gchar* _tmp110_;
- GeeList* _tmp111_;
- gpointer _tmp112_ = NULL;
- gchar* _tmp113_;
- GeeListIterator* _tmp114_;
- gint _tmp115_ = 0;
+ gpointer _tmp67_ = NULL;
+ gchar* _tmp68_;
+ GeeListIterator* _tmp69_;
+ gint _tmp70_ = 0;
+ GeeList* _tmp71_;
+ gint _tmp72_;
+ gint _tmp73_;
+ GeeList* _tmp74_;
+ gpointer _tmp75_ = NULL;
+ gchar* _tmp76_;
+ GeeList* _tmp77_;
+ gpointer _tmp78_ = NULL;
+ gchar* _tmp79_;
+ GeeListIterator* _tmp80_;
+ gint _tmp81_ = 0;
+ gboolean _tmp82_ = FALSE;
+ GeeList* _tmp84_;
+ gint _tmp85_;
+ gint _tmp86_;
+ GeeList* _tmp87_;
+ gpointer _tmp88_ = NULL;
+ gchar* _tmp89_;
+ GeeList* _tmp90_;
+ gpointer _tmp91_ = NULL;
+ gchar* _tmp92_;
+ GeeListIterator* _tmp93_;
+ gint _tmp94_ = 0;
g_return_if_fail (self != NULL);
_tmp0_ = ((ReadOnlyCollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_LIST) ? ((GeeList*) _tmp0_) : NULL);
@@ -385,142 +382,105 @@ void read_only_list_tests_test_immutable_iterator (ReadOnlyListTests* self) {
_tmp39_ = iterator;
_tmp40_ = gee_iterator_next ((GeeIterator*) _tmp39_);
_vala_assert (!_tmp40_, "! iterator.next ()");
- _tmp41_ = iterator;
- _tmp42_ = gee_bidir_iterator_has_previous ((GeeBidirIterator*) _tmp41_);
- _vala_assert (_tmp42_, "iterator.has_previous ()");
+ _tmp41_ = ro_list;
+ _tmp42_ = gee_list_list_iterator (_tmp41_);
+ _g_object_unref0 (iterator);
+ iterator = _tmp42_;
_tmp43_ = iterator;
- _tmp44_ = gee_bidir_iterator_previous ((GeeBidirIterator*) _tmp43_);
- _vala_assert (_tmp44_, "iterator.previous ()");
- _tmp45_ = iterator;
- _tmp46_ = gee_iterator_get ((GeeIterator*) _tmp45_);
- _tmp47_ = (gchar*) _tmp46_;
- _vala_assert (g_strcmp0 (_tmp47_, "one") == 0, "iterator.get () == \"one\"");
- _g_free0 (_tmp47_);
- _tmp48_ = iterator;
- _tmp49_ = gee_list_iterator_index (_tmp48_);
- _vala_assert (_tmp49_ == 0, "iterator.index () == 0");
- _tmp50_ = iterator;
- _tmp51_ = gee_bidir_iterator_last ((GeeBidirIterator*) _tmp50_);
- _vala_assert (_tmp51_, "iterator.last ()");
- _tmp52_ = iterator;
- _tmp53_ = gee_iterator_get ((GeeIterator*) _tmp52_);
- _tmp54_ = (gchar*) _tmp53_;
- _vala_assert (g_strcmp0 (_tmp54_, "two") == 0, "iterator.get () == \"two\"");
- _g_free0 (_tmp54_);
- _tmp55_ = iterator;
- _tmp56_ = gee_list_iterator_index (_tmp55_);
- _vala_assert (_tmp56_ == 1, "iterator.index () == 1");
- _tmp57_ = iterator;
- _tmp58_ = gee_iterator_first ((GeeIterator*) _tmp57_);
- _vala_assert (_tmp58_, "iterator.first ()");
- _tmp59_ = iterator;
- _tmp60_ = gee_iterator_get ((GeeIterator*) _tmp59_);
- _tmp61_ = (gchar*) _tmp60_;
- _vala_assert (g_strcmp0 (_tmp61_, "one") == 0, "iterator.get () == \"one\"");
- _g_free0 (_tmp61_);
- _tmp62_ = iterator;
- _tmp63_ = gee_list_iterator_index (_tmp62_);
- _vala_assert (_tmp63_ == 0, "iterator.index () == 0");
- _tmp64_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp64_) {
- GeeListIterator* _tmp65_;
- _tmp65_ = iterator;
- gee_iterator_remove ((GeeIterator*) _tmp65_);
- exit (0);
- }
- g_test_trap_assert_failed ();
- _tmp66_ = ro_list;
- _tmp67_ = gee_collection_get_size ((GeeCollection*) _tmp66_);
- _tmp68_ = _tmp67_;
- _vala_assert (_tmp68_ == 2, "ro_list.size == 2");
- _tmp69_ = ro_list;
- _tmp70_ = gee_list_get (_tmp69_, 0);
- _tmp71_ = (gchar*) _tmp70_;
- _vala_assert (g_strcmp0 (_tmp71_, "one") == 0, "ro_list.get (0) == \"one\"");
- _g_free0 (_tmp71_);
- _tmp72_ = ro_list;
- _tmp73_ = gee_list_get (_tmp72_, 1);
- _tmp74_ = (gchar*) _tmp73_;
- _vala_assert (g_strcmp0 (_tmp74_, "two") == 0, "ro_list.get (1) == \"two\"");
- _g_free0 (_tmp74_);
- _tmp75_ = iterator;
- _tmp76_ = gee_list_iterator_index (_tmp75_);
- _vala_assert (_tmp76_ == 0, "iterator.index () == 0");
- _tmp77_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp77_) {
- GeeListIterator* _tmp78_;
- _tmp78_ = iterator;
- gee_list_iterator_set (_tmp78_, "three");
+ _tmp44_ = gee_iterator_next ((GeeIterator*) _tmp43_);
+ _vala_assert (_tmp44_, "iterator.next ()");
+ _tmp45_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp45_) {
+ GeeListIterator* _tmp46_;
+ _tmp46_ = iterator;
+ gee_iterator_remove ((GeeIterator*) _tmp46_);
exit (0);
}
g_test_trap_assert_failed ();
- _tmp79_ = ro_list;
- _tmp80_ = gee_collection_get_size ((GeeCollection*) _tmp79_);
- _tmp81_ = _tmp80_;
- _vala_assert (_tmp81_ == 2, "ro_list.size == 2");
- _tmp82_ = ro_list;
- _tmp83_ = gee_list_get (_tmp82_, 0);
- _tmp84_ = (gchar*) _tmp83_;
- _vala_assert (g_strcmp0 (_tmp84_, "one") == 0, "ro_list.get (0) == \"one\"");
- _g_free0 (_tmp84_);
- _tmp85_ = ro_list;
- _tmp86_ = gee_list_get (_tmp85_, 1);
- _tmp87_ = (gchar*) _tmp86_;
- _vala_assert (g_strcmp0 (_tmp87_, "two") == 0, "ro_list.get (1) == \"two\"");
- _g_free0 (_tmp87_);
- _tmp88_ = iterator;
- _tmp89_ = gee_list_iterator_index (_tmp88_);
- _vala_assert (_tmp89_ == 0, "iterator.index () == 0");
- _tmp90_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp90_) {
- GeeListIterator* _tmp91_;
- _tmp91_ = iterator;
- gee_list_iterator_insert (_tmp91_, "three");
+ _tmp47_ = ro_list;
+ _tmp48_ = gee_collection_get_size ((GeeCollection*) _tmp47_);
+ _tmp49_ = _tmp48_;
+ _vala_assert (_tmp49_ == 2, "ro_list.size == 2");
+ _tmp50_ = ro_list;
+ _tmp51_ = gee_list_get (_tmp50_, 0);
+ _tmp52_ = (gchar*) _tmp51_;
+ _vala_assert (g_strcmp0 (_tmp52_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp52_);
+ _tmp53_ = ro_list;
+ _tmp54_ = gee_list_get (_tmp53_, 1);
+ _tmp55_ = (gchar*) _tmp54_;
+ _vala_assert (g_strcmp0 (_tmp55_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp55_);
+ _tmp56_ = iterator;
+ _tmp57_ = gee_list_iterator_index (_tmp56_);
+ _vala_assert (_tmp57_ == 0, "iterator.index () == 0");
+ _tmp58_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp58_) {
+ GeeListIterator* _tmp59_;
+ _tmp59_ = iterator;
+ gee_list_iterator_set (_tmp59_, "three");
exit (0);
}
g_test_trap_assert_failed ();
- _tmp92_ = ro_list;
- _tmp93_ = gee_collection_get_size ((GeeCollection*) _tmp92_);
- _tmp94_ = _tmp93_;
- _vala_assert (_tmp94_ == 2, "ro_list.size == 2");
- _tmp95_ = ro_list;
- _tmp96_ = gee_list_get (_tmp95_, 0);
- _tmp97_ = (gchar*) _tmp96_;
- _vala_assert (g_strcmp0 (_tmp97_, "one") == 0, "ro_list.get (0) == \"one\"");
- _g_free0 (_tmp97_);
- _tmp98_ = ro_list;
- _tmp99_ = gee_list_get (_tmp98_, 1);
- _tmp100_ = (gchar*) _tmp99_;
- _vala_assert (g_strcmp0 (_tmp100_, "two") == 0, "ro_list.get (1) == \"two\"");
- _g_free0 (_tmp100_);
- _tmp101_ = iterator;
- _tmp102_ = gee_list_iterator_index (_tmp101_);
- _vala_assert (_tmp102_ == 0, "iterator.index () == 0");
- _tmp103_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp103_) {
- GeeListIterator* _tmp104_;
- _tmp104_ = iterator;
- gee_list_iterator_add (_tmp104_, "three");
+ _tmp60_ = ro_list;
+ _tmp61_ = gee_collection_get_size ((GeeCollection*) _tmp60_);
+ _tmp62_ = _tmp61_;
+ _vala_assert (_tmp62_ == 2, "ro_list.size == 2");
+ _tmp63_ = ro_list;
+ _tmp64_ = gee_list_get (_tmp63_, 0);
+ _tmp65_ = (gchar*) _tmp64_;
+ _vala_assert (g_strcmp0 (_tmp65_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp65_);
+ _tmp66_ = ro_list;
+ _tmp67_ = gee_list_get (_tmp66_, 1);
+ _tmp68_ = (gchar*) _tmp67_;
+ _vala_assert (g_strcmp0 (_tmp68_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp68_);
+ _tmp69_ = iterator;
+ _tmp70_ = gee_list_iterator_index (_tmp69_);
+ _vala_assert (_tmp70_ == 0, "iterator.index () == 0");
+ _tmp71_ = ro_list;
+ _tmp72_ = gee_collection_get_size ((GeeCollection*) _tmp71_);
+ _tmp73_ = _tmp72_;
+ _vala_assert (_tmp73_ == 2, "ro_list.size == 2");
+ _tmp74_ = ro_list;
+ _tmp75_ = gee_list_get (_tmp74_, 0);
+ _tmp76_ = (gchar*) _tmp75_;
+ _vala_assert (g_strcmp0 (_tmp76_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp76_);
+ _tmp77_ = ro_list;
+ _tmp78_ = gee_list_get (_tmp77_, 1);
+ _tmp79_ = (gchar*) _tmp78_;
+ _vala_assert (g_strcmp0 (_tmp79_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp79_);
+ _tmp80_ = iterator;
+ _tmp81_ = gee_list_iterator_index (_tmp80_);
+ _vala_assert (_tmp81_ == 0, "iterator.index () == 0");
+ _tmp82_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp82_) {
+ GeeListIterator* _tmp83_;
+ _tmp83_ = iterator;
+ gee_list_iterator_add (_tmp83_, "three");
exit (0);
}
g_test_trap_assert_failed ();
- _tmp105_ = ro_list;
- _tmp106_ = gee_collection_get_size ((GeeCollection*) _tmp105_);
- _tmp107_ = _tmp106_;
- _vala_assert (_tmp107_ == 2, "ro_list.size == 2");
- _tmp108_ = ro_list;
- _tmp109_ = gee_list_get (_tmp108_, 0);
- _tmp110_ = (gchar*) _tmp109_;
- _vala_assert (g_strcmp0 (_tmp110_, "one") == 0, "ro_list.get (0) == \"one\"");
- _g_free0 (_tmp110_);
- _tmp111_ = ro_list;
- _tmp112_ = gee_list_get (_tmp111_, 1);
- _tmp113_ = (gchar*) _tmp112_;
- _vala_assert (g_strcmp0 (_tmp113_, "two") == 0, "ro_list.get (1) == \"two\"");
- _g_free0 (_tmp113_);
- _tmp114_ = iterator;
- _tmp115_ = gee_list_iterator_index (_tmp114_);
- _vala_assert (_tmp115_ == 0, "iterator.index () == 0");
+ _tmp84_ = ro_list;
+ _tmp85_ = gee_collection_get_size ((GeeCollection*) _tmp84_);
+ _tmp86_ = _tmp85_;
+ _vala_assert (_tmp86_ == 2, "ro_list.size == 2");
+ _tmp87_ = ro_list;
+ _tmp88_ = gee_list_get (_tmp87_, 0);
+ _tmp89_ = (gchar*) _tmp88_;
+ _vala_assert (g_strcmp0 (_tmp89_, "one") == 0, "ro_list.get (0) == \"one\"");
+ _g_free0 (_tmp89_);
+ _tmp90_ = ro_list;
+ _tmp91_ = gee_list_get (_tmp90_, 1);
+ _tmp92_ = (gchar*) _tmp91_;
+ _vala_assert (g_strcmp0 (_tmp92_, "two") == 0, "ro_list.get (1) == \"two\"");
+ _g_free0 (_tmp92_);
+ _tmp93_ = iterator;
+ _tmp94_ = gee_list_iterator_index (_tmp93_);
+ _vala_assert (_tmp94_ == 0, "iterator.index () == 0");
_g_object_unref0 (iterator);
_g_object_unref0 (ro_list);
_g_object_unref0 (test_list);
@@ -594,7 +554,7 @@ void read_only_list_tests_test_immutable (ReadOnlyListTests* self) {
_tmp9_ = ro_list;
_tmp10_ = gee_collection_contains ((GeeCollection*) _tmp9_, "one");
_vala_assert (_tmp10_, "ro_list.contains (\"one\")");
- _tmp11_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp11_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = (GeeCollection*) _tmp11_;
_tmp12_ = dummy;
_tmp13_ = gee_collection_add (_tmp12_, "one");
@@ -672,7 +632,7 @@ void read_only_list_tests_test_immutable (ReadOnlyListTests* self) {
if (_tmp47_) {
GeeList* _tmp48_;
_tmp48_ = ro_list;
- gee_list_sort (_tmp48_, NULL);
+ gee_list_sort (_tmp48_, NULL, NULL, NULL);
exit (0);
}
g_test_trap_assert_failed ();
@@ -763,13 +723,13 @@ void read_only_list_tests_test_accurate_view (ReadOnlyListTests* self) {
_tmp2_ = ((ReadOnlyCollectionTests*) self)->ro_collection;
_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_LIST) ? ((GeeList*) _tmp2_) : NULL);
ro_list = _tmp3_;
- _tmp4_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp4_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
dummy = (GeeCollection*) _tmp4_;
_tmp5_ = gee_collection_add (dummy, "one");
_vala_assert (_tmp5_, "dummy.add (\"one\")");
_tmp6_ = gee_collection_add (dummy, "two");
_vala_assert (_tmp6_, "dummy.add (\"two\")");
- _tmp7_ = gee_iterable_get_element_type ((GeeIterable*) ro_list);
+ _tmp7_ = gee_traversable_get_element_type ((GeeTraversable*) ro_list);
_tmp8_ = _tmp7_;
_vala_assert (_tmp8_ == G_TYPE_STRING, "ro_list.element_type == typeof (string)");
_tmp9_ = gee_collection_get_size ((GeeCollection*) ro_list);
diff --git a/tests/testreadonlylist.vala b/tests/testreadonlylist.vala
index d1b2220..9db5e40 100644
--- a/tests/testreadonlylist.vala
+++ b/tests/testreadonlylist.vala
@@ -28,7 +28,11 @@ using Gee;
public class ReadOnlyListTests : ReadOnlyCollectionTests {
public ReadOnlyListTests () {
- base.with_name ("ReadOnlyList");
+ this.with_name ("ReadOnlyList");
+ }
+
+ public ReadOnlyListTests.with_name (string name) {
+ base.with_name (name);
add_test ("[ReadOnlyList] immutable iterator", test_immutable_iterator);
add_test ("[ReadOnlyList] immutable", test_immutable);
add_test ("[ReadOnlyList] accurate view", test_accurate_view);
@@ -74,18 +78,8 @@ public class ReadOnlyListTests : ReadOnlyCollectionTests {
assert (! iterator.has_next ());
assert (! iterator.next ());
- assert (iterator.has_previous ());
- assert (iterator.previous ());
- assert (iterator.get () == "one");
- assert (iterator.index () == 0);
-
- assert (iterator.last ());
- assert (iterator.get () == "two");
- assert (iterator.index () == 1);
-
- assert (iterator.first ());
- assert (iterator.get () == "one");
- assert (iterator.index () == 0);
+ iterator = ro_list.list_iterator ();
+ assert (iterator.next ());
if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
TestTrapFlags.SILENCE_STDERR)) {
@@ -109,12 +103,6 @@ public class ReadOnlyListTests : ReadOnlyCollectionTests {
assert (ro_list.get (1) == "two");
assert (iterator.index () == 0);
- if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
- TestTrapFlags.SILENCE_STDERR)) {
- iterator.insert ("three");
- Posix.exit (0);
- }
- Test.trap_assert_failed ();
assert (ro_list.size == 2);
assert (ro_list.get (0) == "one");
assert (ro_list.get (1) == "two");
diff --git a/tests/testreadonlymap.c b/tests/testreadonlymap.c
index 67b82f1..cb79298 100644
--- a/tests/testreadonlymap.c
+++ b/tests/testreadonlymap.c
@@ -90,7 +90,7 @@ enum {
ReadOnlyMapTests* read_only_map_tests_new (void);
ReadOnlyMapTests* read_only_map_tests_construct (GType object_type);
GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void read_only_map_tests_test_unique_read_only_view_instance (ReadOnlyMapTests* self);
static void _read_only_map_tests_test_unique_read_only_view_instance_gee_test_case_test_method (gpointer self);
void read_only_map_tests_test_immutable_iterator (ReadOnlyMapTests* self);
@@ -127,10 +127,10 @@ static void _read_only_map_tests_test_accurate_view_gee_test_case_test_method (g
ReadOnlyMapTests* read_only_map_tests_construct (GType object_type) {
ReadOnlyMapTests * self = NULL;
self = (ReadOnlyMapTests*) gee_test_case_construct (object_type, "ReadOnlyMap");
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] unique read-only view instance", _read_only_map_tests_test_unique_read_only_view_instance_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] immutable iterator", _read_only_map_tests_test_immutable_iterator_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] immutable", _read_only_map_tests_test_immutable_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] accurate view", _read_only_map_tests_test_accurate_view_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] unique read-only view instance", _read_only_map_tests_test_unique_read_only_view_instance_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] immutable iterator", _read_only_map_tests_test_immutable_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] immutable", _read_only_map_tests_test_immutable_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[ReadOnlyMap] accurate view", _read_only_map_tests_test_accurate_view_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -147,7 +147,7 @@ static void read_only_map_tests_real_set_up (GeeTestCase* base) {
GeeMap* _tmp2_;
GeeMap* _tmp3_;
self = (ReadOnlyMapTests*) base;
- _tmp0_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ _tmp0_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
_g_object_unref0 (self->test_map);
self->test_map = (GeeMap*) _tmp0_;
_tmp1_ = self->test_map;
@@ -265,23 +265,30 @@ void read_only_map_tests_test_immutable_iterator (ReadOnlyMapTests* self) {
gboolean _tmp34_ = FALSE;
GeeIterator* _tmp35_;
gboolean _tmp36_ = FALSE;
- GeeIterator* _tmp37_;
- gboolean _tmp38_ = FALSE;
- GeeIterator* _tmp39_;
- gpointer _tmp40_ = NULL;
- gchar* _tmp41_;
- gboolean _tmp42_ = FALSE;
- GeeMap* _tmp44_;
- gint _tmp45_;
- gint _tmp46_;
- GeeMap* _tmp47_;
- gboolean _tmp48_ = FALSE;
- GeeMap* _tmp49_;
- gboolean _tmp50_ = FALSE;
+ GeeMap* _tmp37_;
+ GeeSet* _tmp38_;
+ GeeSet* _tmp39_;
+ GeeSet* _tmp40_;
+ GeeIterator* _tmp41_ = NULL;
+ GeeIterator* _tmp42_;
+ gboolean _tmp43_ = FALSE;
+ GeeIterator* _tmp44_;
+ gboolean _tmp45_ = FALSE;
+ GeeIterator* _tmp46_;
+ gpointer _tmp47_ = NULL;
+ gchar* _tmp48_;
+ gboolean _tmp49_ = FALSE;
GeeMap* _tmp51_;
- gboolean _tmp52_ = FALSE;
- GeeMap* _tmp53_;
- gboolean _tmp54_ = FALSE;
+ gint _tmp52_;
+ gint _tmp53_;
+ GeeMap* _tmp54_;
+ gboolean _tmp55_ = FALSE;
+ GeeMap* _tmp56_;
+ gboolean _tmp57_ = FALSE;
+ GeeMap* _tmp58_;
+ gboolean _tmp59_ = FALSE;
+ GeeMap* _tmp60_;
+ gboolean _tmp61_ = FALSE;
g_return_if_fail (self != NULL);
_tmp0_ = self->test_map;
gee_map_set (_tmp0_, "one", "one");
@@ -339,38 +346,49 @@ void read_only_map_tests_test_immutable_iterator (ReadOnlyMapTests* self) {
_tmp35_ = iterator;
_tmp36_ = gee_iterator_next (_tmp35_);
_vala_assert (!_tmp36_, "! iterator.next ()");
- _tmp37_ = iterator;
- _tmp38_ = gee_iterator_first (_tmp37_);
- _vala_assert (_tmp38_, "iterator.first ()");
- _tmp39_ = iterator;
- _tmp40_ = gee_iterator_get (_tmp39_);
- _tmp41_ = (gchar*) _tmp40_;
- _vala_assert (g_strcmp0 (_tmp41_, "one") == 0, "iterator.get () == \"one\"");
- _g_free0 (_tmp41_);
- _tmp42_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp42_) {
- GeeIterator* _tmp43_;
- _tmp43_ = iterator;
- gee_iterator_remove (_tmp43_);
+ _tmp37_ = self->ro_map;
+ _tmp38_ = gee_map_get_keys (_tmp37_);
+ _tmp39_ = _tmp38_;
+ _tmp40_ = _tmp39_;
+ _tmp41_ = gee_iterable_iterator ((GeeIterable*) _tmp40_);
+ _g_object_unref0 (iterator);
+ iterator = _tmp41_;
+ _g_object_unref0 (_tmp40_);
+ _tmp42_ = iterator;
+ _tmp43_ = gee_iterator_has_next (_tmp42_);
+ _vala_assert (_tmp43_, "iterator.has_next ()");
+ _tmp44_ = iterator;
+ _tmp45_ = gee_iterator_next (_tmp44_);
+ _vala_assert (_tmp45_, "iterator.next ()");
+ _tmp46_ = iterator;
+ _tmp47_ = gee_iterator_get (_tmp46_);
+ _tmp48_ = (gchar*) _tmp47_;
+ _vala_assert (g_strcmp0 (_tmp48_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp48_);
+ _tmp49_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp49_) {
+ GeeIterator* _tmp50_;
+ _tmp50_ = iterator;
+ gee_iterator_remove (_tmp50_);
exit (0);
}
g_test_trap_assert_failed ();
- _tmp44_ = self->ro_map;
- _tmp45_ = gee_map_get_size (_tmp44_);
- _tmp46_ = _tmp45_;
- _vala_assert (_tmp46_ == 2, "ro_map.size == 2");
- _tmp47_ = self->ro_map;
- _tmp48_ = gee_map_has_key (_tmp47_, "one");
- _vala_assert (_tmp48_, "ro_map.has_key (\"one\")");
- _tmp49_ = self->ro_map;
- _tmp50_ = gee_map_has (_tmp49_, "one", "one");
- _vala_assert (_tmp50_, "ro_map.has (\"one\", \"one\")");
_tmp51_ = self->ro_map;
- _tmp52_ = gee_map_has_key (_tmp51_, "two");
- _vala_assert (_tmp52_, "ro_map.has_key (\"two\")");
- _tmp53_ = self->ro_map;
- _tmp54_ = gee_map_has (_tmp53_, "two", "two");
- _vala_assert (_tmp54_, "ro_map.has (\"two\", \"two\")");
+ _tmp52_ = gee_map_get_size (_tmp51_);
+ _tmp53_ = _tmp52_;
+ _vala_assert (_tmp53_ == 2, "ro_map.size == 2");
+ _tmp54_ = self->ro_map;
+ _tmp55_ = gee_map_has_key (_tmp54_, "one");
+ _vala_assert (_tmp55_, "ro_map.has_key (\"one\")");
+ _tmp56_ = self->ro_map;
+ _tmp57_ = gee_map_has (_tmp56_, "one", "one");
+ _vala_assert (_tmp57_, "ro_map.has (\"one\", \"one\")");
+ _tmp58_ = self->ro_map;
+ _tmp59_ = gee_map_has_key (_tmp58_, "two");
+ _vala_assert (_tmp59_, "ro_map.has_key (\"two\")");
+ _tmp60_ = self->ro_map;
+ _tmp61_ = gee_map_has (_tmp60_, "two", "two");
+ _vala_assert (_tmp61_, "ro_map.has (\"two\", \"two\")");
_g_object_unref0 (iterator);
}
@@ -441,7 +459,7 @@ void read_only_map_tests_test_immutable (ReadOnlyMapTests* self) {
_tmp6_ = self->ro_map;
_tmp7_ = gee_map_has (_tmp6_, "one", "one");
_vala_assert (_tmp7_, "ro_map.has (\"one\", \"one\")");
- _tmp8_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+ _tmp8_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
dummy = (GeeMap*) _tmp8_;
_tmp9_ = dummy;
gee_map_set (_tmp9_, "one", "one");
@@ -644,7 +662,7 @@ void read_only_map_tests_test_accurate_view (ReadOnlyMapTests* self) {
gpointer _tmp90_ = NULL;
gchar* _tmp91_;
g_return_if_fail (self != NULL);
- _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
+ _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
dummy = (GeeMap*) _tmp0_;
gee_map_set (dummy, "one", "one");
gee_map_set (dummy, "two", "two");
diff --git a/tests/testreadonlymap.vala b/tests/testreadonlymap.vala
index c32f763..0cb6d2e 100644
--- a/tests/testreadonlymap.vala
+++ b/tests/testreadonlymap.vala
@@ -87,7 +87,9 @@ public class ReadOnlyMapTests : Gee.TestCase {
assert (! iterator.has_next ());
assert (! iterator.next ());
- assert (iterator.first ());
+ iterator = ro_map.keys.iterator ();
+ assert (iterator.has_next ());
+ assert (iterator.next ());
assert (iterator.get () == "one");
if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
diff --git a/tests/testreadonlyset.c b/tests/testreadonlyset.c
index fe8d420..8a22e30 100644
--- a/tests/testreadonlyset.c
+++ b/tests/testreadonlyset.c
@@ -135,7 +135,7 @@ static void read_only_set_tests_real_set_up (GeeTestCase* base) {
GeeCollection* _tmp1_;
GeeCollection* _tmp2_ = NULL;
self = (ReadOnlySetTests*) base;
- _tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ _tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
_g_object_unref0 (((ReadOnlyCollectionTests*) self)->test_collection);
((ReadOnlyCollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
_tmp1_ = ((ReadOnlyCollectionTests*) self)->test_collection;
diff --git a/tests/tests.vala.stamp b/tests/tests.vala.stamp
deleted file mode 100644
index e69de29..0000000
--- a/tests/tests.vala.stamp
+++ /dev/null
diff --git a/tests/tests_vala.stamp b/tests/tests_vala.stamp
new file mode 100644
index 0000000..859afb1
--- /dev/null
+++ b/tests/tests_vala.stamp
@@ -0,0 +1 @@
+stamp
diff --git a/tests/testset.c b/tests/testset.c
index 2b29b70..9fb1d26 100644
--- a/tests/testset.c
+++ b/tests/testset.c
@@ -111,7 +111,7 @@ enum {
};
SetTests* set_tests_construct (GType object_type, const gchar* name);
CollectionTests* collection_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void set_tests_test_duplicates_are_ignored (SetTests* self);
static void _set_tests_test_duplicates_are_ignored_gee_test_case_test_method (gpointer self);
static void set_tests_real_test_duplicates_are_ignored (SetTests* self);
@@ -128,7 +128,7 @@ SetTests* set_tests_construct (GType object_type, const gchar* name) {
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (SetTests*) collection_tests_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[Set] duplicates are ignored", _set_tests_test_duplicates_are_ignored_gee_test_case_test_method, self);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Set] duplicates are ignored", _set_tests_test_duplicates_are_ignored_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
diff --git a/tests/testsortedmap.c b/tests/testsortedmap.c
new file mode 100644
index 0000000..c61227e
--- /dev/null
+++ b/tests/testsortedmap.c
@@ -0,0 +1,6438 @@
+/* testsortedmap.c generated by valac 0.18.0, the Vala compiler
+ * generated from testsortedmap.vala, do not modify */
+
+/* sortedset.vala
+ *
+ * Copyright (C) 2009-2011 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gee.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define GEE_TYPE_TEST_CASE (gee_test_case_get_type ())
+#define GEE_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TEST_CASE, GeeTestCase))
+#define GEE_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+#define GEE_IS_TEST_CASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TEST_CASE))
+#define GEE_IS_TEST_CASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TEST_CASE))
+#define GEE_TEST_CASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TEST_CASE, GeeTestCaseClass))
+
+typedef struct _GeeTestCase GeeTestCase;
+typedef struct _GeeTestCaseClass GeeTestCaseClass;
+typedef struct _GeeTestCasePrivate GeeTestCasePrivate;
+
+#define TYPE_MAP_TESTS (map_tests_get_type ())
+#define MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAP_TESTS, MapTests))
+#define MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAP_TESTS, MapTestsClass))
+#define IS_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAP_TESTS))
+#define IS_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAP_TESTS))
+#define MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAP_TESTS, MapTestsClass))
+
+typedef struct _MapTests MapTests;
+typedef struct _MapTestsClass MapTestsClass;
+typedef struct _MapTestsPrivate MapTestsPrivate;
+
+#define GEE_TYPE_SORTED_MAP_TESTS (gee_sorted_map_tests_get_type ())
+#define GEE_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTests))
+#define GEE_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTestsClass))
+#define GEE_IS_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SORTED_MAP_TESTS))
+#define GEE_IS_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_SORTED_MAP_TESTS))
+#define GEE_SORTED_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTestsClass))
+
+typedef struct _GeeSortedMapTests GeeSortedMapTests;
+typedef struct _GeeSortedMapTestsClass GeeSortedMapTestsClass;
+typedef struct _GeeSortedMapTestsPrivate GeeSortedMapTestsPrivate;
+
+#define GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TYPE (gee_sorted_map_tests_sub_map_tests_type_get_type ())
+
+#define GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS (gee_sorted_map_tests_sub_map_tests_get_type ())
+#define GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS, GeeSortedMapTestsSubMapTests))
+#define GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS, GeeSortedMapTestsSubMapTestsClass))
+#define GEE_SORTED_MAP_TESTS_IS_SUB_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS))
+#define GEE_SORTED_MAP_TESTS_IS_SUB_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS))
+#define GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS, GeeSortedMapTestsSubMapTestsClass))
+
+typedef struct _GeeSortedMapTestsSubMapTests GeeSortedMapTestsSubMapTests;
+typedef struct _GeeSortedMapTestsSubMapTestsClass GeeSortedMapTestsSubMapTestsClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _GeeSortedMapTestsSubMapTestsPrivate GeeSortedMapTestsSubMapTestsPrivate;
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+struct _GeeTestCase {
+ GObject parent_instance;
+ GeeTestCasePrivate * priv;
+};
+
+struct _GeeTestCaseClass {
+ GObjectClass parent_class;
+ void (*set_up) (GeeTestCase* self);
+ void (*tear_down) (GeeTestCase* self);
+};
+
+struct _MapTests {
+ GeeTestCase parent_instance;
+ MapTestsPrivate * priv;
+ GeeMap* test_map;
+};
+
+struct _MapTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _GeeSortedMapTests {
+ MapTests parent_instance;
+ GeeSortedMapTestsPrivate * priv;
+};
+
+struct _GeeSortedMapTestsClass {
+ MapTestsClass parent_class;
+};
+
+typedef void (*GeeTestCaseTestMethod) (void* user_data);
+typedef enum {
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD,
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL,
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB,
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY
+} GeeSortedMapTestsSubMapTestsType;
+
+struct _GeeSortedMapTestsSubMapTests {
+ GeeTestCase parent_instance;
+ GeeSortedMapTestsSubMapTestsPrivate * priv;
+};
+
+struct _GeeSortedMapTestsSubMapTestsClass {
+ GeeTestCaseClass parent_class;
+};
+
+struct _GeeSortedMapTestsSubMapTestsPrivate {
+ GeeSortedMap* master;
+ GeeSortedMap* submap;
+ GeeSortedMapTests* test;
+ GeeSortedMapTestsSubMapTestsType type;
+};
+
+
+static gpointer gee_sorted_map_tests_parent_class = NULL;
+static gpointer gee_sorted_map_tests_sub_map_tests_parent_class = NULL;
+
+GType gee_test_case_get_type (void) G_GNUC_CONST;
+GType map_tests_get_type (void) G_GNUC_CONST;
+GType gee_sorted_map_tests_get_type (void) G_GNUC_CONST;
+enum {
+ GEE_SORTED_MAP_TESTS_DUMMY_PROPERTY
+};
+GeeSortedMapTests* gee_sorted_map_tests_construct (GType object_type, const gchar* name);
+MapTests* map_tests_construct (GType object_type, const gchar* name);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
+void gee_sorted_map_tests_test_key_ordering (GeeSortedMapTests* self);
+static void _gee_sorted_map_tests_test_key_ordering_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_test_first (GeeSortedMapTests* self);
+static void _gee_sorted_map_tests_test_first_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_test_last (GeeSortedMapTests* self);
+static void _gee_sorted_map_tests_test_last_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_test_iterator_at (GeeSortedMapTests* self);
+static void _gee_sorted_map_tests_test_iterator_at_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_test_lower (GeeSortedMapTests* self);
+static void _gee_sorted_map_tests_test_lower_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_test_higher (GeeSortedMapTests* self);
+static void _gee_sorted_map_tests_test_higher_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_test_floor (GeeSortedMapTests* self);
+static void _gee_sorted_map_tests_test_floor_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_test_ceil (GeeSortedMapTests* self);
+static void _gee_sorted_map_tests_test_ceil_gee_test_case_test_method (gpointer self);
+GTestSuite* gee_test_case_get_suite (GeeTestCase* self);
+GType gee_sorted_map_tests_sub_map_tests_type_get_type (void) G_GNUC_CONST;
+GeeSortedMapTestsSubMapTests* gee_sorted_map_tests_sub_map_tests_new (GeeSortedMapTests* test, GeeSortedMapTestsSubMapTestsType type);
+GeeSortedMapTestsSubMapTests* gee_sorted_map_tests_sub_map_tests_construct (GType object_type, GeeSortedMapTests* test, GeeSortedMapTestsSubMapTestsType type);
+GType gee_sorted_map_tests_sub_map_tests_get_type (void) G_GNUC_CONST;
+void map_tests_assert_entry (GeeMapEntry* e, const gchar* key, const gchar* value);
+GeeMapEntry* map_tests_entry_for (const gchar* key, const gchar* value);
+#define GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS, GeeSortedMapTestsSubMapTestsPrivate))
+enum {
+ GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_DUMMY_PROPERTY
+};
+const gchar* gee_sorted_map_tests_sub_map_tests_type_to_string (GeeSortedMapTestsSubMapTestsType self);
+GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
+void gee_sorted_map_tests_sub_map_tests_test_has_key_size_is_empty (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_has_key_size_is_empty_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_keys (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_keys_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_values (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_values_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_entries (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_entries_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_get (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_get_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_set (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_set_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_unset (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_unset_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_clear (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_clear_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_iterators (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_iterators_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_boundaries (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_boundaries_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_lower (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_lower_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_higher (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_higher_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_floor (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_floor_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_ceil (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_ceil_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_iterator_at (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_iterator_at_gee_test_case_test_method (gpointer self);
+void gee_sorted_map_tests_sub_map_tests_test_submap_and_subsets (GeeSortedMapTestsSubMapTests* self);
+static void _gee_sorted_map_tests_sub_map_tests_test_submap_and_subsets_gee_test_case_test_method (gpointer self);
+static void gee_sorted_map_tests_sub_map_tests_real_set_up (GeeTestCase* base);
+void gee_test_case_set_up (GeeTestCase* self);
+static void gee_sorted_map_tests_sub_map_tests_real_tear_down (GeeTestCase* base);
+void gee_test_case_tear_down (GeeTestCase* self);
+void gee_sorted_map_tests_sub_map_tests_set_default_values (GeeSortedMapTestsSubMapTests* self, gchar*** contains, int* contains_length1, gchar*** not_contains, int* not_contains_length1);
+static void gee_sorted_map_tests_sub_map_tests_finalize (GObject* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+
+static void _gee_sorted_map_tests_test_key_ordering_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_test_key_ordering (self);
+}
+
+
+static void _gee_sorted_map_tests_test_first_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_test_first (self);
+}
+
+
+static void _gee_sorted_map_tests_test_last_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_test_last (self);
+}
+
+
+static void _gee_sorted_map_tests_test_iterator_at_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_test_iterator_at (self);
+}
+
+
+static void _gee_sorted_map_tests_test_lower_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_test_lower (self);
+}
+
+
+static void _gee_sorted_map_tests_test_higher_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_test_higher (self);
+}
+
+
+static void _gee_sorted_map_tests_test_floor_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_test_floor (self);
+}
+
+
+static void _gee_sorted_map_tests_test_ceil_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_test_ceil (self);
+}
+
+
+GeeSortedMapTests* gee_sorted_map_tests_construct (GType object_type, const gchar* name) {
+ GeeSortedMapTests * self = NULL;
+ const gchar* _tmp0_;
+ GTestSuite* _tmp1_ = NULL;
+ GeeSortedMapTestsSubMapTests* _tmp2_;
+ GeeSortedMapTestsSubMapTests* _tmp3_;
+ GTestSuite* _tmp4_ = NULL;
+ GTestSuite* _tmp5_ = NULL;
+ GeeSortedMapTestsSubMapTests* _tmp6_;
+ GeeSortedMapTestsSubMapTests* _tmp7_;
+ GTestSuite* _tmp8_ = NULL;
+ GTestSuite* _tmp9_ = NULL;
+ GeeSortedMapTestsSubMapTests* _tmp10_;
+ GeeSortedMapTestsSubMapTests* _tmp11_;
+ GTestSuite* _tmp12_ = NULL;
+ GTestSuite* _tmp13_ = NULL;
+ GeeSortedMapTestsSubMapTests* _tmp14_;
+ GeeSortedMapTestsSubMapTests* _tmp15_;
+ GTestSuite* _tmp16_ = NULL;
+ g_return_val_if_fail (name != NULL, NULL);
+ _tmp0_ = name;
+ self = (GeeSortedMapTests*) map_tests_construct (object_type, _tmp0_);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] key ordering", _gee_sorted_map_tests_test_key_ordering_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] first", _gee_sorted_map_tests_test_first_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] last", _gee_sorted_map_tests_test_last_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] iterator_at", _gee_sorted_map_tests_test_iterator_at_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] lower", _gee_sorted_map_tests_test_lower_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] higher", _gee_sorted_map_tests_test_higher_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] floor", _gee_sorted_map_tests_test_floor_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] ceil", _gee_sorted_map_tests_test_ceil_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ _tmp1_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp2_ = gee_sorted_map_tests_sub_map_tests_new (self, GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD);
+ _tmp3_ = _tmp2_;
+ _tmp4_ = gee_test_case_get_suite ((GeeTestCase*) _tmp3_);
+ g_test_suite_add_suite (_tmp1_, _tmp4_);
+ _g_object_unref0 (_tmp3_);
+ _tmp5_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp6_ = gee_sorted_map_tests_sub_map_tests_new (self, GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL);
+ _tmp7_ = _tmp6_;
+ _tmp8_ = gee_test_case_get_suite ((GeeTestCase*) _tmp7_);
+ g_test_suite_add_suite (_tmp5_, _tmp8_);
+ _g_object_unref0 (_tmp7_);
+ _tmp9_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp10_ = gee_sorted_map_tests_sub_map_tests_new (self, GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB);
+ _tmp11_ = _tmp10_;
+ _tmp12_ = gee_test_case_get_suite ((GeeTestCase*) _tmp11_);
+ g_test_suite_add_suite (_tmp9_, _tmp12_);
+ _g_object_unref0 (_tmp11_);
+ _tmp13_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp14_ = gee_sorted_map_tests_sub_map_tests_new (self, GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY);
+ _tmp15_ = _tmp14_;
+ _tmp16_ = gee_test_case_get_suite ((GeeTestCase*) _tmp15_);
+ g_test_suite_add_suite (_tmp13_, _tmp16_);
+ _g_object_unref0 (_tmp15_);
+ return self;
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+ return self ? g_object_ref (self) : NULL;
+}
+
+
+void gee_sorted_map_tests_test_key_ordering (GeeSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* test_sorted_map;
+ GeeSet* _tmp2_;
+ GeeSet* _tmp3_;
+ GeeSet* _tmp4_;
+ GeeIterator* _tmp5_ = NULL;
+ GeeIterator* _tmp6_;
+ GeeIterator* iterator;
+ gboolean _tmp7_ = FALSE;
+ gpointer _tmp8_ = NULL;
+ gchar* _tmp9_;
+ gboolean _tmp10_ = FALSE;
+ gpointer _tmp11_ = NULL;
+ gchar* _tmp12_;
+ gboolean _tmp13_ = FALSE;
+ gpointer _tmp14_ = NULL;
+ gchar* _tmp15_;
+ gboolean _tmp16_ = FALSE;
+ gpointer _tmp17_ = NULL;
+ gchar* _tmp18_;
+ gboolean _tmp19_ = FALSE;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ gboolean _tmp22_ = FALSE;
+ gpointer _tmp23_ = NULL;
+ gchar* _tmp24_;
+ gboolean _tmp25_ = FALSE;
+ gpointer _tmp26_ = NULL;
+ gchar* _tmp27_;
+ gboolean _tmp28_ = FALSE;
+ gpointer _tmp29_ = NULL;
+ gchar* _tmp30_;
+ gboolean _tmp31_ = FALSE;
+ gpointer _tmp32_ = NULL;
+ gchar* _tmp33_;
+ gboolean _tmp34_ = FALSE;
+ gpointer _tmp35_ = NULL;
+ gchar* _tmp36_;
+ gboolean _tmp37_ = FALSE;
+ gpointer _tmp38_ = NULL;
+ gchar* _tmp39_;
+ gboolean _tmp40_ = FALSE;
+ gpointer _tmp41_ = NULL;
+ gchar* _tmp42_;
+ gboolean _tmp43_ = FALSE;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _vala_assert (test_sorted_map != NULL, "test_sorted_map != null");
+ gee_map_set ((GeeMap*) test_sorted_map, "one", "one");
+ gee_map_set ((GeeMap*) test_sorted_map, "two", "two");
+ gee_map_set ((GeeMap*) test_sorted_map, "three", "three");
+ gee_map_set ((GeeMap*) test_sorted_map, "four", "four");
+ gee_map_set ((GeeMap*) test_sorted_map, "five", "five");
+ gee_map_set ((GeeMap*) test_sorted_map, "six", "six");
+ gee_map_set ((GeeMap*) test_sorted_map, "seven", "seven");
+ gee_map_set ((GeeMap*) test_sorted_map, "eight", "eight");
+ gee_map_set ((GeeMap*) test_sorted_map, "nine", "nine");
+ gee_map_set ((GeeMap*) test_sorted_map, "ten", "ten");
+ gee_map_set ((GeeMap*) test_sorted_map, "eleven", "eleven");
+ gee_map_set ((GeeMap*) test_sorted_map, "twelve", "twelve");
+ _tmp2_ = gee_map_get_keys ((GeeMap*) test_sorted_map);
+ _tmp3_ = _tmp2_;
+ _tmp4_ = _tmp3_;
+ _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
+ _tmp6_ = _tmp5_;
+ _g_object_unref0 (_tmp4_);
+ iterator = _tmp6_;
+ _tmp7_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp7_, "iterator.next ()");
+ _tmp8_ = gee_iterator_get (iterator);
+ _tmp9_ = (gchar*) _tmp8_;
+ _vala_assert (g_strcmp0 (_tmp9_, "eight") == 0, "iterator.get () == \"eight\"");
+ _g_free0 (_tmp9_);
+ _tmp10_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp10_, "iterator.next ()");
+ _tmp11_ = gee_iterator_get (iterator);
+ _tmp12_ = (gchar*) _tmp11_;
+ _vala_assert (g_strcmp0 (_tmp12_, "eleven") == 0, "iterator.get () == \"eleven\"");
+ _g_free0 (_tmp12_);
+ _tmp13_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp13_, "iterator.next ()");
+ _tmp14_ = gee_iterator_get (iterator);
+ _tmp15_ = (gchar*) _tmp14_;
+ _vala_assert (g_strcmp0 (_tmp15_, "five") == 0, "iterator.get () == \"five\"");
+ _g_free0 (_tmp15_);
+ _tmp16_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp16_, "iterator.next ()");
+ _tmp17_ = gee_iterator_get (iterator);
+ _tmp18_ = (gchar*) _tmp17_;
+ _vala_assert (g_strcmp0 (_tmp18_, "four") == 0, "iterator.get () == \"four\"");
+ _g_free0 (_tmp18_);
+ _tmp19_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp19_, "iterator.next ()");
+ _tmp20_ = gee_iterator_get (iterator);
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "nine") == 0, "iterator.get () == \"nine\"");
+ _g_free0 (_tmp21_);
+ _tmp22_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp22_, "iterator.next ()");
+ _tmp23_ = gee_iterator_get (iterator);
+ _tmp24_ = (gchar*) _tmp23_;
+ _vala_assert (g_strcmp0 (_tmp24_, "one") == 0, "iterator.get () == \"one\"");
+ _g_free0 (_tmp24_);
+ _tmp25_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp25_, "iterator.next ()");
+ _tmp26_ = gee_iterator_get (iterator);
+ _tmp27_ = (gchar*) _tmp26_;
+ _vala_assert (g_strcmp0 (_tmp27_, "seven") == 0, "iterator.get () == \"seven\"");
+ _g_free0 (_tmp27_);
+ _tmp28_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp28_, "iterator.next ()");
+ _tmp29_ = gee_iterator_get (iterator);
+ _tmp30_ = (gchar*) _tmp29_;
+ _vala_assert (g_strcmp0 (_tmp30_, "six") == 0, "iterator.get () == \"six\"");
+ _g_free0 (_tmp30_);
+ _tmp31_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp31_, "iterator.next ()");
+ _tmp32_ = gee_iterator_get (iterator);
+ _tmp33_ = (gchar*) _tmp32_;
+ _vala_assert (g_strcmp0 (_tmp33_, "ten") == 0, "iterator.get () == \"ten\"");
+ _g_free0 (_tmp33_);
+ _tmp34_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp34_, "iterator.next ()");
+ _tmp35_ = gee_iterator_get (iterator);
+ _tmp36_ = (gchar*) _tmp35_;
+ _vala_assert (g_strcmp0 (_tmp36_, "three") == 0, "iterator.get () == \"three\"");
+ _g_free0 (_tmp36_);
+ _tmp37_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp37_, "iterator.next ()");
+ _tmp38_ = gee_iterator_get (iterator);
+ _tmp39_ = (gchar*) _tmp38_;
+ _vala_assert (g_strcmp0 (_tmp39_, "twelve") == 0, "iterator.get () == \"twelve\"");
+ _g_free0 (_tmp39_);
+ _tmp40_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp40_, "iterator.next ()");
+ _tmp41_ = gee_iterator_get (iterator);
+ _tmp42_ = (gchar*) _tmp41_;
+ _vala_assert (g_strcmp0 (_tmp42_, "two") == 0, "iterator.get () == \"two\"");
+ _g_free0 (_tmp42_);
+ _tmp43_ = gee_iterator_next (iterator);
+ _vala_assert (_tmp43_ == FALSE, "iterator.next () == false");
+ _g_object_unref0 (iterator);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+void gee_sorted_map_tests_test_first (GeeSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* test_sorted_map;
+ GeeSortedMap* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp5_;
+ GeeSortedSet* _tmp6_;
+ GeeSortedSet* _tmp7_;
+ GeeSortedSet* entries;
+ GeeSortedMap* _tmp8_;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp13_ = FALSE;
+ GeeSortedMap* _tmp17_;
+ GeeSortedMap* _tmp18_;
+ GeeSortedMap* _tmp19_;
+ GeeSortedMap* _tmp20_;
+ GeeSortedMap* _tmp21_;
+ GeeSortedMap* _tmp22_;
+ GeeSortedMap* _tmp23_;
+ GeeSortedMap* _tmp24_;
+ GeeSortedMap* _tmp25_;
+ GeeSortedMap* _tmp26_;
+ GeeSortedMap* _tmp27_;
+ GeeSortedMap* _tmp28_;
+ GeeSortedSet* _tmp29_;
+ gpointer _tmp30_ = NULL;
+ gchar* _tmp31_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = test_sorted_map;
+ _tmp3_ = gee_sorted_map_get_ascending_keys (_tmp2_);
+ _tmp4_ = _tmp3_;
+ keys = _tmp4_;
+ _tmp5_ = test_sorted_map;
+ _tmp6_ = gee_sorted_map_get_ascending_entries (_tmp5_);
+ _tmp7_ = _tmp6_;
+ entries = _tmp7_;
+ _tmp8_ = test_sorted_map;
+ _vala_assert (_tmp8_ != NULL, "test_sorted_map != null");
+ _tmp9_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp9_) {
+ GeeSortedSet* _tmp10_;
+ gpointer _tmp11_ = NULL;
+ gchar* _tmp12_;
+ _tmp10_ = keys;
+ _tmp11_ = gee_sorted_set_first (_tmp10_);
+ _tmp12_ = (gchar*) _tmp11_;
+ _g_free0 (_tmp12_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp13_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp13_) {
+ GeeSortedSet* _tmp14_;
+ gpointer _tmp15_ = NULL;
+ GeeMapEntry* _tmp16_;
+ _tmp14_ = entries;
+ _tmp15_ = gee_sorted_set_first (_tmp14_);
+ _tmp16_ = (GeeMapEntry*) _tmp15_;
+ _g_object_unref0 (_tmp16_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp17_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp17_, "one", "one");
+ _tmp18_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp18_, "two", "two");
+ _tmp19_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp19_, "three", "three");
+ _tmp20_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp20_, "four", "four");
+ _tmp21_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp21_, "five", "five");
+ _tmp22_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp22_, "six", "six");
+ _tmp23_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp23_, "seven", "seven");
+ _tmp24_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp24_, "eight", "eight");
+ _tmp25_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp25_, "nine", "nine");
+ _tmp26_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp26_, "ten", "ten");
+ _tmp27_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp27_, "eleven", "eleven");
+ _tmp28_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp28_, "twelve", "twelve");
+ _tmp29_ = keys;
+ _tmp30_ = gee_sorted_set_first (_tmp29_);
+ _tmp31_ = (gchar*) _tmp30_;
+ _vala_assert (g_strcmp0 (_tmp31_, "eight") == 0, "keys.first () == \"eight\"");
+ _g_free0 (_tmp31_);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+void gee_sorted_map_tests_test_last (GeeSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* test_sorted_map;
+ GeeSortedMap* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp5_;
+ GeeSortedSet* _tmp6_;
+ GeeSortedSet* _tmp7_;
+ GeeSortedSet* entries;
+ GeeSortedMap* _tmp8_;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp13_ = FALSE;
+ GeeSortedMap* _tmp17_;
+ GeeSortedMap* _tmp18_;
+ GeeSortedMap* _tmp19_;
+ GeeSortedMap* _tmp20_;
+ GeeSortedMap* _tmp21_;
+ GeeSortedMap* _tmp22_;
+ GeeSortedMap* _tmp23_;
+ GeeSortedMap* _tmp24_;
+ GeeSortedMap* _tmp25_;
+ GeeSortedMap* _tmp26_;
+ GeeSortedMap* _tmp27_;
+ GeeSortedMap* _tmp28_;
+ GeeSortedSet* _tmp29_;
+ gpointer _tmp30_ = NULL;
+ gchar* _tmp31_;
+ GeeSortedSet* _tmp32_;
+ gpointer _tmp33_ = NULL;
+ GeeMapEntry* _tmp34_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = test_sorted_map;
+ _tmp3_ = gee_sorted_map_get_ascending_keys (_tmp2_);
+ _tmp4_ = _tmp3_;
+ keys = _tmp4_;
+ _tmp5_ = test_sorted_map;
+ _tmp6_ = gee_sorted_map_get_ascending_entries (_tmp5_);
+ _tmp7_ = _tmp6_;
+ entries = _tmp7_;
+ _tmp8_ = test_sorted_map;
+ _vala_assert (_tmp8_ != NULL, "test_sorted_map != null");
+ _tmp9_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp9_) {
+ GeeSortedSet* _tmp10_;
+ gpointer _tmp11_ = NULL;
+ gchar* _tmp12_;
+ _tmp10_ = keys;
+ _tmp11_ = gee_sorted_set_last (_tmp10_);
+ _tmp12_ = (gchar*) _tmp11_;
+ _g_free0 (_tmp12_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp13_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp13_) {
+ GeeSortedSet* _tmp14_;
+ gpointer _tmp15_ = NULL;
+ GeeMapEntry* _tmp16_;
+ _tmp14_ = entries;
+ _tmp15_ = gee_sorted_set_last (_tmp14_);
+ _tmp16_ = (GeeMapEntry*) _tmp15_;
+ _g_object_unref0 (_tmp16_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp17_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp17_, "one", "one");
+ _tmp18_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp18_, "two", "two");
+ _tmp19_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp19_, "three", "three");
+ _tmp20_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp20_, "four", "four");
+ _tmp21_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp21_, "five", "five");
+ _tmp22_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp22_, "six", "six");
+ _tmp23_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp23_, "seven", "seven");
+ _tmp24_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp24_, "eight", "eight");
+ _tmp25_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp25_, "nine", "nine");
+ _tmp26_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp26_, "ten", "ten");
+ _tmp27_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp27_, "eleven", "eleven");
+ _tmp28_ = test_sorted_map;
+ gee_map_set ((GeeMap*) _tmp28_, "twelve", "twelve");
+ _tmp29_ = keys;
+ _tmp30_ = gee_sorted_set_last (_tmp29_);
+ _tmp31_ = (gchar*) _tmp30_;
+ _vala_assert (g_strcmp0 (_tmp31_, "two") == 0, "keys.last () == \"two\"");
+ _g_free0 (_tmp31_);
+ _tmp32_ = entries;
+ _tmp33_ = gee_sorted_set_last (_tmp32_);
+ _tmp34_ = (GeeMapEntry*) _tmp33_;
+ map_tests_assert_entry (_tmp34_, "two", "two");
+ _g_object_unref0 (_tmp34_);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+void gee_sorted_map_tests_test_iterator_at (GeeSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* test_sorted_map;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeSortedSet* keys;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ GeeMap* _tmp6_;
+ GeeMap* _tmp7_;
+ GeeMap* _tmp8_;
+ GeeIterator* _tmp9_ = NULL;
+ GeeIterator* keys_iter;
+ GeeIterator* _tmp10_;
+ GeeIterator* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ gchar* _tmp13_;
+ GeeMapEntry* _tmp14_ = NULL;
+ GeeMapEntry* _tmp15_;
+ GeeIterator* _tmp16_ = NULL;
+ GeeIterator* _tmp17_;
+ GeeIterator* entries_iter;
+ GeeIterator* _tmp18_;
+ GeeIterator* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ GeeMapEntry* _tmp21_;
+ GeeIterator* _tmp22_ = NULL;
+ GeeIterator* _tmp23_;
+ GeeIterator* _tmp24_;
+ gpointer _tmp25_ = NULL;
+ gchar* _tmp26_;
+ GeeMapEntry* _tmp27_ = NULL;
+ GeeMapEntry* _tmp28_;
+ GeeIterator* _tmp29_ = NULL;
+ GeeIterator* _tmp30_;
+ GeeIterator* _tmp31_;
+ gpointer _tmp32_ = NULL;
+ GeeMapEntry* _tmp33_;
+ GeeIterator* _tmp34_ = NULL;
+ GeeIterator* _tmp35_;
+ GeeIterator* _tmp36_;
+ gpointer _tmp37_ = NULL;
+ gchar* _tmp38_;
+ GeeMapEntry* _tmp39_ = NULL;
+ GeeMapEntry* _tmp40_;
+ GeeIterator* _tmp41_ = NULL;
+ GeeIterator* _tmp42_;
+ GeeIterator* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ GeeMapEntry* _tmp45_;
+ GeeIterator* _tmp46_ = NULL;
+ GeeIterator* _tmp47_;
+ GeeMapEntry* _tmp48_ = NULL;
+ GeeMapEntry* _tmp49_;
+ GeeIterator* _tmp50_ = NULL;
+ GeeIterator* _tmp51_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = gee_sorted_map_get_ascending_keys (test_sorted_map);
+ _tmp3_ = _tmp2_;
+ keys = _tmp3_;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (test_sorted_map);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ _tmp6_ = ((MapTests*) self)->test_map;
+ gee_map_set (_tmp6_, "one", "one");
+ _tmp7_ = ((MapTests*) self)->test_map;
+ gee_map_set (_tmp7_, "two", "two");
+ _tmp8_ = ((MapTests*) self)->test_map;
+ gee_map_set (_tmp8_, "three", "three");
+ _tmp9_ = gee_sorted_set_iterator_at (keys, "one");
+ keys_iter = _tmp9_;
+ _tmp10_ = keys_iter;
+ _vala_assert (_tmp10_ != NULL, "keys_iter != null");
+ _tmp11_ = keys_iter;
+ _tmp12_ = gee_iterator_get (_tmp11_);
+ _tmp13_ = (gchar*) _tmp12_;
+ _vala_assert (g_strcmp0 (_tmp13_, "one") == 0, "keys_iter.get () == \"one\"");
+ _g_free0 (_tmp13_);
+ _tmp14_ = map_tests_entry_for ("one", "one");
+ _tmp15_ = _tmp14_;
+ _tmp16_ = gee_sorted_set_iterator_at (entries, _tmp15_);
+ _tmp17_ = _tmp16_;
+ _g_object_unref0 (_tmp15_);
+ entries_iter = _tmp17_;
+ _tmp18_ = entries_iter;
+ _vala_assert (_tmp18_ != NULL, "entries_iter != null");
+ _tmp19_ = entries_iter;
+ _tmp20_ = gee_iterator_get (_tmp19_);
+ _tmp21_ = (GeeMapEntry*) _tmp20_;
+ map_tests_assert_entry (_tmp21_, "one", "one");
+ _g_object_unref0 (_tmp21_);
+ _tmp22_ = gee_sorted_set_iterator_at (keys, "two");
+ _g_object_unref0 (keys_iter);
+ keys_iter = _tmp22_;
+ _tmp23_ = keys_iter;
+ _vala_assert (_tmp23_ != NULL, "keys_iter != null");
+ _tmp24_ = keys_iter;
+ _tmp25_ = gee_iterator_get (_tmp24_);
+ _tmp26_ = (gchar*) _tmp25_;
+ _vala_assert (g_strcmp0 (_tmp26_, "two") == 0, "keys_iter.get () == \"two\"");
+ _g_free0 (_tmp26_);
+ _tmp27_ = map_tests_entry_for ("two", "two");
+ _tmp28_ = _tmp27_;
+ _tmp29_ = gee_sorted_set_iterator_at (entries, _tmp28_);
+ _g_object_unref0 (entries_iter);
+ entries_iter = _tmp29_;
+ _g_object_unref0 (_tmp28_);
+ _tmp30_ = entries_iter;
+ _vala_assert (_tmp30_ != NULL, "entries_iter != null");
+ _tmp31_ = entries_iter;
+ _tmp32_ = gee_iterator_get (_tmp31_);
+ _tmp33_ = (GeeMapEntry*) _tmp32_;
+ map_tests_assert_entry (_tmp33_, "two", "two");
+ _g_object_unref0 (_tmp33_);
+ _tmp34_ = gee_sorted_set_iterator_at (keys, "three");
+ _g_object_unref0 (keys_iter);
+ keys_iter = _tmp34_;
+ _tmp35_ = keys_iter;
+ _vala_assert (_tmp35_ != NULL, "keys_iter != null");
+ _tmp36_ = keys_iter;
+ _tmp37_ = gee_iterator_get (_tmp36_);
+ _tmp38_ = (gchar*) _tmp37_;
+ _vala_assert (g_strcmp0 (_tmp38_, "three") == 0, "keys_iter.get () == \"three\"");
+ _g_free0 (_tmp38_);
+ _tmp39_ = map_tests_entry_for ("three", "three");
+ _tmp40_ = _tmp39_;
+ _tmp41_ = gee_sorted_set_iterator_at (entries, _tmp40_);
+ _g_object_unref0 (entries_iter);
+ entries_iter = _tmp41_;
+ _g_object_unref0 (_tmp40_);
+ _tmp42_ = entries_iter;
+ _vala_assert (_tmp42_ != NULL, "entries_iter != null");
+ _tmp43_ = entries_iter;
+ _tmp44_ = gee_iterator_get (_tmp43_);
+ _tmp45_ = (GeeMapEntry*) _tmp44_;
+ map_tests_assert_entry (_tmp45_, "three", "three");
+ _g_object_unref0 (_tmp45_);
+ _tmp46_ = gee_sorted_set_iterator_at (keys, "zero");
+ _g_object_unref0 (keys_iter);
+ keys_iter = _tmp46_;
+ _tmp47_ = keys_iter;
+ _vala_assert (_tmp47_ == NULL, "keys_iter == null");
+ _tmp48_ = map_tests_entry_for ("zero", "zero");
+ _tmp49_ = _tmp48_;
+ _tmp50_ = gee_sorted_set_iterator_at (entries, _tmp49_);
+ _g_object_unref0 (entries_iter);
+ entries_iter = _tmp50_;
+ _g_object_unref0 (_tmp49_);
+ _tmp51_ = entries_iter;
+ _vala_assert (_tmp51_ == NULL, "entries_iter == null");
+ _g_object_unref0 (entries_iter);
+ _g_object_unref0 (keys_iter);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+void gee_sorted_map_tests_test_lower (GeeSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* test_sorted_map;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeSortedSet* keys;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gpointer _tmp6_ = NULL;
+ gchar* _tmp7_;
+ gpointer _tmp8_ = NULL;
+ gchar* _tmp9_;
+ GeeMapEntry* _tmp10_ = NULL;
+ GeeMapEntry* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ GeeMapEntry* _tmp13_;
+ gpointer _tmp14_ = NULL;
+ gchar* _tmp15_;
+ GeeMapEntry* _tmp16_ = NULL;
+ GeeMapEntry* _tmp17_;
+ gpointer _tmp18_ = NULL;
+ GeeMapEntry* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ GeeMapEntry* _tmp22_ = NULL;
+ GeeMapEntry* _tmp23_;
+ gpointer _tmp24_ = NULL;
+ GeeMapEntry* _tmp25_;
+ gpointer _tmp26_ = NULL;
+ gchar* _tmp27_;
+ GeeMapEntry* _tmp28_ = NULL;
+ GeeMapEntry* _tmp29_;
+ gpointer _tmp30_ = NULL;
+ GeeMapEntry* _tmp31_;
+ gpointer _tmp32_ = NULL;
+ gchar* _tmp33_;
+ GeeMapEntry* _tmp34_ = NULL;
+ GeeMapEntry* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ GeeMapEntry* _tmp37_;
+ gpointer _tmp38_ = NULL;
+ gchar* _tmp39_;
+ GeeMapEntry* _tmp40_ = NULL;
+ GeeMapEntry* _tmp41_;
+ gpointer _tmp42_ = NULL;
+ GeeMapEntry* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gchar* _tmp45_;
+ GeeMapEntry* _tmp46_ = NULL;
+ GeeMapEntry* _tmp47_;
+ gpointer _tmp48_ = NULL;
+ GeeMapEntry* _tmp49_;
+ gpointer _tmp50_ = NULL;
+ gchar* _tmp51_;
+ GeeMapEntry* _tmp52_ = NULL;
+ GeeMapEntry* _tmp53_;
+ gpointer _tmp54_ = NULL;
+ GeeMapEntry* _tmp55_;
+ gpointer _tmp56_ = NULL;
+ gchar* _tmp57_;
+ GeeMapEntry* _tmp58_ = NULL;
+ GeeMapEntry* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ GeeMapEntry* _tmp61_;
+ gpointer _tmp62_ = NULL;
+ gchar* _tmp63_;
+ GeeMapEntry* _tmp64_ = NULL;
+ GeeMapEntry* _tmp65_;
+ gpointer _tmp66_ = NULL;
+ GeeMapEntry* _tmp67_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = gee_sorted_map_get_ascending_keys (test_sorted_map);
+ _tmp3_ = _tmp2_;
+ keys = _tmp3_;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (test_sorted_map);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ _tmp6_ = gee_sorted_set_lower (keys, "one");
+ _tmp7_ = (gchar*) _tmp6_;
+ _vala_assert (_tmp7_ == NULL, "keys.lower (\"one\") == null");
+ _g_free0 (_tmp7_);
+ gee_map_set ((GeeMap*) test_sorted_map, "one", "one");
+ gee_map_set ((GeeMap*) test_sorted_map, "two", "two");
+ gee_map_set ((GeeMap*) test_sorted_map, "three", "three");
+ gee_map_set ((GeeMap*) test_sorted_map, "four", "four");
+ gee_map_set ((GeeMap*) test_sorted_map, "five", "five");
+ gee_map_set ((GeeMap*) test_sorted_map, "six", "six");
+ _tmp8_ = gee_sorted_set_lower (keys, "one");
+ _tmp9_ = (gchar*) _tmp8_;
+ _vala_assert (g_strcmp0 (_tmp9_, "four") == 0, "keys.lower (\"one\") == \"four\"");
+ _g_free0 (_tmp9_);
+ _tmp10_ = map_tests_entry_for ("one", "one");
+ _tmp11_ = _tmp10_;
+ _tmp12_ = gee_sorted_set_lower (entries, _tmp11_);
+ _tmp13_ = (GeeMapEntry*) _tmp12_;
+ map_tests_assert_entry (_tmp13_, "four", "four");
+ _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp11_);
+ _tmp14_ = gee_sorted_set_lower (keys, "o");
+ _tmp15_ = (gchar*) _tmp14_;
+ _vala_assert (g_strcmp0 (_tmp15_, "four") == 0, "keys.lower (\"o\") == \"four\"");
+ _g_free0 (_tmp15_);
+ _tmp16_ = map_tests_entry_for ("o", "one");
+ _tmp17_ = _tmp16_;
+ _tmp18_ = gee_sorted_set_lower (entries, _tmp17_);
+ _tmp19_ = (GeeMapEntry*) _tmp18_;
+ map_tests_assert_entry (_tmp19_, "four", "four");
+ _g_object_unref0 (_tmp19_);
+ _g_object_unref0 (_tmp17_);
+ _tmp20_ = gee_sorted_set_lower (keys, "two");
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "three") == 0, "keys.lower (\"two\") == \"three\"");
+ _g_free0 (_tmp21_);
+ _tmp22_ = map_tests_entry_for ("two", "two");
+ _tmp23_ = _tmp22_;
+ _tmp24_ = gee_sorted_set_lower (entries, _tmp23_);
+ _tmp25_ = (GeeMapEntry*) _tmp24_;
+ map_tests_assert_entry (_tmp25_, "three", "three");
+ _g_object_unref0 (_tmp25_);
+ _g_object_unref0 (_tmp23_);
+ _tmp26_ = gee_sorted_set_lower (keys, "t");
+ _tmp27_ = (gchar*) _tmp26_;
+ _vala_assert (g_strcmp0 (_tmp27_, "six") == 0, "keys.lower (\"t\") == \"six\"");
+ _g_free0 (_tmp27_);
+ _tmp28_ = map_tests_entry_for ("t", "two");
+ _tmp29_ = _tmp28_;
+ _tmp30_ = gee_sorted_set_lower (entries, _tmp29_);
+ _tmp31_ = (GeeMapEntry*) _tmp30_;
+ map_tests_assert_entry (_tmp31_, "six", "six");
+ _g_object_unref0 (_tmp31_);
+ _g_object_unref0 (_tmp29_);
+ _tmp32_ = gee_sorted_set_lower (keys, "three");
+ _tmp33_ = (gchar*) _tmp32_;
+ _vala_assert (g_strcmp0 (_tmp33_, "six") == 0, "keys.lower (\"three\") == \"six\"");
+ _g_free0 (_tmp33_);
+ _tmp34_ = map_tests_entry_for ("three", "three");
+ _tmp35_ = _tmp34_;
+ _tmp36_ = gee_sorted_set_lower (entries, _tmp35_);
+ _tmp37_ = (GeeMapEntry*) _tmp36_;
+ map_tests_assert_entry (_tmp37_, "six", "six");
+ _g_object_unref0 (_tmp37_);
+ _g_object_unref0 (_tmp35_);
+ _tmp38_ = gee_sorted_set_lower (keys, "four");
+ _tmp39_ = (gchar*) _tmp38_;
+ _vala_assert (g_strcmp0 (_tmp39_, "five") == 0, "keys.lower (\"four\") == \"five\"");
+ _g_free0 (_tmp39_);
+ _tmp40_ = map_tests_entry_for ("four", "four");
+ _tmp41_ = _tmp40_;
+ _tmp42_ = gee_sorted_set_lower (entries, _tmp41_);
+ _tmp43_ = (GeeMapEntry*) _tmp42_;
+ map_tests_assert_entry (_tmp43_, "five", "five");
+ _g_object_unref0 (_tmp43_);
+ _g_object_unref0 (_tmp41_);
+ _tmp44_ = gee_sorted_set_lower (keys, "f");
+ _tmp45_ = (gchar*) _tmp44_;
+ _vala_assert (_tmp45_ == NULL, "keys.lower (\"f\") == null");
+ _g_free0 (_tmp45_);
+ _tmp46_ = map_tests_entry_for ("f", "four");
+ _tmp47_ = _tmp46_;
+ _tmp48_ = gee_sorted_set_lower (entries, _tmp47_);
+ _tmp49_ = (GeeMapEntry*) _tmp48_;
+ _vala_assert (_tmp49_ == NULL, "entries.lower (entry_for (\"f\", \"four\")) == null");
+ _g_object_unref0 (_tmp49_);
+ _g_object_unref0 (_tmp47_);
+ _tmp50_ = gee_sorted_set_lower (keys, "five");
+ _tmp51_ = (gchar*) _tmp50_;
+ _vala_assert (_tmp51_ == NULL, "keys.lower (\"five\") == null");
+ _g_free0 (_tmp51_);
+ _tmp52_ = map_tests_entry_for ("five", "five");
+ _tmp53_ = _tmp52_;
+ _tmp54_ = gee_sorted_set_lower (entries, _tmp53_);
+ _tmp55_ = (GeeMapEntry*) _tmp54_;
+ _vala_assert (_tmp55_ == NULL, "entries.lower (entry_for (\"five\", \"five\")) == null");
+ _g_object_unref0 (_tmp55_);
+ _g_object_unref0 (_tmp53_);
+ _tmp56_ = gee_sorted_set_lower (keys, "six");
+ _tmp57_ = (gchar*) _tmp56_;
+ _vala_assert (g_strcmp0 (_tmp57_, "one") == 0, "keys.lower (\"six\") == \"one\"");
+ _g_free0 (_tmp57_);
+ _tmp58_ = map_tests_entry_for ("six", "six");
+ _tmp59_ = _tmp58_;
+ _tmp60_ = gee_sorted_set_lower (entries, _tmp59_);
+ _tmp61_ = (GeeMapEntry*) _tmp60_;
+ map_tests_assert_entry (_tmp61_, "one", "one");
+ _g_object_unref0 (_tmp61_);
+ _g_object_unref0 (_tmp59_);
+ _tmp62_ = gee_sorted_set_lower (keys, "s");
+ _tmp63_ = (gchar*) _tmp62_;
+ _vala_assert (g_strcmp0 (_tmp63_, "one") == 0, "keys.lower (\"s\") == \"one\"");
+ _g_free0 (_tmp63_);
+ _tmp64_ = map_tests_entry_for ("s", "six");
+ _tmp65_ = _tmp64_;
+ _tmp66_ = gee_sorted_set_lower (entries, _tmp65_);
+ _tmp67_ = (GeeMapEntry*) _tmp66_;
+ map_tests_assert_entry (_tmp67_, "one", "one");
+ _g_object_unref0 (_tmp67_);
+ _g_object_unref0 (_tmp65_);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+void gee_sorted_map_tests_test_higher (GeeSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* test_sorted_map;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeSortedSet* keys;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gpointer _tmp6_ = NULL;
+ gchar* _tmp7_;
+ gpointer _tmp8_ = NULL;
+ gchar* _tmp9_;
+ GeeMapEntry* _tmp10_ = NULL;
+ GeeMapEntry* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ GeeMapEntry* _tmp13_;
+ gpointer _tmp14_ = NULL;
+ gchar* _tmp15_;
+ GeeMapEntry* _tmp16_ = NULL;
+ GeeMapEntry* _tmp17_;
+ gpointer _tmp18_ = NULL;
+ GeeMapEntry* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ GeeMapEntry* _tmp22_ = NULL;
+ GeeMapEntry* _tmp23_;
+ gpointer _tmp24_ = NULL;
+ GeeMapEntry* _tmp25_;
+ gpointer _tmp26_ = NULL;
+ gchar* _tmp27_;
+ GeeMapEntry* _tmp28_ = NULL;
+ GeeMapEntry* _tmp29_;
+ gpointer _tmp30_ = NULL;
+ GeeMapEntry* _tmp31_;
+ gpointer _tmp32_ = NULL;
+ gchar* _tmp33_;
+ GeeMapEntry* _tmp34_ = NULL;
+ GeeMapEntry* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ GeeMapEntry* _tmp37_;
+ gpointer _tmp38_ = NULL;
+ gchar* _tmp39_;
+ GeeMapEntry* _tmp40_ = NULL;
+ GeeMapEntry* _tmp41_;
+ gpointer _tmp42_ = NULL;
+ GeeMapEntry* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gchar* _tmp45_;
+ GeeMapEntry* _tmp46_ = NULL;
+ GeeMapEntry* _tmp47_;
+ gpointer _tmp48_ = NULL;
+ GeeMapEntry* _tmp49_;
+ gpointer _tmp50_ = NULL;
+ gchar* _tmp51_;
+ GeeMapEntry* _tmp52_ = NULL;
+ GeeMapEntry* _tmp53_;
+ gpointer _tmp54_ = NULL;
+ GeeMapEntry* _tmp55_;
+ gpointer _tmp56_ = NULL;
+ gchar* _tmp57_;
+ GeeMapEntry* _tmp58_ = NULL;
+ GeeMapEntry* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ GeeMapEntry* _tmp61_;
+ gpointer _tmp62_ = NULL;
+ gchar* _tmp63_;
+ GeeMapEntry* _tmp64_ = NULL;
+ GeeMapEntry* _tmp65_;
+ gpointer _tmp66_ = NULL;
+ GeeMapEntry* _tmp67_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = gee_sorted_map_get_ascending_keys (test_sorted_map);
+ _tmp3_ = _tmp2_;
+ keys = _tmp3_;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (test_sorted_map);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ _tmp6_ = gee_sorted_set_higher (keys, "one");
+ _tmp7_ = (gchar*) _tmp6_;
+ _vala_assert (_tmp7_ == NULL, "keys.higher (\"one\") == null");
+ _g_free0 (_tmp7_);
+ gee_map_set ((GeeMap*) test_sorted_map, "one", "one");
+ gee_map_set ((GeeMap*) test_sorted_map, "two", "two");
+ gee_map_set ((GeeMap*) test_sorted_map, "three", "three");
+ gee_map_set ((GeeMap*) test_sorted_map, "four", "four");
+ gee_map_set ((GeeMap*) test_sorted_map, "five", "five");
+ gee_map_set ((GeeMap*) test_sorted_map, "six", "six");
+ _tmp8_ = gee_sorted_set_higher (keys, "one");
+ _tmp9_ = (gchar*) _tmp8_;
+ _vala_assert (g_strcmp0 (_tmp9_, "six") == 0, "keys.higher (\"one\") == \"six\"");
+ _g_free0 (_tmp9_);
+ _tmp10_ = map_tests_entry_for ("one", "one");
+ _tmp11_ = _tmp10_;
+ _tmp12_ = gee_sorted_set_higher (entries, _tmp11_);
+ _tmp13_ = (GeeMapEntry*) _tmp12_;
+ map_tests_assert_entry (_tmp13_, "six", "six");
+ _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp11_);
+ _tmp14_ = gee_sorted_set_higher (keys, "o");
+ _tmp15_ = (gchar*) _tmp14_;
+ _vala_assert (g_strcmp0 (_tmp15_, "one") == 0, "keys.higher (\"o\") == \"one\"");
+ _g_free0 (_tmp15_);
+ _tmp16_ = map_tests_entry_for ("o", "one");
+ _tmp17_ = _tmp16_;
+ _tmp18_ = gee_sorted_set_higher (entries, _tmp17_);
+ _tmp19_ = (GeeMapEntry*) _tmp18_;
+ map_tests_assert_entry (_tmp19_, "one", "one");
+ _g_object_unref0 (_tmp19_);
+ _g_object_unref0 (_tmp17_);
+ _tmp20_ = gee_sorted_set_higher (keys, "two");
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (_tmp21_ == NULL, "keys.higher (\"two\") == null");
+ _g_free0 (_tmp21_);
+ _tmp22_ = map_tests_entry_for ("two", "two");
+ _tmp23_ = _tmp22_;
+ _tmp24_ = gee_sorted_set_higher (entries, _tmp23_);
+ _tmp25_ = (GeeMapEntry*) _tmp24_;
+ _vala_assert (_tmp25_ == NULL, "entries.higher (entry_for (\"two\", \"two\")) == null");
+ _g_object_unref0 (_tmp25_);
+ _g_object_unref0 (_tmp23_);
+ _tmp26_ = gee_sorted_set_higher (keys, "t");
+ _tmp27_ = (gchar*) _tmp26_;
+ _vala_assert (g_strcmp0 (_tmp27_, "three") == 0, "keys.higher (\"t\") == \"three\"");
+ _g_free0 (_tmp27_);
+ _tmp28_ = map_tests_entry_for ("t", "two");
+ _tmp29_ = _tmp28_;
+ _tmp30_ = gee_sorted_set_higher (entries, _tmp29_);
+ _tmp31_ = (GeeMapEntry*) _tmp30_;
+ map_tests_assert_entry (_tmp31_, "three", "three");
+ _g_object_unref0 (_tmp31_);
+ _g_object_unref0 (_tmp29_);
+ _tmp32_ = gee_sorted_set_higher (keys, "three");
+ _tmp33_ = (gchar*) _tmp32_;
+ _vala_assert (g_strcmp0 (_tmp33_, "two") == 0, "keys.higher (\"three\") == \"two\"");
+ _g_free0 (_tmp33_);
+ _tmp34_ = map_tests_entry_for ("three", "three");
+ _tmp35_ = _tmp34_;
+ _tmp36_ = gee_sorted_set_higher (entries, _tmp35_);
+ _tmp37_ = (GeeMapEntry*) _tmp36_;
+ map_tests_assert_entry (_tmp37_, "two", "two");
+ _g_object_unref0 (_tmp37_);
+ _g_object_unref0 (_tmp35_);
+ _tmp38_ = gee_sorted_set_higher (keys, "four");
+ _tmp39_ = (gchar*) _tmp38_;
+ _vala_assert (g_strcmp0 (_tmp39_, "one") == 0, "keys.higher (\"four\") == \"one\"");
+ _g_free0 (_tmp39_);
+ _tmp40_ = map_tests_entry_for ("four", "four");
+ _tmp41_ = _tmp40_;
+ _tmp42_ = gee_sorted_set_higher (entries, _tmp41_);
+ _tmp43_ = (GeeMapEntry*) _tmp42_;
+ map_tests_assert_entry (_tmp43_, "one", "one");
+ _g_object_unref0 (_tmp43_);
+ _g_object_unref0 (_tmp41_);
+ _tmp44_ = gee_sorted_set_higher (keys, "f");
+ _tmp45_ = (gchar*) _tmp44_;
+ _vala_assert (g_strcmp0 (_tmp45_, "five") == 0, "keys.higher (\"f\") == \"five\"");
+ _g_free0 (_tmp45_);
+ _tmp46_ = map_tests_entry_for ("f", "four");
+ _tmp47_ = _tmp46_;
+ _tmp48_ = gee_sorted_set_higher (entries, _tmp47_);
+ _tmp49_ = (GeeMapEntry*) _tmp48_;
+ map_tests_assert_entry (_tmp49_, "five", "five");
+ _g_object_unref0 (_tmp49_);
+ _g_object_unref0 (_tmp47_);
+ _tmp50_ = gee_sorted_set_higher (keys, "five");
+ _tmp51_ = (gchar*) _tmp50_;
+ _vala_assert (g_strcmp0 (_tmp51_, "four") == 0, "keys.higher (\"five\") == \"four\"");
+ _g_free0 (_tmp51_);
+ _tmp52_ = map_tests_entry_for ("five", "five");
+ _tmp53_ = _tmp52_;
+ _tmp54_ = gee_sorted_set_higher (entries, _tmp53_);
+ _tmp55_ = (GeeMapEntry*) _tmp54_;
+ map_tests_assert_entry (_tmp55_, "four", "four");
+ _g_object_unref0 (_tmp55_);
+ _g_object_unref0 (_tmp53_);
+ _tmp56_ = gee_sorted_set_higher (keys, "six");
+ _tmp57_ = (gchar*) _tmp56_;
+ _vala_assert (g_strcmp0 (_tmp57_, "three") == 0, "keys.higher (\"six\") == \"three\"");
+ _g_free0 (_tmp57_);
+ _tmp58_ = map_tests_entry_for ("six", "six");
+ _tmp59_ = _tmp58_;
+ _tmp60_ = gee_sorted_set_higher (entries, _tmp59_);
+ _tmp61_ = (GeeMapEntry*) _tmp60_;
+ map_tests_assert_entry (_tmp61_, "three", "three");
+ _g_object_unref0 (_tmp61_);
+ _g_object_unref0 (_tmp59_);
+ _tmp62_ = gee_sorted_set_higher (keys, "s");
+ _tmp63_ = (gchar*) _tmp62_;
+ _vala_assert (g_strcmp0 (_tmp63_, "six") == 0, "keys.higher (\"s\") == \"six\"");
+ _g_free0 (_tmp63_);
+ _tmp64_ = map_tests_entry_for ("s", "six");
+ _tmp65_ = _tmp64_;
+ _tmp66_ = gee_sorted_set_higher (entries, _tmp65_);
+ _tmp67_ = (GeeMapEntry*) _tmp66_;
+ map_tests_assert_entry (_tmp67_, "six", "six");
+ _g_object_unref0 (_tmp67_);
+ _g_object_unref0 (_tmp65_);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+void gee_sorted_map_tests_test_floor (GeeSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* test_sorted_map;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeSortedSet* keys;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gpointer _tmp6_ = NULL;
+ gchar* _tmp7_;
+ gpointer _tmp8_ = NULL;
+ gchar* _tmp9_;
+ GeeMapEntry* _tmp10_ = NULL;
+ GeeMapEntry* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ GeeMapEntry* _tmp13_;
+ gpointer _tmp14_ = NULL;
+ gchar* _tmp15_;
+ GeeMapEntry* _tmp16_ = NULL;
+ GeeMapEntry* _tmp17_;
+ gpointer _tmp18_ = NULL;
+ GeeMapEntry* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ GeeMapEntry* _tmp22_ = NULL;
+ GeeMapEntry* _tmp23_;
+ gpointer _tmp24_ = NULL;
+ GeeMapEntry* _tmp25_;
+ gpointer _tmp26_ = NULL;
+ gchar* _tmp27_;
+ GeeMapEntry* _tmp28_ = NULL;
+ GeeMapEntry* _tmp29_;
+ gpointer _tmp30_ = NULL;
+ GeeMapEntry* _tmp31_;
+ gpointer _tmp32_ = NULL;
+ gchar* _tmp33_;
+ GeeMapEntry* _tmp34_ = NULL;
+ GeeMapEntry* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ GeeMapEntry* _tmp37_;
+ gpointer _tmp38_ = NULL;
+ gchar* _tmp39_;
+ GeeMapEntry* _tmp40_ = NULL;
+ GeeMapEntry* _tmp41_;
+ gpointer _tmp42_ = NULL;
+ GeeMapEntry* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gchar* _tmp45_;
+ GeeMapEntry* _tmp46_ = NULL;
+ GeeMapEntry* _tmp47_;
+ gpointer _tmp48_ = NULL;
+ GeeMapEntry* _tmp49_;
+ gpointer _tmp50_ = NULL;
+ gchar* _tmp51_;
+ GeeMapEntry* _tmp52_ = NULL;
+ GeeMapEntry* _tmp53_;
+ gpointer _tmp54_ = NULL;
+ GeeMapEntry* _tmp55_;
+ gpointer _tmp56_ = NULL;
+ gchar* _tmp57_;
+ GeeMapEntry* _tmp58_ = NULL;
+ GeeMapEntry* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ GeeMapEntry* _tmp61_;
+ gpointer _tmp62_ = NULL;
+ gchar* _tmp63_;
+ GeeMapEntry* _tmp64_ = NULL;
+ GeeMapEntry* _tmp65_;
+ gpointer _tmp66_ = NULL;
+ GeeMapEntry* _tmp67_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = gee_sorted_map_get_ascending_keys (test_sorted_map);
+ _tmp3_ = _tmp2_;
+ keys = _tmp3_;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (test_sorted_map);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ _tmp6_ = gee_sorted_set_floor (keys, "one");
+ _tmp7_ = (gchar*) _tmp6_;
+ _vala_assert (_tmp7_ == NULL, "keys.floor (\"one\") == null");
+ _g_free0 (_tmp7_);
+ gee_map_set ((GeeMap*) test_sorted_map, "one", "one");
+ gee_map_set ((GeeMap*) test_sorted_map, "two", "two");
+ gee_map_set ((GeeMap*) test_sorted_map, "three", "three");
+ gee_map_set ((GeeMap*) test_sorted_map, "four", "four");
+ gee_map_set ((GeeMap*) test_sorted_map, "five", "five");
+ gee_map_set ((GeeMap*) test_sorted_map, "six", "six");
+ _tmp8_ = gee_sorted_set_floor (keys, "one");
+ _tmp9_ = (gchar*) _tmp8_;
+ _vala_assert (g_strcmp0 (_tmp9_, "one") == 0, "keys.floor (\"one\") == \"one\"");
+ _g_free0 (_tmp9_);
+ _tmp10_ = map_tests_entry_for ("one", "one");
+ _tmp11_ = _tmp10_;
+ _tmp12_ = gee_sorted_set_floor (entries, _tmp11_);
+ _tmp13_ = (GeeMapEntry*) _tmp12_;
+ map_tests_assert_entry (_tmp13_, "one", "one");
+ _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp11_);
+ _tmp14_ = gee_sorted_set_floor (keys, "o");
+ _tmp15_ = (gchar*) _tmp14_;
+ _vala_assert (g_strcmp0 (_tmp15_, "four") == 0, "keys.floor (\"o\") == \"four\"");
+ _g_free0 (_tmp15_);
+ _tmp16_ = map_tests_entry_for ("o", "one");
+ _tmp17_ = _tmp16_;
+ _tmp18_ = gee_sorted_set_floor (entries, _tmp17_);
+ _tmp19_ = (GeeMapEntry*) _tmp18_;
+ map_tests_assert_entry (_tmp19_, "four", "four");
+ _g_object_unref0 (_tmp19_);
+ _g_object_unref0 (_tmp17_);
+ _tmp20_ = gee_sorted_set_floor (keys, "two");
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "two") == 0, "keys.floor (\"two\") == \"two\"");
+ _g_free0 (_tmp21_);
+ _tmp22_ = map_tests_entry_for ("two", "two");
+ _tmp23_ = _tmp22_;
+ _tmp24_ = gee_sorted_set_floor (entries, _tmp23_);
+ _tmp25_ = (GeeMapEntry*) _tmp24_;
+ map_tests_assert_entry (_tmp25_, "two", "two");
+ _g_object_unref0 (_tmp25_);
+ _g_object_unref0 (_tmp23_);
+ _tmp26_ = gee_sorted_set_floor (keys, "t");
+ _tmp27_ = (gchar*) _tmp26_;
+ _vala_assert (g_strcmp0 (_tmp27_, "six") == 0, "keys.floor (\"t\") == \"six\"");
+ _g_free0 (_tmp27_);
+ _tmp28_ = map_tests_entry_for ("t", "two");
+ _tmp29_ = _tmp28_;
+ _tmp30_ = gee_sorted_set_floor (entries, _tmp29_);
+ _tmp31_ = (GeeMapEntry*) _tmp30_;
+ map_tests_assert_entry (_tmp31_, "six", "six");
+ _g_object_unref0 (_tmp31_);
+ _g_object_unref0 (_tmp29_);
+ _tmp32_ = gee_sorted_set_floor (keys, "three");
+ _tmp33_ = (gchar*) _tmp32_;
+ _vala_assert (g_strcmp0 (_tmp33_, "three") == 0, "keys.floor (\"three\") == \"three\"");
+ _g_free0 (_tmp33_);
+ _tmp34_ = map_tests_entry_for ("three", "three");
+ _tmp35_ = _tmp34_;
+ _tmp36_ = gee_sorted_set_floor (entries, _tmp35_);
+ _tmp37_ = (GeeMapEntry*) _tmp36_;
+ map_tests_assert_entry (_tmp37_, "three", "three");
+ _g_object_unref0 (_tmp37_);
+ _g_object_unref0 (_tmp35_);
+ _tmp38_ = gee_sorted_set_floor (keys, "four");
+ _tmp39_ = (gchar*) _tmp38_;
+ _vala_assert (g_strcmp0 (_tmp39_, "four") == 0, "keys.floor (\"four\") == \"four\"");
+ _g_free0 (_tmp39_);
+ _tmp40_ = map_tests_entry_for ("four", "four");
+ _tmp41_ = _tmp40_;
+ _tmp42_ = gee_sorted_set_floor (entries, _tmp41_);
+ _tmp43_ = (GeeMapEntry*) _tmp42_;
+ map_tests_assert_entry (_tmp43_, "four", "four");
+ _g_object_unref0 (_tmp43_);
+ _g_object_unref0 (_tmp41_);
+ _tmp44_ = gee_sorted_set_floor (keys, "f");
+ _tmp45_ = (gchar*) _tmp44_;
+ _vala_assert (_tmp45_ == NULL, "keys.floor (\"f\") == null");
+ _g_free0 (_tmp45_);
+ _tmp46_ = map_tests_entry_for ("f", "four");
+ _tmp47_ = _tmp46_;
+ _tmp48_ = gee_sorted_set_floor (entries, _tmp47_);
+ _tmp49_ = (GeeMapEntry*) _tmp48_;
+ _vala_assert (_tmp49_ == NULL, "entries.floor (entry_for (\"f\", \"four\")) == null");
+ _g_object_unref0 (_tmp49_);
+ _g_object_unref0 (_tmp47_);
+ _tmp50_ = gee_sorted_set_floor (keys, "five");
+ _tmp51_ = (gchar*) _tmp50_;
+ _vala_assert (g_strcmp0 (_tmp51_, "five") == 0, "keys.floor (\"five\") == \"five\"");
+ _g_free0 (_tmp51_);
+ _tmp52_ = map_tests_entry_for ("five", "five");
+ _tmp53_ = _tmp52_;
+ _tmp54_ = gee_sorted_set_floor (entries, _tmp53_);
+ _tmp55_ = (GeeMapEntry*) _tmp54_;
+ map_tests_assert_entry (_tmp55_, "five", "five");
+ _g_object_unref0 (_tmp55_);
+ _g_object_unref0 (_tmp53_);
+ _tmp56_ = gee_sorted_set_floor (keys, "six");
+ _tmp57_ = (gchar*) _tmp56_;
+ _vala_assert (g_strcmp0 (_tmp57_, "six") == 0, "keys.floor (\"six\") == \"six\"");
+ _g_free0 (_tmp57_);
+ _tmp58_ = map_tests_entry_for ("six", "six");
+ _tmp59_ = _tmp58_;
+ _tmp60_ = gee_sorted_set_floor (entries, _tmp59_);
+ _tmp61_ = (GeeMapEntry*) _tmp60_;
+ map_tests_assert_entry (_tmp61_, "six", "six");
+ _g_object_unref0 (_tmp61_);
+ _g_object_unref0 (_tmp59_);
+ _tmp62_ = gee_sorted_set_floor (keys, "s");
+ _tmp63_ = (gchar*) _tmp62_;
+ _vala_assert (g_strcmp0 (_tmp63_, "one") == 0, "keys.floor (\"s\") == \"one\"");
+ _g_free0 (_tmp63_);
+ _tmp64_ = map_tests_entry_for ("s", "six");
+ _tmp65_ = _tmp64_;
+ _tmp66_ = gee_sorted_set_floor (entries, _tmp65_);
+ _tmp67_ = (GeeMapEntry*) _tmp66_;
+ map_tests_assert_entry (_tmp67_, "one", "one");
+ _g_object_unref0 (_tmp67_);
+ _g_object_unref0 (_tmp65_);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+void gee_sorted_map_tests_test_ceil (GeeSortedMapTests* self) {
+ GeeMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* test_sorted_map;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* _tmp3_;
+ GeeSortedSet* keys;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gpointer _tmp6_ = NULL;
+ gchar* _tmp7_;
+ gpointer _tmp8_ = NULL;
+ gchar* _tmp9_;
+ GeeMapEntry* _tmp10_ = NULL;
+ GeeMapEntry* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ GeeMapEntry* _tmp13_;
+ gpointer _tmp14_ = NULL;
+ gchar* _tmp15_;
+ GeeMapEntry* _tmp16_ = NULL;
+ GeeMapEntry* _tmp17_;
+ gpointer _tmp18_ = NULL;
+ GeeMapEntry* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ GeeMapEntry* _tmp22_ = NULL;
+ GeeMapEntry* _tmp23_;
+ gpointer _tmp24_ = NULL;
+ GeeMapEntry* _tmp25_;
+ gpointer _tmp26_ = NULL;
+ gchar* _tmp27_;
+ GeeMapEntry* _tmp28_ = NULL;
+ GeeMapEntry* _tmp29_;
+ gpointer _tmp30_ = NULL;
+ GeeMapEntry* _tmp31_;
+ gpointer _tmp32_ = NULL;
+ gchar* _tmp33_;
+ GeeMapEntry* _tmp34_ = NULL;
+ GeeMapEntry* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ GeeMapEntry* _tmp37_;
+ gpointer _tmp38_ = NULL;
+ gchar* _tmp39_;
+ GeeMapEntry* _tmp40_ = NULL;
+ GeeMapEntry* _tmp41_;
+ gpointer _tmp42_ = NULL;
+ GeeMapEntry* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gchar* _tmp45_;
+ GeeMapEntry* _tmp46_ = NULL;
+ GeeMapEntry* _tmp47_;
+ gpointer _tmp48_ = NULL;
+ GeeMapEntry* _tmp49_;
+ gpointer _tmp50_ = NULL;
+ gchar* _tmp51_;
+ GeeMapEntry* _tmp52_ = NULL;
+ GeeMapEntry* _tmp53_;
+ gpointer _tmp54_ = NULL;
+ GeeMapEntry* _tmp55_;
+ gpointer _tmp56_ = NULL;
+ gchar* _tmp57_;
+ GeeMapEntry* _tmp58_ = NULL;
+ GeeMapEntry* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ GeeMapEntry* _tmp61_;
+ gpointer _tmp62_ = NULL;
+ gchar* _tmp63_;
+ GeeMapEntry* _tmp64_ = NULL;
+ GeeMapEntry* _tmp65_;
+ gpointer _tmp66_ = NULL;
+ GeeMapEntry* _tmp67_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = ((MapTests*) self)->test_map;
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp0_) : NULL);
+ test_sorted_map = _tmp1_;
+ _tmp2_ = gee_sorted_map_get_ascending_keys (test_sorted_map);
+ _tmp3_ = _tmp2_;
+ keys = _tmp3_;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (test_sorted_map);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ _tmp6_ = gee_sorted_set_ceil (keys, "one");
+ _tmp7_ = (gchar*) _tmp6_;
+ _vala_assert (_tmp7_ == NULL, "keys.ceil (\"one\") == null");
+ _g_free0 (_tmp7_);
+ gee_map_set ((GeeMap*) test_sorted_map, "one", "one");
+ gee_map_set ((GeeMap*) test_sorted_map, "two", "two");
+ gee_map_set ((GeeMap*) test_sorted_map, "three", "three");
+ gee_map_set ((GeeMap*) test_sorted_map, "four", "four");
+ gee_map_set ((GeeMap*) test_sorted_map, "five", "five");
+ gee_map_set ((GeeMap*) test_sorted_map, "six", "six");
+ _tmp8_ = gee_sorted_set_ceil (keys, "one");
+ _tmp9_ = (gchar*) _tmp8_;
+ _vala_assert (g_strcmp0 (_tmp9_, "one") == 0, "keys.ceil (\"one\") == \"one\"");
+ _g_free0 (_tmp9_);
+ _tmp10_ = map_tests_entry_for ("one", "one");
+ _tmp11_ = _tmp10_;
+ _tmp12_ = gee_sorted_set_ceil (entries, _tmp11_);
+ _tmp13_ = (GeeMapEntry*) _tmp12_;
+ map_tests_assert_entry (_tmp13_, "one", "one");
+ _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp11_);
+ _tmp14_ = gee_sorted_set_ceil (keys, "o");
+ _tmp15_ = (gchar*) _tmp14_;
+ _vala_assert (g_strcmp0 (_tmp15_, "one") == 0, "keys.ceil (\"o\") == \"one\"");
+ _g_free0 (_tmp15_);
+ _tmp16_ = map_tests_entry_for ("o", "one");
+ _tmp17_ = _tmp16_;
+ _tmp18_ = gee_sorted_set_ceil (entries, _tmp17_);
+ _tmp19_ = (GeeMapEntry*) _tmp18_;
+ map_tests_assert_entry (_tmp19_, "one", "one");
+ _g_object_unref0 (_tmp19_);
+ _g_object_unref0 (_tmp17_);
+ _tmp20_ = gee_sorted_set_ceil (keys, "two");
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "two") == 0, "keys.ceil (\"two\") == \"two\"");
+ _g_free0 (_tmp21_);
+ _tmp22_ = map_tests_entry_for ("two", "two");
+ _tmp23_ = _tmp22_;
+ _tmp24_ = gee_sorted_set_ceil (entries, _tmp23_);
+ _tmp25_ = (GeeMapEntry*) _tmp24_;
+ map_tests_assert_entry (_tmp25_, "two", "two");
+ _g_object_unref0 (_tmp25_);
+ _g_object_unref0 (_tmp23_);
+ _tmp26_ = gee_sorted_set_ceil (keys, "t");
+ _tmp27_ = (gchar*) _tmp26_;
+ _vala_assert (g_strcmp0 (_tmp27_, "three") == 0, "keys.ceil (\"t\") == \"three\"");
+ _g_free0 (_tmp27_);
+ _tmp28_ = map_tests_entry_for ("t", "two");
+ _tmp29_ = _tmp28_;
+ _tmp30_ = gee_sorted_set_ceil (entries, _tmp29_);
+ _tmp31_ = (GeeMapEntry*) _tmp30_;
+ map_tests_assert_entry (_tmp31_, "three", "three");
+ _g_object_unref0 (_tmp31_);
+ _g_object_unref0 (_tmp29_);
+ _tmp32_ = gee_sorted_set_ceil (keys, "three");
+ _tmp33_ = (gchar*) _tmp32_;
+ _vala_assert (g_strcmp0 (_tmp33_, "three") == 0, "keys.ceil (\"three\") == \"three\"");
+ _g_free0 (_tmp33_);
+ _tmp34_ = map_tests_entry_for ("three", "three");
+ _tmp35_ = _tmp34_;
+ _tmp36_ = gee_sorted_set_ceil (entries, _tmp35_);
+ _tmp37_ = (GeeMapEntry*) _tmp36_;
+ map_tests_assert_entry (_tmp37_, "three", "three");
+ _g_object_unref0 (_tmp37_);
+ _g_object_unref0 (_tmp35_);
+ _tmp38_ = gee_sorted_set_ceil (keys, "four");
+ _tmp39_ = (gchar*) _tmp38_;
+ _vala_assert (g_strcmp0 (_tmp39_, "four") == 0, "keys.ceil (\"four\") == \"four\"");
+ _g_free0 (_tmp39_);
+ _tmp40_ = map_tests_entry_for ("four", "four");
+ _tmp41_ = _tmp40_;
+ _tmp42_ = gee_sorted_set_ceil (entries, _tmp41_);
+ _tmp43_ = (GeeMapEntry*) _tmp42_;
+ map_tests_assert_entry (_tmp43_, "four", "four");
+ _g_object_unref0 (_tmp43_);
+ _g_object_unref0 (_tmp41_);
+ _tmp44_ = gee_sorted_set_ceil (keys, "f");
+ _tmp45_ = (gchar*) _tmp44_;
+ _vala_assert (g_strcmp0 (_tmp45_, "five") == 0, "keys.ceil (\"f\") == \"five\"");
+ _g_free0 (_tmp45_);
+ _tmp46_ = map_tests_entry_for ("f", "four");
+ _tmp47_ = _tmp46_;
+ _tmp48_ = gee_sorted_set_ceil (entries, _tmp47_);
+ _tmp49_ = (GeeMapEntry*) _tmp48_;
+ map_tests_assert_entry (_tmp49_, "five", "five");
+ _g_object_unref0 (_tmp49_);
+ _g_object_unref0 (_tmp47_);
+ _tmp50_ = gee_sorted_set_ceil (keys, "five");
+ _tmp51_ = (gchar*) _tmp50_;
+ _vala_assert (g_strcmp0 (_tmp51_, "five") == 0, "keys.ceil (\"five\") == \"five\"");
+ _g_free0 (_tmp51_);
+ _tmp52_ = map_tests_entry_for ("five", "five");
+ _tmp53_ = _tmp52_;
+ _tmp54_ = gee_sorted_set_ceil (entries, _tmp53_);
+ _tmp55_ = (GeeMapEntry*) _tmp54_;
+ map_tests_assert_entry (_tmp55_, "five", "five");
+ _g_object_unref0 (_tmp55_);
+ _g_object_unref0 (_tmp53_);
+ _tmp56_ = gee_sorted_set_ceil (keys, "six");
+ _tmp57_ = (gchar*) _tmp56_;
+ _vala_assert (g_strcmp0 (_tmp57_, "six") == 0, "keys.ceil (\"six\") == \"six\"");
+ _g_free0 (_tmp57_);
+ _tmp58_ = map_tests_entry_for ("six", "six");
+ _tmp59_ = _tmp58_;
+ _tmp60_ = gee_sorted_set_ceil (entries, _tmp59_);
+ _tmp61_ = (GeeMapEntry*) _tmp60_;
+ map_tests_assert_entry (_tmp61_, "six", "six");
+ _g_object_unref0 (_tmp61_);
+ _g_object_unref0 (_tmp59_);
+ _tmp62_ = gee_sorted_set_ceil (keys, "s");
+ _tmp63_ = (gchar*) _tmp62_;
+ _vala_assert (g_strcmp0 (_tmp63_, "six") == 0, "keys.ceil (\"s\") == \"six\"");
+ _g_free0 (_tmp63_);
+ _tmp64_ = map_tests_entry_for ("s", "six");
+ _tmp65_ = _tmp64_;
+ _tmp66_ = gee_sorted_set_ceil (entries, _tmp65_);
+ _tmp67_ = (GeeMapEntry*) _tmp66_;
+ map_tests_assert_entry (_tmp67_, "six", "six");
+ _g_object_unref0 (_tmp67_);
+ _g_object_unref0 (_tmp65_);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ _g_object_unref0 (test_sorted_map);
+}
+
+
+const gchar* gee_sorted_map_tests_sub_map_tests_type_to_string (GeeSortedMapTestsSubMapTestsType self) {
+ const gchar* result = NULL;
+ switch (self) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ result = "Head";
+ return result;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ result = "Tail";
+ return result;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ result = "Range";
+ return result;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ result = "Empty";
+ return result;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+}
+
+
+GType gee_sorted_map_tests_sub_map_tests_type_get_type (void) {
+ static volatile gsize gee_sorted_map_tests_sub_map_tests_type_type_id__volatile = 0;
+ if (g_once_init_enter (&gee_sorted_map_tests_sub_map_tests_type_type_id__volatile)) {
+ static const GEnumValue values[] = {{GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD, "GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD", "head"}, {GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL, "GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL", "tail"}, {GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB, "GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB", "sub"}, {GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY, "GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY", "empty"}, {0, NULL, NULL}};
+ GType gee_sorted_map_tests_sub_map_tests_type_type_id;
+ gee_sorted_map_tests_sub_map_tests_type_type_id = g_enum_register_static ("GeeSortedMapTestsSubMapTestsType", values);
+ g_once_init_leave (&gee_sorted_map_tests_sub_map_tests_type_type_id__volatile, gee_sorted_map_tests_sub_map_tests_type_type_id);
+ }
+ return gee_sorted_map_tests_sub_map_tests_type_type_id__volatile;
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_has_key_size_is_empty_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_has_key_size_is_empty (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_keys_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_keys (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_values_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_values (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_entries_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_entries (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_get_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_get (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_set_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_set (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_unset_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_unset (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_clear_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_clear (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_iterators_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_iterators (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_boundaries_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_boundaries (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_lower_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_lower (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_higher_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_higher (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_floor_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_floor (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_ceil_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_ceil (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_iterator_at_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_iterator_at (self);
+}
+
+
+static void _gee_sorted_map_tests_sub_map_tests_test_submap_and_subsets_gee_test_case_test_method (gpointer self) {
+ gee_sorted_map_tests_sub_map_tests_test_submap_and_subsets (self);
+}
+
+
+GeeSortedMapTestsSubMapTests* gee_sorted_map_tests_sub_map_tests_construct (GType object_type, GeeSortedMapTests* test, GeeSortedMapTestsSubMapTestsType type) {
+ GeeSortedMapTestsSubMapTests * self = NULL;
+ GeeSortedMapTestsSubMapTestsType _tmp0_;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_;
+ GeeSortedMapTests* _tmp4_;
+ GeeSortedMapTests* _tmp5_;
+ GeeSortedMapTestsSubMapTestsType _tmp6_;
+ g_return_val_if_fail (test != NULL, NULL);
+ _tmp0_ = type;
+ _tmp1_ = gee_sorted_map_tests_sub_map_tests_type_to_string (_tmp0_);
+ _tmp2_ = g_strdup_printf ("%s Submap", _tmp1_);
+ _tmp3_ = _tmp2_;
+ self = (GeeSortedMapTestsSubMapTests*) gee_test_case_construct (object_type, _tmp3_);
+ _g_free0 (_tmp3_);
+ _tmp4_ = test;
+ _tmp5_ = _g_object_ref0 (_tmp4_);
+ _g_object_unref0 (self->priv->test);
+ self->priv->test = _tmp5_;
+ _tmp6_ = type;
+ self->priv->type = _tmp6_;
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] has_key, size and is_empty", _gee_sorted_map_tests_sub_map_tests_test_has_key_size_is_empty_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] keys", _gee_sorted_map_tests_sub_map_tests_test_keys_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] values", _gee_sorted_map_tests_sub_map_tests_test_values_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] entries", _gee_sorted_map_tests_sub_map_tests_test_entries_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] get", _gee_sorted_map_tests_sub_map_tests_test_get_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] set", _gee_sorted_map_tests_sub_map_tests_test_set_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] unset", _gee_sorted_map_tests_sub_map_tests_test_unset_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] clear", _gee_sorted_map_tests_sub_map_tests_test_clear_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Map] iterators", _gee_sorted_map_tests_sub_map_tests_test_iterators_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] boundaries", _gee_sorted_map_tests_sub_map_tests_test_boundaries_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] lower", _gee_sorted_map_tests_sub_map_tests_test_lower_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] higher", _gee_sorted_map_tests_sub_map_tests_test_higher_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] floor", _gee_sorted_map_tests_sub_map_tests_test_floor_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] ceil", _gee_sorted_map_tests_sub_map_tests_test_ceil_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] iterator_at", _gee_sorted_map_tests_sub_map_tests_test_iterator_at_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedMap] submap and subsets", _gee_sorted_map_tests_sub_map_tests_test_submap_and_subsets_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ return self;
+}
+
+
+GeeSortedMapTestsSubMapTests* gee_sorted_map_tests_sub_map_tests_new (GeeSortedMapTests* test, GeeSortedMapTestsSubMapTestsType type) {
+ return gee_sorted_map_tests_sub_map_tests_construct (GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS, test, type);
+}
+
+
+static void gee_sorted_map_tests_sub_map_tests_real_set_up (GeeTestCase* base) {
+ GeeSortedMapTestsSubMapTests * self;
+ GeeSortedMapTests* _tmp0_;
+ GeeSortedMapTests* _tmp1_;
+ GeeMap* _tmp2_;
+ GeeSortedMap* _tmp3_;
+ GeeSortedMapTestsSubMapTestsType _tmp4_;
+ self = (GeeSortedMapTestsSubMapTests*) base;
+ _tmp0_ = self->priv->test;
+ gee_test_case_set_up ((GeeTestCase*) _tmp0_);
+ _tmp1_ = self->priv->test;
+ _tmp2_ = ((MapTests*) _tmp1_)->test_map;
+ _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_SORTED_MAP) ? ((GeeSortedMap*) _tmp2_) : NULL);
+ _g_object_unref0 (self->priv->master);
+ self->priv->master = _tmp3_;
+ _tmp4_ = self->priv->type;
+ switch (_tmp4_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ GeeSortedMap* _tmp5_;
+ GeeSortedMap* _tmp6_ = NULL;
+ _tmp5_ = self->priv->master;
+ _tmp6_ = gee_sorted_map_head_map (_tmp5_, "one");
+ _g_object_unref0 (self->priv->submap);
+ self->priv->submap = _tmp6_;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ GeeSortedMap* _tmp7_;
+ GeeSortedMap* _tmp8_ = NULL;
+ _tmp7_ = self->priv->master;
+ _tmp8_ = gee_sorted_map_tail_map (_tmp7_, "six");
+ _g_object_unref0 (self->priv->submap);
+ self->priv->submap = _tmp8_;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ GeeSortedMap* _tmp9_;
+ GeeSortedMap* _tmp10_ = NULL;
+ _tmp9_ = self->priv->master;
+ _tmp10_ = gee_sorted_map_sub_map (_tmp9_, "four", "three");
+ _g_object_unref0 (self->priv->submap);
+ self->priv->submap = _tmp10_;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ GeeSortedMap* _tmp11_;
+ GeeSortedMap* _tmp12_ = NULL;
+ _tmp11_ = self->priv->master;
+ _tmp12_ = gee_sorted_map_sub_map (_tmp11_, "three", "four");
+ _g_object_unref0 (self->priv->submap);
+ self->priv->submap = _tmp12_;
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+}
+
+
+static void gee_sorted_map_tests_sub_map_tests_real_tear_down (GeeTestCase* base) {
+ GeeSortedMapTestsSubMapTests * self;
+ GeeSortedMapTests* _tmp0_;
+ self = (GeeSortedMapTestsSubMapTests*) base;
+ _tmp0_ = self->priv->test;
+ gee_test_case_tear_down ((GeeTestCase*) _tmp0_);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_set_default_values (GeeSortedMapTestsSubMapTests* self, gchar*** contains, int* contains_length1, gchar*** not_contains, int* not_contains_length1) {
+ gchar** _vala_contains = NULL;
+ int _vala_contains_length1 = 0;
+ gchar** _vala_not_contains = NULL;
+ int _vala_not_contains_length1 = 0;
+ GeeSortedMap* _tmp0_;
+ GeeSortedMap* _tmp1_;
+ GeeSortedMap* _tmp2_;
+ GeeSortedMap* _tmp3_;
+ GeeSortedMap* _tmp4_;
+ GeeSortedMap* _tmp5_;
+ GeeSortedMapTestsSubMapTestsType _tmp6_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp0_, "one", "one");
+ _tmp1_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp1_, "two", "two");
+ _tmp2_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp2_, "three", "three");
+ _tmp3_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp3_, "four", "four");
+ _tmp4_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp4_, "five", "five");
+ _tmp5_ = self->priv->master;
+ gee_map_set ((GeeMap*) _tmp5_, "six", "six");
+ _tmp6_ = self->priv->type;
+ switch (_tmp6_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ gchar* _tmp7_;
+ gchar* _tmp8_;
+ gchar** _tmp9_ = NULL;
+ gchar* _tmp10_;
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar** _tmp14_ = NULL;
+ _tmp7_ = g_strdup ("five");
+ _tmp8_ = g_strdup ("four");
+ _tmp9_ = g_new0 (gchar*, 2 + 1);
+ _tmp9_[0] = _tmp7_;
+ _tmp9_[1] = _tmp8_;
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_contains = _tmp9_;
+ _vala_contains_length1 = 2;
+ _tmp10_ = g_strdup ("one");
+ _tmp11_ = g_strdup ("two");
+ _tmp12_ = g_strdup ("three");
+ _tmp13_ = g_strdup ("six");
+ _tmp14_ = g_new0 (gchar*, 4 + 1);
+ _tmp14_[0] = _tmp10_;
+ _tmp14_[1] = _tmp11_;
+ _tmp14_[2] = _tmp12_;
+ _tmp14_[3] = _tmp13_;
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_not_contains = _tmp14_;
+ _vala_not_contains_length1 = 4;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ gchar* _tmp15_;
+ gchar* _tmp16_;
+ gchar* _tmp17_;
+ gchar** _tmp18_ = NULL;
+ gchar* _tmp19_;
+ gchar* _tmp20_;
+ gchar* _tmp21_;
+ gchar** _tmp22_ = NULL;
+ _tmp15_ = g_strdup ("six");
+ _tmp16_ = g_strdup ("three");
+ _tmp17_ = g_strdup ("two");
+ _tmp18_ = g_new0 (gchar*, 3 + 1);
+ _tmp18_[0] = _tmp15_;
+ _tmp18_[1] = _tmp16_;
+ _tmp18_[2] = _tmp17_;
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_contains = _tmp18_;
+ _vala_contains_length1 = 3;
+ _tmp19_ = g_strdup ("one");
+ _tmp20_ = g_strdup ("four");
+ _tmp21_ = g_strdup ("five");
+ _tmp22_ = g_new0 (gchar*, 3 + 1);
+ _tmp22_[0] = _tmp19_;
+ _tmp22_[1] = _tmp20_;
+ _tmp22_[2] = _tmp21_;
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_not_contains = _tmp22_;
+ _vala_not_contains_length1 = 3;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ gchar* _tmp23_;
+ gchar* _tmp24_;
+ gchar* _tmp25_;
+ gchar** _tmp26_ = NULL;
+ gchar* _tmp27_;
+ gchar* _tmp28_;
+ gchar* _tmp29_;
+ gchar** _tmp30_ = NULL;
+ _tmp23_ = g_strdup ("four");
+ _tmp24_ = g_strdup ("one");
+ _tmp25_ = g_strdup ("six");
+ _tmp26_ = g_new0 (gchar*, 3 + 1);
+ _tmp26_[0] = _tmp23_;
+ _tmp26_[1] = _tmp24_;
+ _tmp26_[2] = _tmp25_;
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_contains = _tmp26_;
+ _vala_contains_length1 = 3;
+ _tmp27_ = g_strdup ("two");
+ _tmp28_ = g_strdup ("three");
+ _tmp29_ = g_strdup ("five");
+ _tmp30_ = g_new0 (gchar*, 3 + 1);
+ _tmp30_[0] = _tmp27_;
+ _tmp30_[1] = _tmp28_;
+ _tmp30_[2] = _tmp29_;
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_not_contains = _tmp30_;
+ _vala_not_contains_length1 = 3;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ gchar** _tmp31_ = NULL;
+ gchar* _tmp32_;
+ gchar* _tmp33_;
+ gchar* _tmp34_;
+ gchar* _tmp35_;
+ gchar* _tmp36_;
+ gchar* _tmp37_;
+ gchar** _tmp38_ = NULL;
+ _tmp31_ = g_new0 (gchar*, 0 + 1);
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_contains = _tmp31_;
+ _vala_contains_length1 = 0;
+ _tmp32_ = g_strdup ("one");
+ _tmp33_ = g_strdup ("two");
+ _tmp34_ = g_strdup ("three");
+ _tmp35_ = g_strdup ("four");
+ _tmp36_ = g_strdup ("five");
+ _tmp37_ = g_strdup ("six");
+ _tmp38_ = g_new0 (gchar*, 6 + 1);
+ _tmp38_[0] = _tmp32_;
+ _tmp38_[1] = _tmp33_;
+ _tmp38_[2] = _tmp34_;
+ _tmp38_[3] = _tmp35_;
+ _tmp38_[4] = _tmp36_;
+ _tmp38_[5] = _tmp37_;
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ _vala_not_contains = _tmp38_;
+ _vala_not_contains_length1 = 6;
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ if (contains) {
+ *contains = _vala_contains;
+ } else {
+ _vala_contains = (_vala_array_free (_vala_contains, _vala_contains_length1, (GDestroyNotify) g_free), NULL);
+ }
+ if (contains_length1) {
+ *contains_length1 = _vala_contains_length1;
+ }
+ if (not_contains) {
+ *not_contains = _vala_not_contains;
+ } else {
+ _vala_not_contains = (_vala_array_free (_vala_not_contains, _vala_not_contains_length1, (GDestroyNotify) g_free), NULL);
+ }
+ if (not_contains_length1) {
+ *not_contains_length1 = _vala_not_contains_length1;
+ }
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_has_key_size_is_empty (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ GeeSortedMap* _tmp4_;
+ gint _tmp5_;
+ gint _tmp6_;
+ gchar** _tmp7_;
+ gint _tmp7__length1;
+ GeeSortedMap* _tmp8_;
+ gboolean _tmp9_;
+ gboolean _tmp10_;
+ gchar** _tmp11_;
+ gint _tmp11__length1;
+ gchar** _tmp12_;
+ gint _tmp12__length1;
+ gchar** _tmp21_;
+ gint _tmp21__length1;
+ g_return_if_fail (self != NULL);
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp0_;
+ contains_length1 = _tmp1_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp2_;
+ not_contains_length1 = _tmp3_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp4_ = self->priv->submap;
+ _tmp5_ = gee_map_get_size ((GeeMap*) _tmp4_);
+ _tmp6_ = _tmp5_;
+ _tmp7_ = contains;
+ _tmp7__length1 = contains_length1;
+ _vala_assert (_tmp6_ == _tmp7__length1, "submap.size == contains.length");
+ _tmp8_ = self->priv->submap;
+ _tmp9_ = gee_map_get_is_empty ((GeeMap*) _tmp8_);
+ _tmp10_ = _tmp9_;
+ _tmp11_ = contains;
+ _tmp11__length1 = contains_length1;
+ _vala_assert (_tmp10_ == (_tmp11__length1 == 0), "submap.is_empty == (contains.length == 0)");
+ _tmp12_ = contains;
+ _tmp12__length1 = contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp12_;
+ s_collection_length1 = _tmp12__length1;
+ for (s_it = 0; s_it < _tmp12__length1; s_it = s_it + 1) {
+ gchar* _tmp13_;
+ gchar* s = NULL;
+ _tmp13_ = g_strdup (s_collection[s_it]);
+ s = _tmp13_;
+ {
+ GeeSortedMap* _tmp14_;
+ const gchar* _tmp15_;
+ gboolean _tmp16_ = FALSE;
+ GeeSortedMap* _tmp17_;
+ const gchar* _tmp18_;
+ const gchar* _tmp19_;
+ gboolean _tmp20_ = FALSE;
+ _tmp14_ = self->priv->submap;
+ _tmp15_ = s;
+ _tmp16_ = gee_map_has_key ((GeeMap*) _tmp14_, _tmp15_);
+ _vala_assert (_tmp16_, "submap.has_key (s)");
+ _tmp17_ = self->priv->submap;
+ _tmp18_ = s;
+ _tmp19_ = s;
+ _tmp20_ = gee_map_has ((GeeMap*) _tmp17_, _tmp18_, _tmp19_);
+ _vala_assert (_tmp20_, "submap.has (s, s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp21_ = not_contains;
+ _tmp21__length1 = not_contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp21_;
+ s_collection_length1 = _tmp21__length1;
+ for (s_it = 0; s_it < _tmp21__length1; s_it = s_it + 1) {
+ gchar* _tmp22_;
+ gchar* s = NULL;
+ _tmp22_ = g_strdup (s_collection[s_it]);
+ s = _tmp22_;
+ {
+ GeeSortedMap* _tmp23_;
+ const gchar* _tmp24_;
+ gboolean _tmp25_ = FALSE;
+ GeeSortedMap* _tmp26_;
+ const gchar* _tmp27_;
+ const gchar* _tmp28_;
+ gboolean _tmp29_ = FALSE;
+ _tmp23_ = self->priv->submap;
+ _tmp24_ = s;
+ _tmp25_ = gee_map_has_key ((GeeMap*) _tmp23_, _tmp24_);
+ _vala_assert (!_tmp25_, "!submap.has_key (s)");
+ _tmp26_ = self->priv->submap;
+ _tmp27_ = s;
+ _tmp28_ = s;
+ _tmp29_ = gee_map_has ((GeeMap*) _tmp26_, _tmp27_, _tmp28_);
+ _vala_assert (!_tmp29_, "!submap.has (s, s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_get (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ gchar** _tmp4_;
+ gint _tmp4__length1;
+ g_return_if_fail (self != NULL);
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp0_;
+ contains_length1 = _tmp1_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp2_;
+ not_contains_length1 = _tmp3_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp4_ = contains;
+ _tmp4__length1 = contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp4_;
+ s_collection_length1 = _tmp4__length1;
+ for (s_it = 0; s_it < _tmp4__length1; s_it = s_it + 1) {
+ gchar* _tmp5_;
+ gchar* s = NULL;
+ _tmp5_ = g_strdup (s_collection[s_it]);
+ s = _tmp5_;
+ {
+ GeeSortedMap* _tmp6_;
+ const gchar* _tmp7_;
+ gpointer _tmp8_ = NULL;
+ gchar* _tmp9_;
+ const gchar* _tmp10_;
+ _tmp6_ = self->priv->submap;
+ _tmp7_ = s;
+ _tmp8_ = gee_map_get ((GeeMap*) _tmp6_, _tmp7_);
+ _tmp9_ = (gchar*) _tmp8_;
+ _tmp10_ = s;
+ _vala_assert (g_strcmp0 (_tmp9_, _tmp10_) == 0, "submap.get (s) == s");
+ _g_free0 (_tmp9_);
+ _g_free0 (s);
+ }
+ }
+ }
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_keys (GeeSortedMapTestsSubMapTests* self) {
+ GeeSortedMap* _tmp0_;
+ GeeSet* _tmp1_;
+ GeeSet* _tmp2_;
+ GeeSet* keys;
+ GeeSet* _tmp3_;
+ gint _tmp4_;
+ gint _tmp5_;
+ GeeSet* _tmp6_;
+ gboolean _tmp7_;
+ gboolean _tmp8_;
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gchar** _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ GeeSet* _tmp13_;
+ gint _tmp14_;
+ gint _tmp15_;
+ gchar** _tmp16_;
+ gint _tmp16__length1;
+ gchar** _tmp17_;
+ gint _tmp17__length1;
+ gchar** _tmp22_;
+ gint _tmp22__length1;
+ gboolean _tmp27_ = FALSE;
+ gboolean _tmp29_ = FALSE;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_map_get_keys ((GeeMap*) _tmp0_);
+ _tmp2_ = _tmp1_;
+ keys = _tmp2_;
+ _tmp3_ = keys;
+ _tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
+ _tmp5_ = _tmp4_;
+ _vala_assert (_tmp5_ == 0, "keys.size == 0");
+ _tmp6_ = keys;
+ _tmp7_ = gee_collection_get_is_empty ((GeeCollection*) _tmp6_);
+ _tmp8_ = _tmp7_;
+ _vala_assert (_tmp8_, "keys.is_empty");
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp9_, &_tmp10_, &_tmp11_, &_tmp12_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp9_;
+ contains_length1 = _tmp10_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp11_;
+ not_contains_length1 = _tmp12_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp13_ = keys;
+ _tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_);
+ _tmp15_ = _tmp14_;
+ _tmp16_ = contains;
+ _tmp16__length1 = contains_length1;
+ _vala_assert (_tmp15_ == _tmp16__length1, "keys.size == contains.length");
+ _tmp17_ = contains;
+ _tmp17__length1 = contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp17_;
+ s_collection_length1 = _tmp17__length1;
+ for (s_it = 0; s_it < _tmp17__length1; s_it = s_it + 1) {
+ gchar* _tmp18_;
+ gchar* s = NULL;
+ _tmp18_ = g_strdup (s_collection[s_it]);
+ s = _tmp18_;
+ {
+ GeeSet* _tmp19_;
+ const gchar* _tmp20_;
+ gboolean _tmp21_ = FALSE;
+ _tmp19_ = keys;
+ _tmp20_ = s;
+ _tmp21_ = gee_collection_contains ((GeeCollection*) _tmp19_, _tmp20_);
+ _vala_assert (_tmp21_, "keys.contains (s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp22_ = not_contains;
+ _tmp22__length1 = not_contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp22_;
+ s_collection_length1 = _tmp22__length1;
+ for (s_it = 0; s_it < _tmp22__length1; s_it = s_it + 1) {
+ gchar* _tmp23_;
+ gchar* s = NULL;
+ _tmp23_ = g_strdup (s_collection[s_it]);
+ s = _tmp23_;
+ {
+ GeeSet* _tmp24_;
+ const gchar* _tmp25_;
+ gboolean _tmp26_ = FALSE;
+ _tmp24_ = keys;
+ _tmp25_ = s;
+ _tmp26_ = gee_collection_contains ((GeeCollection*) _tmp24_, _tmp25_);
+ _vala_assert (!_tmp26_, "!keys.contains (s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp27_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp27_) {
+ GeeSet* _tmp28_;
+ _tmp28_ = keys;
+ gee_collection_add ((GeeCollection*) _tmp28_, "three");
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp29_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp29_) {
+ GeeSet* _tmp30_;
+ _tmp30_ = keys;
+ gee_collection_remove ((GeeCollection*) _tmp30_, "three");
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ _g_object_unref0 (keys);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_values (GeeSortedMapTestsSubMapTests* self) {
+ GeeSortedMap* _tmp0_;
+ GeeCollection* _tmp1_;
+ GeeCollection* _tmp2_;
+ GeeCollection* values;
+ GeeCollection* _tmp3_;
+ gint _tmp4_;
+ gint _tmp5_;
+ GeeCollection* _tmp6_;
+ gboolean _tmp7_;
+ gboolean _tmp8_;
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gchar** _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ GeeCollection* _tmp13_;
+ gint _tmp14_;
+ gint _tmp15_;
+ gchar** _tmp16_;
+ gint _tmp16__length1;
+ gchar** _tmp17_;
+ gint _tmp17__length1;
+ gchar** _tmp22_;
+ gint _tmp22__length1;
+ gboolean _tmp27_ = FALSE;
+ gboolean _tmp29_ = FALSE;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_map_get_values ((GeeMap*) _tmp0_);
+ _tmp2_ = _tmp1_;
+ values = _tmp2_;
+ _tmp3_ = values;
+ _tmp4_ = gee_collection_get_size (_tmp3_);
+ _tmp5_ = _tmp4_;
+ _vala_assert (_tmp5_ == 0, "values.size == 0");
+ _tmp6_ = values;
+ _tmp7_ = gee_collection_get_is_empty (_tmp6_);
+ _tmp8_ = _tmp7_;
+ _vala_assert (_tmp8_, "values.is_empty");
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp9_, &_tmp10_, &_tmp11_, &_tmp12_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp9_;
+ contains_length1 = _tmp10_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp11_;
+ not_contains_length1 = _tmp12_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp13_ = values;
+ _tmp14_ = gee_collection_get_size (_tmp13_);
+ _tmp15_ = _tmp14_;
+ _tmp16_ = contains;
+ _tmp16__length1 = contains_length1;
+ _vala_assert (_tmp15_ == _tmp16__length1, "values.size == contains.length");
+ _tmp17_ = contains;
+ _tmp17__length1 = contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp17_;
+ s_collection_length1 = _tmp17__length1;
+ for (s_it = 0; s_it < _tmp17__length1; s_it = s_it + 1) {
+ gchar* _tmp18_;
+ gchar* s = NULL;
+ _tmp18_ = g_strdup (s_collection[s_it]);
+ s = _tmp18_;
+ {
+ GeeCollection* _tmp19_;
+ const gchar* _tmp20_;
+ gboolean _tmp21_ = FALSE;
+ _tmp19_ = values;
+ _tmp20_ = s;
+ _tmp21_ = gee_collection_contains (_tmp19_, _tmp20_);
+ _vala_assert (_tmp21_, "values.contains (s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp22_ = not_contains;
+ _tmp22__length1 = not_contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp22_;
+ s_collection_length1 = _tmp22__length1;
+ for (s_it = 0; s_it < _tmp22__length1; s_it = s_it + 1) {
+ gchar* _tmp23_;
+ gchar* s = NULL;
+ _tmp23_ = g_strdup (s_collection[s_it]);
+ s = _tmp23_;
+ {
+ GeeCollection* _tmp24_;
+ const gchar* _tmp25_;
+ gboolean _tmp26_ = FALSE;
+ _tmp24_ = values;
+ _tmp25_ = s;
+ _tmp26_ = gee_collection_contains (_tmp24_, _tmp25_);
+ _vala_assert (!_tmp26_, "!values.contains (s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp27_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp27_) {
+ GeeCollection* _tmp28_;
+ _tmp28_ = values;
+ gee_collection_add (_tmp28_, "three");
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp29_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp29_) {
+ GeeCollection* _tmp30_;
+ _tmp30_ = values;
+ gee_collection_remove (_tmp30_, "three");
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ _g_object_unref0 (values);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_entries (GeeSortedMapTestsSubMapTests* self) {
+ GeeSortedMap* _tmp0_;
+ GeeSet* _tmp1_;
+ GeeSet* _tmp2_;
+ GeeSet* entries;
+ GeeSet* _tmp3_;
+ gint _tmp4_;
+ gint _tmp5_;
+ GeeSet* _tmp6_;
+ gboolean _tmp7_;
+ gboolean _tmp8_;
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gchar** _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ GeeSet* _tmp13_;
+ gint _tmp14_;
+ gint _tmp15_;
+ gchar** _tmp16_;
+ gint _tmp16__length1;
+ gchar** _tmp17_;
+ gint _tmp17__length1;
+ gchar** _tmp25_;
+ gint _tmp25__length1;
+ gboolean _tmp33_ = FALSE;
+ gboolean _tmp37_ = FALSE;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_map_get_entries ((GeeMap*) _tmp0_);
+ _tmp2_ = _tmp1_;
+ entries = _tmp2_;
+ _tmp3_ = entries;
+ _tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
+ _tmp5_ = _tmp4_;
+ _vala_assert (_tmp5_ == 0, "entries.size == 0");
+ _tmp6_ = entries;
+ _tmp7_ = gee_collection_get_is_empty ((GeeCollection*) _tmp6_);
+ _tmp8_ = _tmp7_;
+ _vala_assert (_tmp8_, "entries.is_empty");
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp9_, &_tmp10_, &_tmp11_, &_tmp12_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp9_;
+ contains_length1 = _tmp10_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp11_;
+ not_contains_length1 = _tmp12_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp13_ = entries;
+ _tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_);
+ _tmp15_ = _tmp14_;
+ _tmp16_ = contains;
+ _tmp16__length1 = contains_length1;
+ _vala_assert (_tmp15_ == _tmp16__length1, "entries.size == contains.length");
+ _tmp17_ = contains;
+ _tmp17__length1 = contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp17_;
+ s_collection_length1 = _tmp17__length1;
+ for (s_it = 0; s_it < _tmp17__length1; s_it = s_it + 1) {
+ gchar* _tmp18_;
+ gchar* s = NULL;
+ _tmp18_ = g_strdup (s_collection[s_it]);
+ s = _tmp18_;
+ {
+ GeeSet* _tmp19_;
+ const gchar* _tmp20_;
+ const gchar* _tmp21_;
+ GeeMapEntry* _tmp22_ = NULL;
+ GeeMapEntry* _tmp23_;
+ gboolean _tmp24_ = FALSE;
+ _tmp19_ = entries;
+ _tmp20_ = s;
+ _tmp21_ = s;
+ _tmp22_ = map_tests_entry_for (_tmp20_, _tmp21_);
+ _tmp23_ = _tmp22_;
+ _tmp24_ = gee_collection_contains ((GeeCollection*) _tmp19_, _tmp23_);
+ _vala_assert (_tmp24_, "entries.contains (MapTests.entry_for (s, s))");
+ _g_object_unref0 (_tmp23_);
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp25_ = not_contains;
+ _tmp25__length1 = not_contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp25_;
+ s_collection_length1 = _tmp25__length1;
+ for (s_it = 0; s_it < _tmp25__length1; s_it = s_it + 1) {
+ gchar* _tmp26_;
+ gchar* s = NULL;
+ _tmp26_ = g_strdup (s_collection[s_it]);
+ s = _tmp26_;
+ {
+ GeeSet* _tmp27_;
+ const gchar* _tmp28_;
+ const gchar* _tmp29_;
+ GeeMapEntry* _tmp30_ = NULL;
+ GeeMapEntry* _tmp31_;
+ gboolean _tmp32_ = FALSE;
+ _tmp27_ = entries;
+ _tmp28_ = s;
+ _tmp29_ = s;
+ _tmp30_ = map_tests_entry_for (_tmp28_, _tmp29_);
+ _tmp31_ = _tmp30_;
+ _tmp32_ = gee_collection_contains ((GeeCollection*) _tmp27_, _tmp31_);
+ _vala_assert (!_tmp32_, "!entries.contains (MapTests.entry_for (s, s))");
+ _g_object_unref0 (_tmp31_);
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp33_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp33_) {
+ GeeSet* _tmp34_;
+ GeeMapEntry* _tmp35_ = NULL;
+ GeeMapEntry* _tmp36_;
+ _tmp34_ = entries;
+ _tmp35_ = map_tests_entry_for ("three", "three");
+ _tmp36_ = _tmp35_;
+ gee_collection_add ((GeeCollection*) _tmp34_, _tmp36_);
+ _g_object_unref0 (_tmp36_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp37_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp37_) {
+ GeeSet* _tmp38_;
+ GeeMapEntry* _tmp39_ = NULL;
+ GeeMapEntry* _tmp40_;
+ _tmp38_ = entries;
+ _tmp39_ = map_tests_entry_for ("three", "three");
+ _tmp40_ = _tmp39_;
+ gee_collection_remove ((GeeCollection*) _tmp38_, _tmp40_);
+ _g_object_unref0 (_tmp40_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ _g_object_unref0 (entries);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_set (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ gchar** success = NULL;
+ gint success_length1 = 0;
+ gint _success_size_ = 0;
+ gchar** fail = NULL;
+ gint fail_length1 = 0;
+ gint _fail_size_ = 0;
+ GeeSortedMapTestsSubMapTestsType _tmp4_;
+ gchar** _tmp29_;
+ gint _tmp29__length1;
+ gchar** _tmp42_;
+ gint _tmp42__length1;
+ GeeSortedMap* _tmp53_;
+ gint _tmp54_;
+ gint _tmp55_;
+ gchar** _tmp56_;
+ gint _tmp56__length1;
+ g_return_if_fail (self != NULL);
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp0_;
+ contains_length1 = _tmp1_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp2_;
+ not_contains_length1 = _tmp3_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp4_ = self->priv->type;
+ switch (_tmp4_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ gchar* _tmp5_;
+ gchar* _tmp6_;
+ gchar** _tmp7_ = NULL;
+ gchar* _tmp8_;
+ gchar* _tmp9_;
+ gchar** _tmp10_ = NULL;
+ _tmp5_ = g_strdup ("a");
+ _tmp6_ = g_strdup ("o");
+ _tmp7_ = g_new0 (gchar*, 2 + 1);
+ _tmp7_[0] = _tmp5_;
+ _tmp7_[1] = _tmp6_;
+ success = (_vala_array_free (success, success_length1, (GDestroyNotify) g_free), NULL);
+ success = _tmp7_;
+ success_length1 = 2;
+ _success_size_ = success_length1;
+ _tmp8_ = g_strdup ("oz");
+ _tmp9_ = g_strdup ("z");
+ _tmp10_ = g_new0 (gchar*, 2 + 1);
+ _tmp10_[0] = _tmp8_;
+ _tmp10_[1] = _tmp9_;
+ fail = (_vala_array_free (fail, fail_length1, (GDestroyNotify) g_free), NULL);
+ fail = _tmp10_;
+ fail_length1 = 2;
+ _fail_size_ = fail_length1;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar** _tmp13_ = NULL;
+ gchar* _tmp14_;
+ gchar* _tmp15_;
+ gchar** _tmp16_ = NULL;
+ _tmp11_ = g_strdup ("siz");
+ _tmp12_ = g_strdup ("z");
+ _tmp13_ = g_new0 (gchar*, 2 + 1);
+ _tmp13_[0] = _tmp11_;
+ _tmp13_[1] = _tmp12_;
+ success = (_vala_array_free (success, success_length1, (GDestroyNotify) g_free), NULL);
+ success = _tmp13_;
+ success_length1 = 2;
+ _success_size_ = success_length1;
+ _tmp14_ = g_strdup ("sia");
+ _tmp15_ = g_strdup ("a");
+ _tmp16_ = g_new0 (gchar*, 2 + 1);
+ _tmp16_[0] = _tmp14_;
+ _tmp16_[1] = _tmp15_;
+ fail = (_vala_array_free (fail, fail_length1, (GDestroyNotify) g_free), NULL);
+ fail = _tmp16_;
+ fail_length1 = 2;
+ _fail_size_ = fail_length1;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ gchar* _tmp17_;
+ gchar* _tmp18_;
+ gchar** _tmp19_ = NULL;
+ gchar* _tmp20_;
+ gchar* _tmp21_;
+ gchar** _tmp22_ = NULL;
+ _tmp17_ = g_strdup ("o");
+ _tmp18_ = g_strdup ("th");
+ _tmp19_ = g_new0 (gchar*, 2 + 1);
+ _tmp19_[0] = _tmp17_;
+ _tmp19_[1] = _tmp18_;
+ success = (_vala_array_free (success, success_length1, (GDestroyNotify) g_free), NULL);
+ success = _tmp19_;
+ success_length1 = 2;
+ _success_size_ = success_length1;
+ _tmp20_ = g_strdup ("f");
+ _tmp21_ = g_strdup ("u");
+ _tmp22_ = g_new0 (gchar*, 2 + 1);
+ _tmp22_[0] = _tmp20_;
+ _tmp22_[1] = _tmp21_;
+ fail = (_vala_array_free (fail, fail_length1, (GDestroyNotify) g_free), NULL);
+ fail = _tmp22_;
+ fail_length1 = 2;
+ _fail_size_ = fail_length1;
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ gchar** _tmp23_ = NULL;
+ gchar* _tmp24_;
+ gchar* _tmp25_;
+ gchar* _tmp26_;
+ gchar* _tmp27_;
+ gchar** _tmp28_ = NULL;
+ _tmp23_ = g_new0 (gchar*, 0 + 1);
+ success = (_vala_array_free (success, success_length1, (GDestroyNotify) g_free), NULL);
+ success = _tmp23_;
+ success_length1 = 0;
+ _success_size_ = success_length1;
+ _tmp24_ = g_strdup ("o");
+ _tmp25_ = g_strdup ("th");
+ _tmp26_ = g_strdup ("f");
+ _tmp27_ = g_strdup ("u");
+ _tmp28_ = g_new0 (gchar*, 4 + 1);
+ _tmp28_[0] = _tmp24_;
+ _tmp28_[1] = _tmp25_;
+ _tmp28_[2] = _tmp26_;
+ _tmp28_[3] = _tmp27_;
+ fail = (_vala_array_free (fail, fail_length1, (GDestroyNotify) g_free), NULL);
+ fail = _tmp28_;
+ fail_length1 = 4;
+ _fail_size_ = fail_length1;
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ _tmp29_ = success;
+ _tmp29__length1 = success_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp29_;
+ s_collection_length1 = _tmp29__length1;
+ for (s_it = 0; s_it < _tmp29__length1; s_it = s_it + 1) {
+ gchar* _tmp30_;
+ gchar* s = NULL;
+ _tmp30_ = g_strdup (s_collection[s_it]);
+ s = _tmp30_;
+ {
+ GeeSortedMap* _tmp31_;
+ const gchar* _tmp32_;
+ const gchar* _tmp33_;
+ GeeSortedMap* _tmp34_;
+ const gchar* _tmp35_;
+ const gchar* _tmp36_;
+ gboolean _tmp37_ = FALSE;
+ GeeSortedMap* _tmp38_;
+ const gchar* _tmp39_;
+ const gchar* _tmp40_;
+ gboolean _tmp41_ = FALSE;
+ _tmp31_ = self->priv->submap;
+ _tmp32_ = s;
+ _tmp33_ = s;
+ gee_map_set ((GeeMap*) _tmp31_, _tmp32_, _tmp33_);
+ _tmp34_ = self->priv->submap;
+ _tmp35_ = s;
+ _tmp36_ = s;
+ _tmp37_ = gee_map_has ((GeeMap*) _tmp34_, _tmp35_, _tmp36_);
+ _vala_assert (_tmp37_, "submap.has (s, s)");
+ _tmp38_ = self->priv->master;
+ _tmp39_ = s;
+ _tmp40_ = s;
+ _tmp41_ = gee_map_has ((GeeMap*) _tmp38_, _tmp39_, _tmp40_);
+ _vala_assert (_tmp41_, "master.has (s, s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp42_ = fail;
+ _tmp42__length1 = fail_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp42_;
+ s_collection_length1 = _tmp42__length1;
+ for (s_it = 0; s_it < _tmp42__length1; s_it = s_it + 1) {
+ gchar* _tmp43_;
+ gchar* s = NULL;
+ _tmp43_ = g_strdup (s_collection[s_it]);
+ s = _tmp43_;
+ {
+ GeeSortedMap* _tmp44_;
+ const gchar* _tmp45_;
+ const gchar* _tmp46_;
+ GeeSortedMap* _tmp47_;
+ const gchar* _tmp48_;
+ gboolean _tmp49_ = FALSE;
+ GeeSortedMap* _tmp50_;
+ const gchar* _tmp51_;
+ gboolean _tmp52_ = FALSE;
+ _tmp44_ = self->priv->submap;
+ _tmp45_ = s;
+ _tmp46_ = s;
+ gee_map_set ((GeeMap*) _tmp44_, _tmp45_, _tmp46_);
+ _tmp47_ = self->priv->submap;
+ _tmp48_ = s;
+ _tmp49_ = gee_map_has_key ((GeeMap*) _tmp47_, _tmp48_);
+ _vala_assert (!_tmp49_, "!submap.has_key (s)");
+ _tmp50_ = self->priv->master;
+ _tmp51_ = s;
+ _tmp52_ = gee_map_has_key ((GeeMap*) _tmp50_, _tmp51_);
+ _vala_assert (!_tmp52_, "!master.has_key (s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp53_ = self->priv->master;
+ _tmp54_ = gee_map_get_size ((GeeMap*) _tmp53_);
+ _tmp55_ = _tmp54_;
+ _tmp56_ = success;
+ _tmp56__length1 = success_length1;
+ _vala_assert (_tmp55_ == (6 + _tmp56__length1), "master.size == 6 + success.length");
+ fail = (_vala_array_free (fail, fail_length1, (GDestroyNotify) g_free), NULL);
+ success = (_vala_array_free (success, success_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_unset (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ gchar** _tmp4_;
+ gint _tmp4__length1;
+ gchar** _tmp15_;
+ gint _tmp15__length1;
+ GeeSortedMap* _tmp24_;
+ gint _tmp25_;
+ gint _tmp26_;
+ gchar** _tmp27_;
+ gint _tmp27__length1;
+ g_return_if_fail (self != NULL);
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp0_;
+ contains_length1 = _tmp1_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp2_;
+ not_contains_length1 = _tmp3_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp4_ = contains;
+ _tmp4__length1 = contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp4_;
+ s_collection_length1 = _tmp4__length1;
+ for (s_it = 0; s_it < _tmp4__length1; s_it = s_it + 1) {
+ gchar* _tmp5_;
+ gchar* s = NULL;
+ _tmp5_ = g_strdup (s_collection[s_it]);
+ s = _tmp5_;
+ {
+ gchar* value = NULL;
+ GeeSortedMap* _tmp6_;
+ const gchar* _tmp7_;
+ gpointer _tmp8_ = NULL;
+ gboolean _tmp9_ = FALSE;
+ const gchar* _tmp10_;
+ const gchar* _tmp11_;
+ GeeSortedMap* _tmp12_;
+ const gchar* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ _tmp6_ = self->priv->submap;
+ _tmp7_ = s;
+ _tmp9_ = gee_map_unset ((GeeMap*) _tmp6_, _tmp7_, &_tmp8_);
+ _g_free0 (value);
+ value = _tmp8_;
+ _vala_assert (_tmp9_, "submap.unset (s, out value)");
+ _tmp10_ = value;
+ _tmp11_ = s;
+ _vala_assert (g_strcmp0 (_tmp10_, _tmp11_) == 0, "value == s");
+ _tmp12_ = self->priv->master;
+ _tmp13_ = s;
+ _tmp14_ = gee_map_has_key ((GeeMap*) _tmp12_, _tmp13_);
+ _vala_assert (!_tmp14_, "!master.has_key (s)");
+ _g_free0 (value);
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp15_ = not_contains;
+ _tmp15__length1 = not_contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp15_;
+ s_collection_length1 = _tmp15__length1;
+ for (s_it = 0; s_it < _tmp15__length1; s_it = s_it + 1) {
+ gchar* _tmp16_;
+ gchar* s = NULL;
+ _tmp16_ = g_strdup (s_collection[s_it]);
+ s = _tmp16_;
+ {
+ GeeSortedMap* _tmp17_;
+ const gchar* _tmp18_;
+ gboolean _tmp19_ = FALSE;
+ GeeSortedMap* _tmp20_;
+ const gchar* _tmp21_;
+ const gchar* _tmp22_;
+ gboolean _tmp23_ = FALSE;
+ _tmp17_ = self->priv->submap;
+ _tmp18_ = s;
+ _tmp19_ = gee_map_unset ((GeeMap*) _tmp17_, _tmp18_, NULL);
+ _vala_assert (!_tmp19_, "!submap.unset (s)");
+ _tmp20_ = self->priv->master;
+ _tmp21_ = s;
+ _tmp22_ = s;
+ _tmp23_ = gee_map_has ((GeeMap*) _tmp20_, _tmp21_, _tmp22_);
+ _vala_assert (_tmp23_, "master.has (s, s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp24_ = self->priv->master;
+ _tmp25_ = gee_map_get_size ((GeeMap*) _tmp24_);
+ _tmp26_ = _tmp25_;
+ _tmp27_ = contains;
+ _tmp27__length1 = contains_length1;
+ _vala_assert (_tmp26_ == (6 - _tmp27__length1), "master.size == 6 - contains.length");
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_clear (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gchar** _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ GeeSortedMap* _tmp4_;
+ gchar** _tmp5_;
+ gint _tmp5__length1;
+ gchar** _tmp10_;
+ gint _tmp10__length1;
+ GeeSortedMap* _tmp19_;
+ gint _tmp20_;
+ gint _tmp21_;
+ gchar** _tmp22_;
+ gint _tmp22__length1;
+ g_return_if_fail (self != NULL);
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp0_;
+ contains_length1 = _tmp1_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp2_;
+ not_contains_length1 = _tmp3_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp4_ = self->priv->submap;
+ gee_map_clear ((GeeMap*) _tmp4_);
+ _tmp5_ = contains;
+ _tmp5__length1 = contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp5_;
+ s_collection_length1 = _tmp5__length1;
+ for (s_it = 0; s_it < _tmp5__length1; s_it = s_it + 1) {
+ gchar* _tmp6_;
+ gchar* s = NULL;
+ _tmp6_ = g_strdup (s_collection[s_it]);
+ s = _tmp6_;
+ {
+ GeeSortedMap* _tmp7_;
+ const gchar* _tmp8_;
+ gboolean _tmp9_ = FALSE;
+ _tmp7_ = self->priv->master;
+ _tmp8_ = s;
+ _tmp9_ = gee_map_has_key ((GeeMap*) _tmp7_, _tmp8_);
+ _vala_assert (!_tmp9_, "!master.has_key (s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp10_ = not_contains;
+ _tmp10__length1 = not_contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp10_;
+ s_collection_length1 = _tmp10__length1;
+ for (s_it = 0; s_it < _tmp10__length1; s_it = s_it + 1) {
+ gchar* _tmp11_;
+ gchar* s = NULL;
+ _tmp11_ = g_strdup (s_collection[s_it]);
+ s = _tmp11_;
+ {
+ GeeSortedMap* _tmp12_;
+ const gchar* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ GeeSortedMap* _tmp15_;
+ const gchar* _tmp16_;
+ const gchar* _tmp17_;
+ gboolean _tmp18_ = FALSE;
+ _tmp12_ = self->priv->submap;
+ _tmp13_ = s;
+ _tmp14_ = gee_map_unset ((GeeMap*) _tmp12_, _tmp13_, NULL);
+ _vala_assert (!_tmp14_, "!submap.unset (s)");
+ _tmp15_ = self->priv->master;
+ _tmp16_ = s;
+ _tmp17_ = s;
+ _tmp18_ = gee_map_has ((GeeMap*) _tmp15_, _tmp16_, _tmp17_);
+ _vala_assert (_tmp18_, "master.has (s, s)");
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp19_ = self->priv->master;
+ _tmp20_ = gee_map_get_size ((GeeMap*) _tmp19_);
+ _tmp21_ = _tmp20_;
+ _tmp22_ = contains;
+ _tmp22__length1 = contains_length1;
+ _vala_assert (_tmp21_ == (6 - _tmp22__length1), "master.size == 6 - contains.length");
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_iterators (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ GeeSortedMap* _tmp0_;
+ GeeMapIterator* _tmp1_ = NULL;
+ GeeMapIterator* _map_iter;
+ GeeMapIterator* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GeeMapIterator* _tmp4_;
+ gboolean _tmp5_ = FALSE;
+ gchar** _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ gint i;
+ GeeSortedMap* _tmp10_;
+ GeeMapIterator* _tmp11_ = NULL;
+ gint _tmp27_;
+ gchar** _tmp28_;
+ gint _tmp28__length1;
+ gint _tmp43_;
+ gchar** _tmp44_;
+ gint _tmp44__length1;
+ gint _tmp63_;
+ gchar** _tmp64_;
+ gint _tmp64__length1;
+ GeeSortedMapTestsSubMapTestsType _tmp65_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_map_map_iterator ((GeeMap*) _tmp0_);
+ _map_iter = _tmp1_;
+ _tmp2_ = _map_iter;
+ _tmp3_ = gee_map_iterator_has_next (_tmp2_);
+ _vala_assert (!_tmp3_, "!_map_iter.has_next ()");
+ _tmp4_ = _map_iter;
+ _tmp5_ = gee_map_iterator_next (_tmp4_);
+ _vala_assert (!_tmp5_, "!_map_iter.next ()");
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp6_;
+ contains_length1 = _tmp7_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp8_;
+ not_contains_length1 = _tmp9_;
+ _not_contains_size_ = not_contains_length1;
+ i = 0;
+ _tmp10_ = self->priv->submap;
+ _tmp11_ = gee_map_map_iterator ((GeeMap*) _tmp10_);
+ _g_object_unref0 (_map_iter);
+ _map_iter = _tmp11_;
+ while (TRUE) {
+ GeeMapIterator* _tmp12_;
+ gboolean _tmp13_ = FALSE;
+ GeeMapIterator* _tmp14_;
+ gpointer _tmp15_ = NULL;
+ gchar* _tmp16_;
+ gchar** _tmp17_;
+ gint _tmp17__length1;
+ gint _tmp18_;
+ const gchar* _tmp19_;
+ GeeMapIterator* _tmp20_;
+ gpointer _tmp21_ = NULL;
+ gchar* _tmp22_;
+ gchar** _tmp23_;
+ gint _tmp23__length1;
+ gint _tmp24_;
+ const gchar* _tmp25_;
+ gint _tmp26_;
+ _tmp12_ = _map_iter;
+ _tmp13_ = gee_map_iterator_next (_tmp12_);
+ if (!_tmp13_) {
+ break;
+ }
+ _tmp14_ = _map_iter;
+ _tmp15_ = gee_map_iterator_get_key (_tmp14_);
+ _tmp16_ = (gchar*) _tmp15_;
+ _tmp17_ = contains;
+ _tmp17__length1 = contains_length1;
+ _tmp18_ = i;
+ _tmp19_ = _tmp17_[_tmp18_];
+ _vala_assert (g_strcmp0 (_tmp16_, _tmp19_) == 0, "_map_iter.get_key () == contains[i]");
+ _g_free0 (_tmp16_);
+ _tmp20_ = _map_iter;
+ _tmp21_ = gee_map_iterator_get_value (_tmp20_);
+ _tmp22_ = (gchar*) _tmp21_;
+ _tmp23_ = contains;
+ _tmp23__length1 = contains_length1;
+ _tmp24_ = i;
+ _tmp25_ = _tmp23_[_tmp24_];
+ _vala_assert (g_strcmp0 (_tmp22_, _tmp25_) == 0, "_map_iter.get_value () == contains[i]");
+ _g_free0 (_tmp22_);
+ _tmp26_ = i;
+ i = _tmp26_ + 1;
+ }
+ _tmp27_ = i;
+ _tmp28_ = contains;
+ _tmp28__length1 = contains_length1;
+ _vala_assert (_tmp27_ == _tmp28__length1, "i == contains.length");
+ i = 0;
+ {
+ GeeSortedMap* _tmp29_;
+ GeeSet* _tmp30_;
+ GeeSet* _tmp31_;
+ GeeSet* _tmp32_;
+ GeeIterator* _tmp33_ = NULL;
+ GeeIterator* _tmp34_;
+ GeeIterator* _k_it;
+ _tmp29_ = self->priv->submap;
+ _tmp30_ = gee_map_get_keys ((GeeMap*) _tmp29_);
+ _tmp31_ = _tmp30_;
+ _tmp32_ = _tmp31_;
+ _tmp33_ = gee_iterable_iterator ((GeeIterable*) _tmp32_);
+ _tmp34_ = _tmp33_;
+ _g_object_unref0 (_tmp32_);
+ _k_it = _tmp34_;
+ while (TRUE) {
+ GeeIterator* _tmp35_;
+ gboolean _tmp36_ = FALSE;
+ GeeIterator* _tmp37_;
+ gpointer _tmp38_ = NULL;
+ gchar* k;
+ const gchar* _tmp39_;
+ gchar** _tmp40_;
+ gint _tmp40__length1;
+ gint _tmp41_;
+ const gchar* _tmp42_;
+ _tmp35_ = _k_it;
+ _tmp36_ = gee_iterator_next (_tmp35_);
+ if (!_tmp36_) {
+ break;
+ }
+ _tmp37_ = _k_it;
+ _tmp38_ = gee_iterator_get (_tmp37_);
+ k = (gchar*) _tmp38_;
+ _tmp39_ = k;
+ _tmp40_ = contains;
+ _tmp40__length1 = contains_length1;
+ _tmp41_ = i;
+ i = _tmp41_ + 1;
+ _tmp42_ = _tmp40_[_tmp41_];
+ _vala_assert (g_strcmp0 (_tmp39_, _tmp42_) == 0, "k == contains[i++]");
+ _g_free0 (k);
+ }
+ _g_object_unref0 (_k_it);
+ }
+ _tmp43_ = i;
+ _tmp44_ = contains;
+ _tmp44__length1 = contains_length1;
+ _vala_assert (_tmp43_ == _tmp44__length1, "i == contains.length");
+ i = 0;
+ {
+ GeeSortedMap* _tmp45_;
+ GeeSet* _tmp46_;
+ GeeSet* _tmp47_;
+ GeeSet* _tmp48_;
+ GeeIterator* _tmp49_ = NULL;
+ GeeIterator* _tmp50_;
+ GeeIterator* _e_it;
+ _tmp45_ = self->priv->submap;
+ _tmp46_ = gee_map_get_entries ((GeeMap*) _tmp45_);
+ _tmp47_ = _tmp46_;
+ _tmp48_ = _tmp47_;
+ _tmp49_ = gee_iterable_iterator ((GeeIterable*) _tmp48_);
+ _tmp50_ = _tmp49_;
+ _g_object_unref0 (_tmp48_);
+ _e_it = _tmp50_;
+ while (TRUE) {
+ GeeIterator* _tmp51_;
+ gboolean _tmp52_ = FALSE;
+ GeeIterator* _tmp53_;
+ gpointer _tmp54_ = NULL;
+ GeeMapEntry* e;
+ GeeMapEntry* _tmp55_;
+ gchar** _tmp56_;
+ gint _tmp56__length1;
+ gint _tmp57_;
+ const gchar* _tmp58_;
+ gchar** _tmp59_;
+ gint _tmp59__length1;
+ gint _tmp60_;
+ const gchar* _tmp61_;
+ gint _tmp62_;
+ _tmp51_ = _e_it;
+ _tmp52_ = gee_iterator_next (_tmp51_);
+ if (!_tmp52_) {
+ break;
+ }
+ _tmp53_ = _e_it;
+ _tmp54_ = gee_iterator_get (_tmp53_);
+ e = (GeeMapEntry*) _tmp54_;
+ _tmp55_ = e;
+ _tmp56_ = contains;
+ _tmp56__length1 = contains_length1;
+ _tmp57_ = i;
+ _tmp58_ = _tmp56_[_tmp57_];
+ _tmp59_ = contains;
+ _tmp59__length1 = contains_length1;
+ _tmp60_ = i;
+ _tmp61_ = _tmp59_[_tmp60_];
+ map_tests_assert_entry (_tmp55_, _tmp58_, _tmp61_);
+ _tmp62_ = i;
+ i = _tmp62_ + 1;
+ _g_object_unref0 (e);
+ }
+ _g_object_unref0 (_e_it);
+ }
+ _tmp63_ = i;
+ _tmp64_ = contains;
+ _tmp64__length1 = contains_length1;
+ _vala_assert (_tmp63_ == _tmp64__length1, "i == contains.length");
+ _tmp65_ = self->priv->type;
+ if (_tmp65_ != GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY) {
+ GeeSortedMap* _tmp66_;
+ GeeMapIterator* _tmp67_ = NULL;
+ GeeMapIterator* map_iter;
+ GeeMapIterator* _tmp68_;
+ gboolean _tmp69_ = FALSE;
+ GeeMapIterator* _tmp70_;
+ gpointer _tmp71_ = NULL;
+ gchar* _tmp72_;
+ gchar** _tmp73_;
+ gint _tmp73__length1;
+ const gchar* _tmp74_;
+ GeeMapIterator* _tmp75_;
+ gpointer _tmp76_ = NULL;
+ gchar* _tmp77_;
+ gchar** _tmp78_;
+ gint _tmp78__length1;
+ const gchar* _tmp79_;
+ GeeMapIterator* _tmp80_;
+ gboolean _tmp81_ = FALSE;
+ GeeMapIterator* _tmp82_;
+ gboolean _tmp83_ = FALSE;
+ GeeMapIterator* _tmp84_;
+ gpointer _tmp85_ = NULL;
+ gchar* _tmp86_;
+ gchar** _tmp87_;
+ gint _tmp87__length1;
+ const gchar* _tmp88_;
+ GeeMapIterator* _tmp89_;
+ gpointer _tmp90_ = NULL;
+ gchar* _tmp91_;
+ gchar** _tmp92_;
+ gint _tmp92__length1;
+ const gchar* _tmp93_;
+ GeeSortedMap* _tmp94_;
+ gchar** _tmp95_ = NULL;
+ gint _tmp96_ = 0;
+ gchar** _tmp97_ = NULL;
+ gint _tmp98_ = 0;
+ GeeSortedMap* _tmp99_;
+ GeeSortedSet* _tmp100_;
+ GeeSortedSet* _tmp101_;
+ GeeSortedSet* _tmp102_;
+ GeeIterator* _tmp103_ = NULL;
+ GeeIterator* _tmp104_;
+ GeeIterator* keys_iter;
+ GeeIterator* _tmp105_;
+ gboolean _tmp106_ = FALSE;
+ GeeIterator* _tmp107_;
+ gboolean _tmp108_ = FALSE;
+ GeeIterator* _tmp109_;
+ gpointer _tmp110_ = NULL;
+ gchar* _tmp111_;
+ gchar** _tmp112_;
+ gint _tmp112__length1;
+ const gchar* _tmp113_;
+ GeeIterator* _tmp114_;
+ gboolean _tmp115_ = FALSE;
+ GeeIterator* _tmp116_;
+ gboolean _tmp117_ = FALSE;
+ GeeIterator* _tmp118_;
+ gpointer _tmp119_ = NULL;
+ gchar* _tmp120_;
+ gchar** _tmp121_;
+ gint _tmp121__length1;
+ const gchar* _tmp122_;
+ GeeSortedMap* _tmp123_;
+ gchar** _tmp124_ = NULL;
+ gint _tmp125_ = 0;
+ gchar** _tmp126_ = NULL;
+ gint _tmp127_ = 0;
+ GeeSortedMap* _tmp128_;
+ GeeSortedSet* _tmp129_;
+ GeeSortedSet* _tmp130_;
+ GeeSortedSet* _tmp131_;
+ GeeIterator* _tmp132_ = NULL;
+ GeeIterator* _tmp133_;
+ GeeIterator* entries_iter;
+ GeeIterator* _tmp134_;
+ gboolean _tmp135_ = FALSE;
+ GeeIterator* _tmp136_;
+ gboolean _tmp137_ = FALSE;
+ GeeIterator* _tmp138_;
+ gpointer _tmp139_ = NULL;
+ GeeMapEntry* _tmp140_;
+ gchar** _tmp141_;
+ gint _tmp141__length1;
+ const gchar* _tmp142_;
+ gchar** _tmp143_;
+ gint _tmp143__length1;
+ const gchar* _tmp144_;
+ GeeIterator* _tmp145_;
+ gboolean _tmp146_ = FALSE;
+ GeeIterator* _tmp147_;
+ gboolean _tmp148_ = FALSE;
+ GeeIterator* _tmp149_;
+ gpointer _tmp150_ = NULL;
+ GeeMapEntry* _tmp151_;
+ gchar** _tmp152_;
+ gint _tmp152__length1;
+ const gchar* _tmp153_;
+ gchar** _tmp154_;
+ gint _tmp154__length1;
+ const gchar* _tmp155_;
+ _tmp66_ = self->priv->submap;
+ _tmp67_ = gee_map_map_iterator ((GeeMap*) _tmp66_);
+ map_iter = _tmp67_;
+ _tmp68_ = map_iter;
+ _tmp69_ = gee_map_iterator_next (_tmp68_);
+ _vala_assert (_tmp69_, "map_iter.next ()");
+ _tmp70_ = map_iter;
+ _tmp71_ = gee_map_iterator_get_key (_tmp70_);
+ _tmp72_ = (gchar*) _tmp71_;
+ _tmp73_ = contains;
+ _tmp73__length1 = contains_length1;
+ _tmp74_ = _tmp73_[0];
+ _vala_assert (g_strcmp0 (_tmp72_, _tmp74_) == 0, "map_iter.get_key () == contains[0]");
+ _g_free0 (_tmp72_);
+ _tmp75_ = map_iter;
+ _tmp76_ = gee_map_iterator_get_value (_tmp75_);
+ _tmp77_ = (gchar*) _tmp76_;
+ _tmp78_ = contains;
+ _tmp78__length1 = contains_length1;
+ _tmp79_ = _tmp78_[0];
+ _vala_assert (g_strcmp0 (_tmp77_, _tmp79_) == 0, "map_iter.get_value () == contains[0]");
+ _g_free0 (_tmp77_);
+ _tmp80_ = map_iter;
+ _tmp81_ = gee_map_iterator_has_next (_tmp80_);
+ _vala_assert (_tmp81_, "map_iter.has_next ()");
+ _tmp82_ = map_iter;
+ _tmp83_ = gee_map_iterator_next (_tmp82_);
+ _vala_assert (_tmp83_, "map_iter.next ()");
+ _tmp84_ = map_iter;
+ _tmp85_ = gee_map_iterator_get_key (_tmp84_);
+ _tmp86_ = (gchar*) _tmp85_;
+ _tmp87_ = contains;
+ _tmp87__length1 = contains_length1;
+ _tmp88_ = _tmp87_[1];
+ _vala_assert (g_strcmp0 (_tmp86_, _tmp88_) == 0, "map_iter.get_key () == contains[1]");
+ _g_free0 (_tmp86_);
+ _tmp89_ = map_iter;
+ _tmp90_ = gee_map_iterator_get_value (_tmp89_);
+ _tmp91_ = (gchar*) _tmp90_;
+ _tmp92_ = contains;
+ _tmp92__length1 = contains_length1;
+ _tmp93_ = _tmp92_[1];
+ _vala_assert (g_strcmp0 (_tmp91_, _tmp93_) == 0, "map_iter.get_value () == contains[1]");
+ _g_free0 (_tmp91_);
+ _tmp94_ = self->priv->master;
+ gee_map_clear ((GeeMap*) _tmp94_);
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp95_, &_tmp96_, &_tmp97_, &_tmp98_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp95_;
+ contains_length1 = _tmp96_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp97_;
+ not_contains_length1 = _tmp98_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp99_ = self->priv->submap;
+ _tmp100_ = gee_sorted_map_get_ascending_keys (_tmp99_);
+ _tmp101_ = _tmp100_;
+ _tmp102_ = _tmp101_;
+ _tmp103_ = gee_iterable_iterator ((GeeIterable*) _tmp102_);
+ _tmp104_ = _tmp103_;
+ _g_object_unref0 (_tmp102_);
+ keys_iter = _tmp104_;
+ _tmp105_ = keys_iter;
+ _tmp106_ = gee_iterator_has_next (_tmp105_);
+ _vala_assert (_tmp106_, "keys_iter.has_next ()");
+ _tmp107_ = keys_iter;
+ _tmp108_ = gee_iterator_next (_tmp107_);
+ _vala_assert (_tmp108_, "keys_iter.next ()");
+ _tmp109_ = keys_iter;
+ _tmp110_ = gee_iterator_get (_tmp109_);
+ _tmp111_ = (gchar*) _tmp110_;
+ _tmp112_ = contains;
+ _tmp112__length1 = contains_length1;
+ _tmp113_ = _tmp112_[0];
+ _vala_assert (g_strcmp0 (_tmp111_, _tmp113_) == 0, "keys_iter.get () == contains[0]");
+ _g_free0 (_tmp111_);
+ _tmp114_ = keys_iter;
+ _tmp115_ = gee_iterator_has_next (_tmp114_);
+ _vala_assert (_tmp115_, "keys_iter.has_next ()");
+ _tmp116_ = keys_iter;
+ _tmp117_ = gee_iterator_next (_tmp116_);
+ _vala_assert (_tmp117_, "keys_iter.next ()");
+ _tmp118_ = keys_iter;
+ _tmp119_ = gee_iterator_get (_tmp118_);
+ _tmp120_ = (gchar*) _tmp119_;
+ _tmp121_ = contains;
+ _tmp121__length1 = contains_length1;
+ _tmp122_ = _tmp121_[1];
+ _vala_assert (g_strcmp0 (_tmp120_, _tmp122_) == 0, "keys_iter.get () == contains[1]");
+ _g_free0 (_tmp120_);
+ _tmp123_ = self->priv->master;
+ gee_map_clear ((GeeMap*) _tmp123_);
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp124_, &_tmp125_, &_tmp126_, &_tmp127_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp124_;
+ contains_length1 = _tmp125_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp126_;
+ not_contains_length1 = _tmp127_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp128_ = self->priv->submap;
+ _tmp129_ = gee_sorted_map_get_ascending_entries (_tmp128_);
+ _tmp130_ = _tmp129_;
+ _tmp131_ = _tmp130_;
+ _tmp132_ = gee_iterable_iterator ((GeeIterable*) _tmp131_);
+ _tmp133_ = _tmp132_;
+ _g_object_unref0 (_tmp131_);
+ entries_iter = _tmp133_;
+ _tmp134_ = entries_iter;
+ _tmp135_ = gee_iterator_has_next (_tmp134_);
+ _vala_assert (_tmp135_, "entries_iter.has_next ()");
+ _tmp136_ = entries_iter;
+ _tmp137_ = gee_iterator_next (_tmp136_);
+ _vala_assert (_tmp137_, "entries_iter.next ()");
+ _tmp138_ = entries_iter;
+ _tmp139_ = gee_iterator_get (_tmp138_);
+ _tmp140_ = (GeeMapEntry*) _tmp139_;
+ _tmp141_ = contains;
+ _tmp141__length1 = contains_length1;
+ _tmp142_ = _tmp141_[0];
+ _tmp143_ = contains;
+ _tmp143__length1 = contains_length1;
+ _tmp144_ = _tmp143_[0];
+ map_tests_assert_entry (_tmp140_, _tmp142_, _tmp144_);
+ _g_object_unref0 (_tmp140_);
+ _tmp145_ = entries_iter;
+ _tmp146_ = gee_iterator_has_next (_tmp145_);
+ _vala_assert (_tmp146_, "entries_iter.has_next ()");
+ _tmp147_ = entries_iter;
+ _tmp148_ = gee_iterator_next (_tmp147_);
+ _vala_assert (_tmp148_, "entries_iter.next ()");
+ _tmp149_ = entries_iter;
+ _tmp150_ = gee_iterator_get (_tmp149_);
+ _tmp151_ = (GeeMapEntry*) _tmp150_;
+ _tmp152_ = contains;
+ _tmp152__length1 = contains_length1;
+ _tmp153_ = _tmp152_[1];
+ _tmp154_ = contains;
+ _tmp154__length1 = contains_length1;
+ _tmp155_ = _tmp154_[1];
+ map_tests_assert_entry (_tmp151_, _tmp153_, _tmp155_);
+ _g_object_unref0 (_tmp151_);
+ _g_object_unref0 (entries_iter);
+ _g_object_unref0 (keys_iter);
+ _g_object_unref0 (map_iter);
+ } else {
+ GeeSortedMap* _tmp156_;
+ GeeSortedSet* _tmp157_;
+ GeeSortedSet* _tmp158_;
+ GeeSortedSet* _tmp159_;
+ GeeIterator* _tmp160_ = NULL;
+ GeeIterator* _tmp161_;
+ GeeIterator* keys_iter;
+ gboolean _tmp162_ = FALSE;
+ _tmp156_ = self->priv->submap;
+ _tmp157_ = gee_sorted_map_get_ascending_keys (_tmp156_);
+ _tmp158_ = _tmp157_;
+ _tmp159_ = _tmp158_;
+ _tmp160_ = gee_iterable_iterator ((GeeIterable*) _tmp159_);
+ _tmp161_ = _tmp160_;
+ _g_object_unref0 (_tmp159_);
+ keys_iter = _tmp161_;
+ _tmp162_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp162_) {
+ GeeIterator* _tmp163_;
+ _tmp163_ = keys_iter;
+ gee_iterator_remove (_tmp163_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _g_object_unref0 (keys_iter);
+ }
+ _g_object_unref0 (_map_iter);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_boundaries (GeeSortedMapTestsSubMapTests* self) {
+ GeeSortedMap* _tmp0_;
+ GeeSortedSet* _tmp1_;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ gchar** _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ GeeSortedMapTestsSubMapTestsType _tmp10_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_sorted_map_get_ascending_keys (_tmp0_);
+ _tmp2_ = _tmp1_;
+ keys = _tmp2_;
+ _tmp3_ = self->priv->submap;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (_tmp3_);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp6_;
+ contains_length1 = _tmp7_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp8_;
+ not_contains_length1 = _tmp9_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp10_ = self->priv->type;
+ switch (_tmp10_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ GeeSortedSet* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ gchar* _tmp13_;
+ GeeSortedSet* _tmp14_;
+ gpointer _tmp15_ = NULL;
+ gchar* _tmp16_;
+ GeeSortedSet* _tmp17_;
+ gpointer _tmp18_ = NULL;
+ GeeMapEntry* _tmp19_;
+ GeeSortedSet* _tmp20_;
+ gpointer _tmp21_ = NULL;
+ GeeMapEntry* _tmp22_;
+ _tmp11_ = keys;
+ _tmp12_ = gee_sorted_set_first (_tmp11_);
+ _tmp13_ = (gchar*) _tmp12_;
+ _vala_assert (g_strcmp0 (_tmp13_, "five") == 0, "keys.first () == \"five\"");
+ _g_free0 (_tmp13_);
+ _tmp14_ = keys;
+ _tmp15_ = gee_sorted_set_last (_tmp14_);
+ _tmp16_ = (gchar*) _tmp15_;
+ _vala_assert (g_strcmp0 (_tmp16_, "four") == 0, "keys.last () == \"four\"");
+ _g_free0 (_tmp16_);
+ _tmp17_ = entries;
+ _tmp18_ = gee_sorted_set_first (_tmp17_);
+ _tmp19_ = (GeeMapEntry*) _tmp18_;
+ map_tests_assert_entry (_tmp19_, "five", "five");
+ _g_object_unref0 (_tmp19_);
+ _tmp20_ = entries;
+ _tmp21_ = gee_sorted_set_last (_tmp20_);
+ _tmp22_ = (GeeMapEntry*) _tmp21_;
+ map_tests_assert_entry (_tmp22_, "four", "four");
+ _g_object_unref0 (_tmp22_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ GeeSortedSet* _tmp23_;
+ gpointer _tmp24_ = NULL;
+ gchar* _tmp25_;
+ GeeSortedSet* _tmp26_;
+ gpointer _tmp27_ = NULL;
+ gchar* _tmp28_;
+ GeeSortedSet* _tmp29_;
+ gpointer _tmp30_ = NULL;
+ GeeMapEntry* _tmp31_;
+ GeeSortedSet* _tmp32_;
+ gpointer _tmp33_ = NULL;
+ GeeMapEntry* _tmp34_;
+ _tmp23_ = keys;
+ _tmp24_ = gee_sorted_set_first (_tmp23_);
+ _tmp25_ = (gchar*) _tmp24_;
+ _vala_assert (g_strcmp0 (_tmp25_, "six") == 0, "keys.first () == \"six\"");
+ _g_free0 (_tmp25_);
+ _tmp26_ = keys;
+ _tmp27_ = gee_sorted_set_last (_tmp26_);
+ _tmp28_ = (gchar*) _tmp27_;
+ _vala_assert (g_strcmp0 (_tmp28_, "two") == 0, "keys.last () == \"two\"");
+ _g_free0 (_tmp28_);
+ _tmp29_ = entries;
+ _tmp30_ = gee_sorted_set_first (_tmp29_);
+ _tmp31_ = (GeeMapEntry*) _tmp30_;
+ map_tests_assert_entry (_tmp31_, "six", "six");
+ _g_object_unref0 (_tmp31_);
+ _tmp32_ = entries;
+ _tmp33_ = gee_sorted_set_last (_tmp32_);
+ _tmp34_ = (GeeMapEntry*) _tmp33_;
+ map_tests_assert_entry (_tmp34_, "two", "two");
+ _g_object_unref0 (_tmp34_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ GeeSortedSet* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ gchar* _tmp37_;
+ GeeSortedSet* _tmp38_;
+ gpointer _tmp39_ = NULL;
+ gchar* _tmp40_;
+ GeeSortedSet* _tmp41_;
+ gpointer _tmp42_ = NULL;
+ GeeMapEntry* _tmp43_;
+ GeeSortedSet* _tmp44_;
+ gpointer _tmp45_ = NULL;
+ GeeMapEntry* _tmp46_;
+ _tmp35_ = keys;
+ _tmp36_ = gee_sorted_set_first (_tmp35_);
+ _tmp37_ = (gchar*) _tmp36_;
+ _vala_assert (g_strcmp0 (_tmp37_, "four") == 0, "keys.first () == \"four\"");
+ _g_free0 (_tmp37_);
+ _tmp38_ = keys;
+ _tmp39_ = gee_sorted_set_last (_tmp38_);
+ _tmp40_ = (gchar*) _tmp39_;
+ _vala_assert (g_strcmp0 (_tmp40_, "six") == 0, "keys.last () == \"six\"");
+ _g_free0 (_tmp40_);
+ _tmp41_ = entries;
+ _tmp42_ = gee_sorted_set_first (_tmp41_);
+ _tmp43_ = (GeeMapEntry*) _tmp42_;
+ map_tests_assert_entry (_tmp43_, "four", "four");
+ _g_object_unref0 (_tmp43_);
+ _tmp44_ = entries;
+ _tmp45_ = gee_sorted_set_last (_tmp44_);
+ _tmp46_ = (GeeMapEntry*) _tmp45_;
+ map_tests_assert_entry (_tmp46_, "six", "six");
+ _g_object_unref0 (_tmp46_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ gboolean _tmp47_ = FALSE;
+ gboolean _tmp51_ = FALSE;
+ gboolean _tmp55_ = FALSE;
+ gboolean _tmp59_ = FALSE;
+ _tmp47_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp47_) {
+ GeeSortedSet* _tmp48_;
+ gpointer _tmp49_ = NULL;
+ gchar* _tmp50_;
+ _tmp48_ = keys;
+ _tmp49_ = gee_sorted_set_first (_tmp48_);
+ _tmp50_ = (gchar*) _tmp49_;
+ _g_free0 (_tmp50_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp51_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp51_) {
+ GeeSortedSet* _tmp52_;
+ gpointer _tmp53_ = NULL;
+ gchar* _tmp54_;
+ _tmp52_ = keys;
+ _tmp53_ = gee_sorted_set_last (_tmp52_);
+ _tmp54_ = (gchar*) _tmp53_;
+ _g_free0 (_tmp54_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp55_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp55_) {
+ GeeSortedSet* _tmp56_;
+ gpointer _tmp57_ = NULL;
+ GeeMapEntry* _tmp58_;
+ _tmp56_ = entries;
+ _tmp57_ = gee_sorted_set_first (_tmp56_);
+ _tmp58_ = (GeeMapEntry*) _tmp57_;
+ _g_object_unref0 (_tmp58_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp59_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp59_) {
+ GeeSortedSet* _tmp60_;
+ gpointer _tmp61_ = NULL;
+ GeeMapEntry* _tmp62_;
+ _tmp60_ = entries;
+ _tmp61_ = gee_sorted_set_last (_tmp60_);
+ _tmp62_ = (GeeMapEntry*) _tmp61_;
+ _g_object_unref0 (_tmp62_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_lower (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ GeeSortedMap* _tmp0_;
+ GeeSortedSet* _tmp1_;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gchar** _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ GeeSortedMapTestsSubMapTestsType _tmp10_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_sorted_map_get_ascending_keys (_tmp0_);
+ _tmp2_ = _tmp1_;
+ keys = _tmp2_;
+ _tmp3_ = self->priv->submap;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (_tmp3_);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp6_;
+ contains_length1 = _tmp7_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp8_;
+ not_contains_length1 = _tmp9_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp10_ = self->priv->type;
+ switch (_tmp10_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ GeeSortedSet* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ gchar* _tmp13_;
+ GeeSortedSet* _tmp14_;
+ GeeMapEntry* _tmp15_ = NULL;
+ GeeMapEntry* _tmp16_;
+ gpointer _tmp17_ = NULL;
+ GeeMapEntry* _tmp18_;
+ GeeSortedSet* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ GeeSortedSet* _tmp22_;
+ GeeMapEntry* _tmp23_ = NULL;
+ GeeMapEntry* _tmp24_;
+ gpointer _tmp25_ = NULL;
+ GeeMapEntry* _tmp26_;
+ GeeSortedSet* _tmp27_;
+ gpointer _tmp28_ = NULL;
+ gchar* _tmp29_;
+ GeeSortedSet* _tmp30_;
+ GeeMapEntry* _tmp31_ = NULL;
+ GeeMapEntry* _tmp32_;
+ gpointer _tmp33_ = NULL;
+ GeeMapEntry* _tmp34_;
+ GeeSortedSet* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ gchar* _tmp37_;
+ GeeSortedSet* _tmp38_;
+ GeeMapEntry* _tmp39_ = NULL;
+ GeeMapEntry* _tmp40_;
+ gpointer _tmp41_ = NULL;
+ GeeMapEntry* _tmp42_;
+ _tmp11_ = keys;
+ _tmp12_ = gee_sorted_set_lower (_tmp11_, "a");
+ _tmp13_ = (gchar*) _tmp12_;
+ _vala_assert (_tmp13_ == NULL, "keys.lower (\"a\") == null");
+ _g_free0 (_tmp13_);
+ _tmp14_ = entries;
+ _tmp15_ = map_tests_entry_for ("a", "a");
+ _tmp16_ = _tmp15_;
+ _tmp17_ = gee_sorted_set_lower (_tmp14_, _tmp16_);
+ _tmp18_ = (GeeMapEntry*) _tmp17_;
+ _vala_assert (_tmp18_ == NULL, "entries.lower (MapTests.entry_for (\"a\", \"a\")) == null");
+ _g_object_unref0 (_tmp18_);
+ _g_object_unref0 (_tmp16_);
+ _tmp19_ = keys;
+ _tmp20_ = gee_sorted_set_lower (_tmp19_, "five");
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (_tmp21_ == NULL, "keys.lower (\"five\") == null");
+ _g_free0 (_tmp21_);
+ _tmp22_ = entries;
+ _tmp23_ = map_tests_entry_for ("five", "five");
+ _tmp24_ = _tmp23_;
+ _tmp25_ = gee_sorted_set_lower (_tmp22_, _tmp24_);
+ _tmp26_ = (GeeMapEntry*) _tmp25_;
+ _vala_assert (_tmp26_ == NULL, "entries.lower (MapTests.entry_for (\"five\", \"five\")) == null");
+ _g_object_unref0 (_tmp26_);
+ _g_object_unref0 (_tmp24_);
+ _tmp27_ = keys;
+ _tmp28_ = gee_sorted_set_lower (_tmp27_, "four");
+ _tmp29_ = (gchar*) _tmp28_;
+ _vala_assert (g_strcmp0 (_tmp29_, "five") == 0, "keys.lower (\"four\") == \"five\"");
+ _g_free0 (_tmp29_);
+ _tmp30_ = entries;
+ _tmp31_ = map_tests_entry_for ("four", "four");
+ _tmp32_ = _tmp31_;
+ _tmp33_ = gee_sorted_set_lower (_tmp30_, _tmp32_);
+ _tmp34_ = (GeeMapEntry*) _tmp33_;
+ map_tests_assert_entry (_tmp34_, "five", "five");
+ _g_object_unref0 (_tmp34_);
+ _g_object_unref0 (_tmp32_);
+ _tmp35_ = keys;
+ _tmp36_ = gee_sorted_set_lower (_tmp35_, "six");
+ _tmp37_ = (gchar*) _tmp36_;
+ _vala_assert (g_strcmp0 (_tmp37_, "four") == 0, "keys.lower (\"six\") == \"four\"");
+ _g_free0 (_tmp37_);
+ _tmp38_ = entries;
+ _tmp39_ = map_tests_entry_for ("six", "six");
+ _tmp40_ = _tmp39_;
+ _tmp41_ = gee_sorted_set_lower (_tmp38_, _tmp40_);
+ _tmp42_ = (GeeMapEntry*) _tmp41_;
+ map_tests_assert_entry (_tmp42_, "four", "four");
+ _g_object_unref0 (_tmp42_);
+ _g_object_unref0 (_tmp40_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ GeeSortedSet* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gchar* _tmp45_;
+ GeeSortedSet* _tmp46_;
+ GeeMapEntry* _tmp47_ = NULL;
+ GeeMapEntry* _tmp48_;
+ gpointer _tmp49_ = NULL;
+ GeeMapEntry* _tmp50_;
+ GeeSortedSet* _tmp51_;
+ gpointer _tmp52_ = NULL;
+ gchar* _tmp53_;
+ GeeSortedSet* _tmp54_;
+ GeeMapEntry* _tmp55_ = NULL;
+ GeeMapEntry* _tmp56_;
+ gpointer _tmp57_ = NULL;
+ GeeMapEntry* _tmp58_;
+ GeeSortedSet* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ gchar* _tmp61_;
+ GeeSortedSet* _tmp62_;
+ GeeMapEntry* _tmp63_ = NULL;
+ GeeMapEntry* _tmp64_;
+ gpointer _tmp65_ = NULL;
+ GeeMapEntry* _tmp66_;
+ GeeSortedSet* _tmp67_;
+ gpointer _tmp68_ = NULL;
+ gchar* _tmp69_;
+ GeeSortedSet* _tmp70_;
+ GeeMapEntry* _tmp71_ = NULL;
+ GeeMapEntry* _tmp72_;
+ gpointer _tmp73_ = NULL;
+ GeeMapEntry* _tmp74_;
+ GeeSortedSet* _tmp75_;
+ gpointer _tmp76_ = NULL;
+ gchar* _tmp77_;
+ GeeSortedSet* _tmp78_;
+ GeeMapEntry* _tmp79_ = NULL;
+ GeeMapEntry* _tmp80_;
+ gpointer _tmp81_ = NULL;
+ GeeMapEntry* _tmp82_;
+ _tmp43_ = keys;
+ _tmp44_ = gee_sorted_set_lower (_tmp43_, "one");
+ _tmp45_ = (gchar*) _tmp44_;
+ _vala_assert (_tmp45_ == NULL, "keys.lower (\"one\") == null");
+ _g_free0 (_tmp45_);
+ _tmp46_ = entries;
+ _tmp47_ = map_tests_entry_for ("one", "one");
+ _tmp48_ = _tmp47_;
+ _tmp49_ = gee_sorted_set_lower (_tmp46_, _tmp48_);
+ _tmp50_ = (GeeMapEntry*) _tmp49_;
+ _vala_assert (_tmp50_ == NULL, "entries.lower (MapTests.entry_for (\"one\", \"one\")) == null");
+ _g_object_unref0 (_tmp50_);
+ _g_object_unref0 (_tmp48_);
+ _tmp51_ = keys;
+ _tmp52_ = gee_sorted_set_lower (_tmp51_, "six");
+ _tmp53_ = (gchar*) _tmp52_;
+ _vala_assert (_tmp53_ == NULL, "keys.lower (\"six\") == null");
+ _g_free0 (_tmp53_);
+ _tmp54_ = entries;
+ _tmp55_ = map_tests_entry_for ("six", "six");
+ _tmp56_ = _tmp55_;
+ _tmp57_ = gee_sorted_set_lower (_tmp54_, _tmp56_);
+ _tmp58_ = (GeeMapEntry*) _tmp57_;
+ _vala_assert (_tmp58_ == NULL, "entries.lower (MapTests.entry_for (\"six\", \"six\")) == null");
+ _g_object_unref0 (_tmp58_);
+ _g_object_unref0 (_tmp56_);
+ _tmp59_ = keys;
+ _tmp60_ = gee_sorted_set_lower (_tmp59_, "three");
+ _tmp61_ = (gchar*) _tmp60_;
+ _vala_assert (g_strcmp0 (_tmp61_, "six") == 0, "keys.lower (\"three\") == \"six\"");
+ _g_free0 (_tmp61_);
+ _tmp62_ = entries;
+ _tmp63_ = map_tests_entry_for ("three", "three");
+ _tmp64_ = _tmp63_;
+ _tmp65_ = gee_sorted_set_lower (_tmp62_, _tmp64_);
+ _tmp66_ = (GeeMapEntry*) _tmp65_;
+ map_tests_assert_entry (_tmp66_, "six", "six");
+ _g_object_unref0 (_tmp66_);
+ _g_object_unref0 (_tmp64_);
+ _tmp67_ = keys;
+ _tmp68_ = gee_sorted_set_lower (_tmp67_, "two");
+ _tmp69_ = (gchar*) _tmp68_;
+ _vala_assert (g_strcmp0 (_tmp69_, "three") == 0, "keys.lower (\"two\") == \"three\"");
+ _g_free0 (_tmp69_);
+ _tmp70_ = entries;
+ _tmp71_ = map_tests_entry_for ("two", "two");
+ _tmp72_ = _tmp71_;
+ _tmp73_ = gee_sorted_set_lower (_tmp70_, _tmp72_);
+ _tmp74_ = (GeeMapEntry*) _tmp73_;
+ map_tests_assert_entry (_tmp74_, "three", "three");
+ _g_object_unref0 (_tmp74_);
+ _g_object_unref0 (_tmp72_);
+ _tmp75_ = keys;
+ _tmp76_ = gee_sorted_set_lower (_tmp75_, "z");
+ _tmp77_ = (gchar*) _tmp76_;
+ _vala_assert (g_strcmp0 (_tmp77_, "two") == 0, "keys.lower (\"z\") == \"two\"");
+ _g_free0 (_tmp77_);
+ _tmp78_ = entries;
+ _tmp79_ = map_tests_entry_for ("z", "z");
+ _tmp80_ = _tmp79_;
+ _tmp81_ = gee_sorted_set_lower (_tmp78_, _tmp80_);
+ _tmp82_ = (GeeMapEntry*) _tmp81_;
+ map_tests_assert_entry (_tmp82_, "two", "two");
+ _g_object_unref0 (_tmp82_);
+ _g_object_unref0 (_tmp80_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ GeeSortedSet* _tmp83_;
+ gpointer _tmp84_ = NULL;
+ gchar* _tmp85_;
+ GeeSortedSet* _tmp86_;
+ GeeMapEntry* _tmp87_ = NULL;
+ GeeMapEntry* _tmp88_;
+ gpointer _tmp89_ = NULL;
+ GeeMapEntry* _tmp90_;
+ GeeSortedSet* _tmp91_;
+ gpointer _tmp92_ = NULL;
+ gchar* _tmp93_;
+ GeeSortedSet* _tmp94_;
+ GeeMapEntry* _tmp95_ = NULL;
+ GeeMapEntry* _tmp96_;
+ gpointer _tmp97_ = NULL;
+ GeeMapEntry* _tmp98_;
+ GeeSortedSet* _tmp99_;
+ gpointer _tmp100_ = NULL;
+ gchar* _tmp101_;
+ GeeSortedSet* _tmp102_;
+ GeeMapEntry* _tmp103_ = NULL;
+ GeeMapEntry* _tmp104_;
+ gpointer _tmp105_ = NULL;
+ GeeMapEntry* _tmp106_;
+ GeeSortedSet* _tmp107_;
+ gpointer _tmp108_ = NULL;
+ gchar* _tmp109_;
+ GeeSortedSet* _tmp110_;
+ GeeMapEntry* _tmp111_ = NULL;
+ GeeMapEntry* _tmp112_;
+ gpointer _tmp113_ = NULL;
+ GeeMapEntry* _tmp114_;
+ GeeSortedSet* _tmp115_;
+ gpointer _tmp116_ = NULL;
+ gchar* _tmp117_;
+ GeeSortedSet* _tmp118_;
+ GeeMapEntry* _tmp119_ = NULL;
+ GeeMapEntry* _tmp120_;
+ gpointer _tmp121_ = NULL;
+ GeeMapEntry* _tmp122_;
+ _tmp83_ = keys;
+ _tmp84_ = gee_sorted_set_lower (_tmp83_, "five");
+ _tmp85_ = (gchar*) _tmp84_;
+ _vala_assert (_tmp85_ == NULL, "keys.lower (\"five\") == null");
+ _g_free0 (_tmp85_);
+ _tmp86_ = entries;
+ _tmp87_ = map_tests_entry_for ("five", "five");
+ _tmp88_ = _tmp87_;
+ _tmp89_ = gee_sorted_set_lower (_tmp86_, _tmp88_);
+ _tmp90_ = (GeeMapEntry*) _tmp89_;
+ _vala_assert (_tmp90_ == NULL, "entries.lower (MapTests.entry_for (\"five\", \"five\")) == null");
+ _g_object_unref0 (_tmp90_);
+ _g_object_unref0 (_tmp88_);
+ _tmp91_ = keys;
+ _tmp92_ = gee_sorted_set_lower (_tmp91_, "four");
+ _tmp93_ = (gchar*) _tmp92_;
+ _vala_assert (_tmp93_ == NULL, "keys.lower (\"four\") == null");
+ _g_free0 (_tmp93_);
+ _tmp94_ = entries;
+ _tmp95_ = map_tests_entry_for ("four", "four");
+ _tmp96_ = _tmp95_;
+ _tmp97_ = gee_sorted_set_lower (_tmp94_, _tmp96_);
+ _tmp98_ = (GeeMapEntry*) _tmp97_;
+ _vala_assert (_tmp98_ == NULL, "entries.lower (MapTests.entry_for (\"four\", \"four\")) == null");
+ _g_object_unref0 (_tmp98_);
+ _g_object_unref0 (_tmp96_);
+ _tmp99_ = keys;
+ _tmp100_ = gee_sorted_set_lower (_tmp99_, "one");
+ _tmp101_ = (gchar*) _tmp100_;
+ _vala_assert (g_strcmp0 (_tmp101_, "four") == 0, "keys.lower (\"one\") == \"four\"");
+ _g_free0 (_tmp101_);
+ _tmp102_ = entries;
+ _tmp103_ = map_tests_entry_for ("one", "one");
+ _tmp104_ = _tmp103_;
+ _tmp105_ = gee_sorted_set_lower (_tmp102_, _tmp104_);
+ _tmp106_ = (GeeMapEntry*) _tmp105_;
+ map_tests_assert_entry (_tmp106_, "four", "four");
+ _g_object_unref0 (_tmp106_);
+ _g_object_unref0 (_tmp104_);
+ _tmp107_ = keys;
+ _tmp108_ = gee_sorted_set_lower (_tmp107_, "six");
+ _tmp109_ = (gchar*) _tmp108_;
+ _vala_assert (g_strcmp0 (_tmp109_, "one") == 0, "keys.lower (\"six\") == \"one\"");
+ _g_free0 (_tmp109_);
+ _tmp110_ = entries;
+ _tmp111_ = map_tests_entry_for ("six", "six");
+ _tmp112_ = _tmp111_;
+ _tmp113_ = gee_sorted_set_lower (_tmp110_, _tmp112_);
+ _tmp114_ = (GeeMapEntry*) _tmp113_;
+ map_tests_assert_entry (_tmp114_, "one", "one");
+ _g_object_unref0 (_tmp114_);
+ _g_object_unref0 (_tmp112_);
+ _tmp115_ = keys;
+ _tmp116_ = gee_sorted_set_lower (_tmp115_, "three");
+ _tmp117_ = (gchar*) _tmp116_;
+ _vala_assert (g_strcmp0 (_tmp117_, "six") == 0, "keys.lower (\"three\") == \"six\"");
+ _g_free0 (_tmp117_);
+ _tmp118_ = entries;
+ _tmp119_ = map_tests_entry_for ("three", "three");
+ _tmp120_ = _tmp119_;
+ _tmp121_ = gee_sorted_set_lower (_tmp118_, _tmp120_);
+ _tmp122_ = (GeeMapEntry*) _tmp121_;
+ map_tests_assert_entry (_tmp122_, "six", "six");
+ _g_object_unref0 (_tmp122_);
+ _g_object_unref0 (_tmp120_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ GeeSortedSet* _tmp123_;
+ gpointer _tmp124_ = NULL;
+ gchar* _tmp125_;
+ GeeSortedSet* _tmp126_;
+ GeeMapEntry* _tmp127_ = NULL;
+ GeeMapEntry* _tmp128_;
+ gpointer _tmp129_ = NULL;
+ GeeMapEntry* _tmp130_;
+ _tmp123_ = keys;
+ _tmp124_ = gee_sorted_set_lower (_tmp123_, "six");
+ _tmp125_ = (gchar*) _tmp124_;
+ _vala_assert (_tmp125_ == NULL, "keys.lower (\"six\") == null");
+ _g_free0 (_tmp125_);
+ _tmp126_ = entries;
+ _tmp127_ = map_tests_entry_for ("six", "six");
+ _tmp128_ = _tmp127_;
+ _tmp129_ = gee_sorted_set_lower (_tmp126_, _tmp128_);
+ _tmp130_ = (GeeMapEntry*) _tmp129_;
+ _vala_assert (_tmp130_ == NULL, "entries.lower (MapTests.entry_for (\"six\", \"six\")) == null");
+ _g_object_unref0 (_tmp130_);
+ _g_object_unref0 (_tmp128_);
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_higher (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ GeeSortedMap* _tmp0_;
+ GeeSortedSet* _tmp1_;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gchar** _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ GeeSortedMapTestsSubMapTestsType _tmp10_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_sorted_map_get_ascending_keys (_tmp0_);
+ _tmp2_ = _tmp1_;
+ keys = _tmp2_;
+ _tmp3_ = self->priv->submap;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (_tmp3_);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp6_;
+ contains_length1 = _tmp7_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp8_;
+ not_contains_length1 = _tmp9_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp10_ = self->priv->type;
+ switch (_tmp10_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ GeeSortedSet* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ gchar* _tmp13_;
+ GeeSortedSet* _tmp14_;
+ GeeMapEntry* _tmp15_ = NULL;
+ GeeMapEntry* _tmp16_;
+ gpointer _tmp17_ = NULL;
+ GeeMapEntry* _tmp18_;
+ GeeSortedSet* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ GeeSortedSet* _tmp22_;
+ GeeMapEntry* _tmp23_ = NULL;
+ GeeMapEntry* _tmp24_;
+ gpointer _tmp25_ = NULL;
+ GeeMapEntry* _tmp26_;
+ GeeSortedSet* _tmp27_;
+ gpointer _tmp28_ = NULL;
+ gchar* _tmp29_;
+ GeeSortedSet* _tmp30_;
+ GeeMapEntry* _tmp31_ = NULL;
+ GeeMapEntry* _tmp32_;
+ gpointer _tmp33_ = NULL;
+ GeeMapEntry* _tmp34_;
+ GeeSortedSet* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ gchar* _tmp37_;
+ GeeSortedSet* _tmp38_;
+ GeeMapEntry* _tmp39_ = NULL;
+ GeeMapEntry* _tmp40_;
+ gpointer _tmp41_ = NULL;
+ GeeMapEntry* _tmp42_;
+ _tmp11_ = keys;
+ _tmp12_ = gee_sorted_set_higher (_tmp11_, "a");
+ _tmp13_ = (gchar*) _tmp12_;
+ _vala_assert (g_strcmp0 (_tmp13_, "five") == 0, "keys.higher (\"a\") == \"five\"");
+ _g_free0 (_tmp13_);
+ _tmp14_ = entries;
+ _tmp15_ = map_tests_entry_for ("a", "a");
+ _tmp16_ = _tmp15_;
+ _tmp17_ = gee_sorted_set_higher (_tmp14_, _tmp16_);
+ _tmp18_ = (GeeMapEntry*) _tmp17_;
+ map_tests_assert_entry (_tmp18_, "five", "five");
+ _g_object_unref0 (_tmp18_);
+ _g_object_unref0 (_tmp16_);
+ _tmp19_ = keys;
+ _tmp20_ = gee_sorted_set_higher (_tmp19_, "five");
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "four") == 0, "keys.higher (\"five\") == \"four\"");
+ _g_free0 (_tmp21_);
+ _tmp22_ = entries;
+ _tmp23_ = map_tests_entry_for ("five", "five");
+ _tmp24_ = _tmp23_;
+ _tmp25_ = gee_sorted_set_higher (_tmp22_, _tmp24_);
+ _tmp26_ = (GeeMapEntry*) _tmp25_;
+ map_tests_assert_entry (_tmp26_, "four", "four");
+ _g_object_unref0 (_tmp26_);
+ _g_object_unref0 (_tmp24_);
+ _tmp27_ = keys;
+ _tmp28_ = gee_sorted_set_higher (_tmp27_, "four");
+ _tmp29_ = (gchar*) _tmp28_;
+ _vala_assert (_tmp29_ == NULL, "keys.higher (\"four\") == null");
+ _g_free0 (_tmp29_);
+ _tmp30_ = entries;
+ _tmp31_ = map_tests_entry_for ("four", "four");
+ _tmp32_ = _tmp31_;
+ _tmp33_ = gee_sorted_set_higher (_tmp30_, _tmp32_);
+ _tmp34_ = (GeeMapEntry*) _tmp33_;
+ _vala_assert (_tmp34_ == NULL, "entries.higher (MapTests.entry_for (\"four\", \"four\")) == null");
+ _g_object_unref0 (_tmp34_);
+ _g_object_unref0 (_tmp32_);
+ _tmp35_ = keys;
+ _tmp36_ = gee_sorted_set_higher (_tmp35_, "six");
+ _tmp37_ = (gchar*) _tmp36_;
+ _vala_assert (_tmp37_ == NULL, "keys.higher (\"six\") == null");
+ _g_free0 (_tmp37_);
+ _tmp38_ = entries;
+ _tmp39_ = map_tests_entry_for ("six", "six");
+ _tmp40_ = _tmp39_;
+ _tmp41_ = gee_sorted_set_higher (_tmp38_, _tmp40_);
+ _tmp42_ = (GeeMapEntry*) _tmp41_;
+ _vala_assert (_tmp42_ == NULL, "entries.higher (MapTests.entry_for (\"six\", \"six\")) == null");
+ _g_object_unref0 (_tmp42_);
+ _g_object_unref0 (_tmp40_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ GeeSortedSet* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gchar* _tmp45_;
+ GeeSortedSet* _tmp46_;
+ GeeMapEntry* _tmp47_ = NULL;
+ GeeMapEntry* _tmp48_;
+ gpointer _tmp49_ = NULL;
+ GeeMapEntry* _tmp50_;
+ GeeSortedSet* _tmp51_;
+ gpointer _tmp52_ = NULL;
+ gchar* _tmp53_;
+ GeeSortedSet* _tmp54_;
+ GeeMapEntry* _tmp55_ = NULL;
+ GeeMapEntry* _tmp56_;
+ gpointer _tmp57_ = NULL;
+ GeeMapEntry* _tmp58_;
+ GeeSortedSet* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ gchar* _tmp61_;
+ GeeSortedSet* _tmp62_;
+ GeeMapEntry* _tmp63_ = NULL;
+ GeeMapEntry* _tmp64_;
+ gpointer _tmp65_ = NULL;
+ GeeMapEntry* _tmp66_;
+ GeeSortedSet* _tmp67_;
+ gpointer _tmp68_ = NULL;
+ gchar* _tmp69_;
+ GeeSortedSet* _tmp70_;
+ GeeMapEntry* _tmp71_ = NULL;
+ GeeMapEntry* _tmp72_;
+ gpointer _tmp73_ = NULL;
+ GeeMapEntry* _tmp74_;
+ GeeSortedSet* _tmp75_;
+ gpointer _tmp76_ = NULL;
+ gchar* _tmp77_;
+ GeeSortedSet* _tmp78_;
+ GeeMapEntry* _tmp79_ = NULL;
+ GeeMapEntry* _tmp80_;
+ gpointer _tmp81_ = NULL;
+ GeeMapEntry* _tmp82_;
+ _tmp43_ = keys;
+ _tmp44_ = gee_sorted_set_higher (_tmp43_, "one");
+ _tmp45_ = (gchar*) _tmp44_;
+ _vala_assert (g_strcmp0 (_tmp45_, "six") == 0, "keys.higher (\"one\") == \"six\"");
+ _g_free0 (_tmp45_);
+ _tmp46_ = entries;
+ _tmp47_ = map_tests_entry_for ("one", "one");
+ _tmp48_ = _tmp47_;
+ _tmp49_ = gee_sorted_set_higher (_tmp46_, _tmp48_);
+ _tmp50_ = (GeeMapEntry*) _tmp49_;
+ map_tests_assert_entry (_tmp50_, "six", "six");
+ _g_object_unref0 (_tmp50_);
+ _g_object_unref0 (_tmp48_);
+ _tmp51_ = keys;
+ _tmp52_ = gee_sorted_set_higher (_tmp51_, "six");
+ _tmp53_ = (gchar*) _tmp52_;
+ _vala_assert (g_strcmp0 (_tmp53_, "three") == 0, "keys.higher (\"six\") == \"three\"");
+ _g_free0 (_tmp53_);
+ _tmp54_ = entries;
+ _tmp55_ = map_tests_entry_for ("six", "six");
+ _tmp56_ = _tmp55_;
+ _tmp57_ = gee_sorted_set_higher (_tmp54_, _tmp56_);
+ _tmp58_ = (GeeMapEntry*) _tmp57_;
+ map_tests_assert_entry (_tmp58_, "three", "three");
+ _g_object_unref0 (_tmp58_);
+ _g_object_unref0 (_tmp56_);
+ _tmp59_ = keys;
+ _tmp60_ = gee_sorted_set_higher (_tmp59_, "three");
+ _tmp61_ = (gchar*) _tmp60_;
+ _vala_assert (g_strcmp0 (_tmp61_, "two") == 0, "keys.higher (\"three\") == \"two\"");
+ _g_free0 (_tmp61_);
+ _tmp62_ = entries;
+ _tmp63_ = map_tests_entry_for ("three", "three");
+ _tmp64_ = _tmp63_;
+ _tmp65_ = gee_sorted_set_higher (_tmp62_, _tmp64_);
+ _tmp66_ = (GeeMapEntry*) _tmp65_;
+ map_tests_assert_entry (_tmp66_, "two", "two");
+ _g_object_unref0 (_tmp66_);
+ _g_object_unref0 (_tmp64_);
+ _tmp67_ = keys;
+ _tmp68_ = gee_sorted_set_higher (_tmp67_, "two");
+ _tmp69_ = (gchar*) _tmp68_;
+ _vala_assert (_tmp69_ == NULL, "keys.higher (\"two\") == null");
+ _g_free0 (_tmp69_);
+ _tmp70_ = entries;
+ _tmp71_ = map_tests_entry_for ("two", "two");
+ _tmp72_ = _tmp71_;
+ _tmp73_ = gee_sorted_set_higher (_tmp70_, _tmp72_);
+ _tmp74_ = (GeeMapEntry*) _tmp73_;
+ _vala_assert (_tmp74_ == NULL, "entries.higher (MapTests.entry_for (\"two\", \"two\")) == null");
+ _g_object_unref0 (_tmp74_);
+ _g_object_unref0 (_tmp72_);
+ _tmp75_ = keys;
+ _tmp76_ = gee_sorted_set_higher (_tmp75_, "z");
+ _tmp77_ = (gchar*) _tmp76_;
+ _vala_assert (_tmp77_ == NULL, "keys.higher (\"z\") == null");
+ _g_free0 (_tmp77_);
+ _tmp78_ = entries;
+ _tmp79_ = map_tests_entry_for ("z", "z");
+ _tmp80_ = _tmp79_;
+ _tmp81_ = gee_sorted_set_higher (_tmp78_, _tmp80_);
+ _tmp82_ = (GeeMapEntry*) _tmp81_;
+ _vala_assert (_tmp82_ == NULL, "entries.higher (MapTests.entry_for (\"z\", \"z\")) == null");
+ _g_object_unref0 (_tmp82_);
+ _g_object_unref0 (_tmp80_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ GeeSortedSet* _tmp83_;
+ gpointer _tmp84_ = NULL;
+ gchar* _tmp85_;
+ GeeSortedSet* _tmp86_;
+ GeeMapEntry* _tmp87_ = NULL;
+ GeeMapEntry* _tmp88_;
+ gpointer _tmp89_ = NULL;
+ GeeMapEntry* _tmp90_;
+ GeeSortedSet* _tmp91_;
+ gpointer _tmp92_ = NULL;
+ gchar* _tmp93_;
+ GeeSortedSet* _tmp94_;
+ GeeMapEntry* _tmp95_ = NULL;
+ GeeMapEntry* _tmp96_;
+ gpointer _tmp97_ = NULL;
+ GeeMapEntry* _tmp98_;
+ GeeSortedSet* _tmp99_;
+ gpointer _tmp100_ = NULL;
+ gchar* _tmp101_;
+ GeeSortedSet* _tmp102_;
+ GeeMapEntry* _tmp103_ = NULL;
+ GeeMapEntry* _tmp104_;
+ gpointer _tmp105_ = NULL;
+ GeeMapEntry* _tmp106_;
+ GeeSortedSet* _tmp107_;
+ gpointer _tmp108_ = NULL;
+ gchar* _tmp109_;
+ GeeSortedSet* _tmp110_;
+ GeeMapEntry* _tmp111_ = NULL;
+ GeeMapEntry* _tmp112_;
+ gpointer _tmp113_ = NULL;
+ GeeMapEntry* _tmp114_;
+ GeeSortedSet* _tmp115_;
+ gpointer _tmp116_ = NULL;
+ gchar* _tmp117_;
+ GeeSortedSet* _tmp118_;
+ GeeMapEntry* _tmp119_ = NULL;
+ GeeMapEntry* _tmp120_;
+ gpointer _tmp121_ = NULL;
+ GeeMapEntry* _tmp122_;
+ _tmp83_ = keys;
+ _tmp84_ = gee_sorted_set_higher (_tmp83_, "five");
+ _tmp85_ = (gchar*) _tmp84_;
+ _vala_assert (g_strcmp0 (_tmp85_, "four") == 0, "keys.higher (\"five\") == \"four\"");
+ _g_free0 (_tmp85_);
+ _tmp86_ = entries;
+ _tmp87_ = map_tests_entry_for ("five", "five");
+ _tmp88_ = _tmp87_;
+ _tmp89_ = gee_sorted_set_higher (_tmp86_, _tmp88_);
+ _tmp90_ = (GeeMapEntry*) _tmp89_;
+ map_tests_assert_entry (_tmp90_, "four", "four");
+ _g_object_unref0 (_tmp90_);
+ _g_object_unref0 (_tmp88_);
+ _tmp91_ = keys;
+ _tmp92_ = gee_sorted_set_higher (_tmp91_, "four");
+ _tmp93_ = (gchar*) _tmp92_;
+ _vala_assert (g_strcmp0 (_tmp93_, "one") == 0, "keys.higher (\"four\") == \"one\"");
+ _g_free0 (_tmp93_);
+ _tmp94_ = entries;
+ _tmp95_ = map_tests_entry_for ("four", "four");
+ _tmp96_ = _tmp95_;
+ _tmp97_ = gee_sorted_set_higher (_tmp94_, _tmp96_);
+ _tmp98_ = (GeeMapEntry*) _tmp97_;
+ map_tests_assert_entry (_tmp98_, "one", "one");
+ _g_object_unref0 (_tmp98_);
+ _g_object_unref0 (_tmp96_);
+ _tmp99_ = keys;
+ _tmp100_ = gee_sorted_set_higher (_tmp99_, "one");
+ _tmp101_ = (gchar*) _tmp100_;
+ _vala_assert (g_strcmp0 (_tmp101_, "six") == 0, "keys.higher (\"one\") == \"six\"");
+ _g_free0 (_tmp101_);
+ _tmp102_ = entries;
+ _tmp103_ = map_tests_entry_for ("one", "one");
+ _tmp104_ = _tmp103_;
+ _tmp105_ = gee_sorted_set_higher (_tmp102_, _tmp104_);
+ _tmp106_ = (GeeMapEntry*) _tmp105_;
+ map_tests_assert_entry (_tmp106_, "six", "six");
+ _g_object_unref0 (_tmp106_);
+ _g_object_unref0 (_tmp104_);
+ _tmp107_ = keys;
+ _tmp108_ = gee_sorted_set_higher (_tmp107_, "six");
+ _tmp109_ = (gchar*) _tmp108_;
+ _vala_assert (_tmp109_ == NULL, "keys.higher (\"six\") == null");
+ _g_free0 (_tmp109_);
+ _tmp110_ = entries;
+ _tmp111_ = map_tests_entry_for ("six", "six");
+ _tmp112_ = _tmp111_;
+ _tmp113_ = gee_sorted_set_higher (_tmp110_, _tmp112_);
+ _tmp114_ = (GeeMapEntry*) _tmp113_;
+ _vala_assert (_tmp114_ == NULL, "entries.higher (MapTests.entry_for (\"six\", \"six\")) == null");
+ _g_object_unref0 (_tmp114_);
+ _g_object_unref0 (_tmp112_);
+ _tmp115_ = keys;
+ _tmp116_ = gee_sorted_set_higher (_tmp115_, "three");
+ _tmp117_ = (gchar*) _tmp116_;
+ _vala_assert (_tmp117_ == NULL, "keys.higher (\"three\") == null");
+ _g_free0 (_tmp117_);
+ _tmp118_ = entries;
+ _tmp119_ = map_tests_entry_for ("three", "three");
+ _tmp120_ = _tmp119_;
+ _tmp121_ = gee_sorted_set_higher (_tmp118_, _tmp120_);
+ _tmp122_ = (GeeMapEntry*) _tmp121_;
+ _vala_assert (_tmp122_ == NULL, "entries.higher (MapTests.entry_for (\"three\", \"three\")) == null");
+ _g_object_unref0 (_tmp122_);
+ _g_object_unref0 (_tmp120_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ GeeSortedSet* _tmp123_;
+ gpointer _tmp124_ = NULL;
+ gchar* _tmp125_;
+ GeeSortedSet* _tmp126_;
+ GeeMapEntry* _tmp127_ = NULL;
+ GeeMapEntry* _tmp128_;
+ gpointer _tmp129_ = NULL;
+ GeeMapEntry* _tmp130_;
+ _tmp123_ = keys;
+ _tmp124_ = gee_sorted_set_higher (_tmp123_, "six");
+ _tmp125_ = (gchar*) _tmp124_;
+ _vala_assert (_tmp125_ == NULL, "keys.higher (\"six\") == null");
+ _g_free0 (_tmp125_);
+ _tmp126_ = entries;
+ _tmp127_ = map_tests_entry_for ("six", "six");
+ _tmp128_ = _tmp127_;
+ _tmp129_ = gee_sorted_set_higher (_tmp126_, _tmp128_);
+ _tmp130_ = (GeeMapEntry*) _tmp129_;
+ _vala_assert (_tmp130_ == NULL, "entries.higher (MapTests.entry_for (\"six\", \"six\")) == null");
+ _g_object_unref0 (_tmp130_);
+ _g_object_unref0 (_tmp128_);
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_floor (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ GeeSortedMap* _tmp0_;
+ GeeSortedSet* _tmp1_;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gchar** _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ GeeSortedMapTestsSubMapTestsType _tmp10_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_sorted_map_get_ascending_keys (_tmp0_);
+ _tmp2_ = _tmp1_;
+ keys = _tmp2_;
+ _tmp3_ = self->priv->submap;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (_tmp3_);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp6_;
+ contains_length1 = _tmp7_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp8_;
+ not_contains_length1 = _tmp9_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp10_ = self->priv->type;
+ switch (_tmp10_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ GeeSortedSet* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ gchar* _tmp13_;
+ GeeSortedSet* _tmp14_;
+ GeeMapEntry* _tmp15_ = NULL;
+ GeeMapEntry* _tmp16_;
+ gpointer _tmp17_ = NULL;
+ GeeMapEntry* _tmp18_;
+ GeeSortedSet* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ GeeSortedSet* _tmp22_;
+ GeeMapEntry* _tmp23_ = NULL;
+ GeeMapEntry* _tmp24_;
+ gpointer _tmp25_ = NULL;
+ GeeMapEntry* _tmp26_;
+ GeeSortedSet* _tmp27_;
+ gpointer _tmp28_ = NULL;
+ gchar* _tmp29_;
+ GeeSortedSet* _tmp30_;
+ GeeMapEntry* _tmp31_ = NULL;
+ GeeMapEntry* _tmp32_;
+ gpointer _tmp33_ = NULL;
+ GeeMapEntry* _tmp34_;
+ GeeSortedSet* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ gchar* _tmp37_;
+ GeeSortedSet* _tmp38_;
+ GeeMapEntry* _tmp39_ = NULL;
+ GeeMapEntry* _tmp40_;
+ gpointer _tmp41_ = NULL;
+ GeeMapEntry* _tmp42_;
+ _tmp11_ = keys;
+ _tmp12_ = gee_sorted_set_floor (_tmp11_, "a");
+ _tmp13_ = (gchar*) _tmp12_;
+ _vala_assert (_tmp13_ == NULL, "keys.floor (\"a\") == null");
+ _g_free0 (_tmp13_);
+ _tmp14_ = entries;
+ _tmp15_ = map_tests_entry_for ("a", "a");
+ _tmp16_ = _tmp15_;
+ _tmp17_ = gee_sorted_set_floor (_tmp14_, _tmp16_);
+ _tmp18_ = (GeeMapEntry*) _tmp17_;
+ _vala_assert (_tmp18_ == NULL, "entries.floor (MapTests.entry_for (\"a\", \"a\")) == null");
+ _g_object_unref0 (_tmp18_);
+ _g_object_unref0 (_tmp16_);
+ _tmp19_ = keys;
+ _tmp20_ = gee_sorted_set_floor (_tmp19_, "five");
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "five") == 0, "keys.floor (\"five\") == \"five\"");
+ _g_free0 (_tmp21_);
+ _tmp22_ = entries;
+ _tmp23_ = map_tests_entry_for ("five", "fiv");
+ _tmp24_ = _tmp23_;
+ _tmp25_ = gee_sorted_set_floor (_tmp22_, _tmp24_);
+ _tmp26_ = (GeeMapEntry*) _tmp25_;
+ map_tests_assert_entry (_tmp26_, "five", "five");
+ _g_object_unref0 (_tmp26_);
+ _g_object_unref0 (_tmp24_);
+ _tmp27_ = keys;
+ _tmp28_ = gee_sorted_set_floor (_tmp27_, "four");
+ _tmp29_ = (gchar*) _tmp28_;
+ _vala_assert (g_strcmp0 (_tmp29_, "four") == 0, "keys.floor (\"four\") == \"four\"");
+ _g_free0 (_tmp29_);
+ _tmp30_ = entries;
+ _tmp31_ = map_tests_entry_for ("four", "four");
+ _tmp32_ = _tmp31_;
+ _tmp33_ = gee_sorted_set_floor (_tmp30_, _tmp32_);
+ _tmp34_ = (GeeMapEntry*) _tmp33_;
+ map_tests_assert_entry (_tmp34_, "four", "four");
+ _g_object_unref0 (_tmp34_);
+ _g_object_unref0 (_tmp32_);
+ _tmp35_ = keys;
+ _tmp36_ = gee_sorted_set_floor (_tmp35_, "six");
+ _tmp37_ = (gchar*) _tmp36_;
+ _vala_assert (g_strcmp0 (_tmp37_, "four") == 0, "keys.floor (\"six\") == \"four\"");
+ _g_free0 (_tmp37_);
+ _tmp38_ = entries;
+ _tmp39_ = map_tests_entry_for ("six", "six");
+ _tmp40_ = _tmp39_;
+ _tmp41_ = gee_sorted_set_floor (_tmp38_, _tmp40_);
+ _tmp42_ = (GeeMapEntry*) _tmp41_;
+ map_tests_assert_entry (_tmp42_, "four", "four");
+ _g_object_unref0 (_tmp42_);
+ _g_object_unref0 (_tmp40_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ GeeSortedSet* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gchar* _tmp45_;
+ GeeSortedSet* _tmp46_;
+ GeeMapEntry* _tmp47_ = NULL;
+ GeeMapEntry* _tmp48_;
+ gpointer _tmp49_ = NULL;
+ GeeMapEntry* _tmp50_;
+ GeeSortedSet* _tmp51_;
+ gpointer _tmp52_ = NULL;
+ gchar* _tmp53_;
+ GeeSortedSet* _tmp54_;
+ GeeMapEntry* _tmp55_ = NULL;
+ GeeMapEntry* _tmp56_;
+ gpointer _tmp57_ = NULL;
+ GeeMapEntry* _tmp58_;
+ GeeSortedSet* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ gchar* _tmp61_;
+ GeeSortedSet* _tmp62_;
+ GeeMapEntry* _tmp63_ = NULL;
+ GeeMapEntry* _tmp64_;
+ gpointer _tmp65_ = NULL;
+ GeeMapEntry* _tmp66_;
+ GeeSortedSet* _tmp67_;
+ gpointer _tmp68_ = NULL;
+ gchar* _tmp69_;
+ GeeSortedSet* _tmp70_;
+ GeeMapEntry* _tmp71_ = NULL;
+ GeeMapEntry* _tmp72_;
+ gpointer _tmp73_ = NULL;
+ GeeMapEntry* _tmp74_;
+ GeeSortedSet* _tmp75_;
+ gpointer _tmp76_ = NULL;
+ gchar* _tmp77_;
+ GeeSortedSet* _tmp78_;
+ GeeMapEntry* _tmp79_ = NULL;
+ GeeMapEntry* _tmp80_;
+ gpointer _tmp81_ = NULL;
+ GeeMapEntry* _tmp82_;
+ _tmp43_ = keys;
+ _tmp44_ = gee_sorted_set_floor (_tmp43_, "one");
+ _tmp45_ = (gchar*) _tmp44_;
+ _vala_assert (_tmp45_ == NULL, "keys.floor (\"one\") == null");
+ _g_free0 (_tmp45_);
+ _tmp46_ = entries;
+ _tmp47_ = map_tests_entry_for ("one", "one");
+ _tmp48_ = _tmp47_;
+ _tmp49_ = gee_sorted_set_floor (_tmp46_, _tmp48_);
+ _tmp50_ = (GeeMapEntry*) _tmp49_;
+ _vala_assert (_tmp50_ == NULL, "entries.floor (MapTests.entry_for (\"one\", \"one\")) == null");
+ _g_object_unref0 (_tmp50_);
+ _g_object_unref0 (_tmp48_);
+ _tmp51_ = keys;
+ _tmp52_ = gee_sorted_set_floor (_tmp51_, "six");
+ _tmp53_ = (gchar*) _tmp52_;
+ _vala_assert (g_strcmp0 (_tmp53_, "six") == 0, "keys.floor (\"six\") == \"six\"");
+ _g_free0 (_tmp53_);
+ _tmp54_ = entries;
+ _tmp55_ = map_tests_entry_for ("six", "six");
+ _tmp56_ = _tmp55_;
+ _tmp57_ = gee_sorted_set_floor (_tmp54_, _tmp56_);
+ _tmp58_ = (GeeMapEntry*) _tmp57_;
+ map_tests_assert_entry (_tmp58_, "six", "six");
+ _g_object_unref0 (_tmp58_);
+ _g_object_unref0 (_tmp56_);
+ _tmp59_ = keys;
+ _tmp60_ = gee_sorted_set_floor (_tmp59_, "three");
+ _tmp61_ = (gchar*) _tmp60_;
+ _vala_assert (g_strcmp0 (_tmp61_, "three") == 0, "keys.floor (\"three\") == \"three\"");
+ _g_free0 (_tmp61_);
+ _tmp62_ = entries;
+ _tmp63_ = map_tests_entry_for ("three", "three");
+ _tmp64_ = _tmp63_;
+ _tmp65_ = gee_sorted_set_floor (_tmp62_, _tmp64_);
+ _tmp66_ = (GeeMapEntry*) _tmp65_;
+ map_tests_assert_entry (_tmp66_, "three", "three");
+ _g_object_unref0 (_tmp66_);
+ _g_object_unref0 (_tmp64_);
+ _tmp67_ = keys;
+ _tmp68_ = gee_sorted_set_floor (_tmp67_, "two");
+ _tmp69_ = (gchar*) _tmp68_;
+ _vala_assert (g_strcmp0 (_tmp69_, "two") == 0, "keys.floor (\"two\") == \"two\"");
+ _g_free0 (_tmp69_);
+ _tmp70_ = entries;
+ _tmp71_ = map_tests_entry_for ("two", "two");
+ _tmp72_ = _tmp71_;
+ _tmp73_ = gee_sorted_set_floor (_tmp70_, _tmp72_);
+ _tmp74_ = (GeeMapEntry*) _tmp73_;
+ map_tests_assert_entry (_tmp74_, "two", "two");
+ _g_object_unref0 (_tmp74_);
+ _g_object_unref0 (_tmp72_);
+ _tmp75_ = keys;
+ _tmp76_ = gee_sorted_set_floor (_tmp75_, "z");
+ _tmp77_ = (gchar*) _tmp76_;
+ _vala_assert (g_strcmp0 (_tmp77_, "two") == 0, "keys.floor (\"z\") == \"two\"");
+ _g_free0 (_tmp77_);
+ _tmp78_ = entries;
+ _tmp79_ = map_tests_entry_for ("z", "z");
+ _tmp80_ = _tmp79_;
+ _tmp81_ = gee_sorted_set_floor (_tmp78_, _tmp80_);
+ _tmp82_ = (GeeMapEntry*) _tmp81_;
+ map_tests_assert_entry (_tmp82_, "two", "two");
+ _g_object_unref0 (_tmp82_);
+ _g_object_unref0 (_tmp80_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ GeeSortedSet* _tmp83_;
+ gpointer _tmp84_ = NULL;
+ gchar* _tmp85_;
+ GeeSortedSet* _tmp86_;
+ GeeMapEntry* _tmp87_ = NULL;
+ GeeMapEntry* _tmp88_;
+ gpointer _tmp89_ = NULL;
+ GeeMapEntry* _tmp90_;
+ GeeSortedSet* _tmp91_;
+ gpointer _tmp92_ = NULL;
+ gchar* _tmp93_;
+ GeeSortedSet* _tmp94_;
+ GeeMapEntry* _tmp95_ = NULL;
+ GeeMapEntry* _tmp96_;
+ gpointer _tmp97_ = NULL;
+ GeeMapEntry* _tmp98_;
+ GeeSortedSet* _tmp99_;
+ gpointer _tmp100_ = NULL;
+ gchar* _tmp101_;
+ GeeSortedSet* _tmp102_;
+ GeeMapEntry* _tmp103_ = NULL;
+ GeeMapEntry* _tmp104_;
+ gpointer _tmp105_ = NULL;
+ GeeMapEntry* _tmp106_;
+ GeeSortedSet* _tmp107_;
+ gpointer _tmp108_ = NULL;
+ gchar* _tmp109_;
+ GeeSortedSet* _tmp110_;
+ GeeMapEntry* _tmp111_ = NULL;
+ GeeMapEntry* _tmp112_;
+ gpointer _tmp113_ = NULL;
+ GeeMapEntry* _tmp114_;
+ GeeSortedSet* _tmp115_;
+ gpointer _tmp116_ = NULL;
+ gchar* _tmp117_;
+ GeeSortedSet* _tmp118_;
+ GeeMapEntry* _tmp119_ = NULL;
+ GeeMapEntry* _tmp120_;
+ gpointer _tmp121_ = NULL;
+ GeeMapEntry* _tmp122_;
+ _tmp83_ = keys;
+ _tmp84_ = gee_sorted_set_floor (_tmp83_, "five");
+ _tmp85_ = (gchar*) _tmp84_;
+ _vala_assert (_tmp85_ == NULL, "keys.floor (\"five\") == null");
+ _g_free0 (_tmp85_);
+ _tmp86_ = entries;
+ _tmp87_ = map_tests_entry_for ("five", "five");
+ _tmp88_ = _tmp87_;
+ _tmp89_ = gee_sorted_set_floor (_tmp86_, _tmp88_);
+ _tmp90_ = (GeeMapEntry*) _tmp89_;
+ _vala_assert (_tmp90_ == NULL, "entries.floor (MapTests.entry_for (\"five\", \"five\")) == null");
+ _g_object_unref0 (_tmp90_);
+ _g_object_unref0 (_tmp88_);
+ _tmp91_ = keys;
+ _tmp92_ = gee_sorted_set_floor (_tmp91_, "four");
+ _tmp93_ = (gchar*) _tmp92_;
+ _vala_assert (g_strcmp0 (_tmp93_, "four") == 0, "keys.floor (\"four\") == \"four\"");
+ _g_free0 (_tmp93_);
+ _tmp94_ = entries;
+ _tmp95_ = map_tests_entry_for ("four", "four");
+ _tmp96_ = _tmp95_;
+ _tmp97_ = gee_sorted_set_floor (_tmp94_, _tmp96_);
+ _tmp98_ = (GeeMapEntry*) _tmp97_;
+ map_tests_assert_entry (_tmp98_, "four", "four");
+ _g_object_unref0 (_tmp98_);
+ _g_object_unref0 (_tmp96_);
+ _tmp99_ = keys;
+ _tmp100_ = gee_sorted_set_floor (_tmp99_, "one");
+ _tmp101_ = (gchar*) _tmp100_;
+ _vala_assert (g_strcmp0 (_tmp101_, "one") == 0, "keys.floor (\"one\") == \"one\"");
+ _g_free0 (_tmp101_);
+ _tmp102_ = entries;
+ _tmp103_ = map_tests_entry_for ("one", "one");
+ _tmp104_ = _tmp103_;
+ _tmp105_ = gee_sorted_set_floor (_tmp102_, _tmp104_);
+ _tmp106_ = (GeeMapEntry*) _tmp105_;
+ map_tests_assert_entry (_tmp106_, "one", "one");
+ _g_object_unref0 (_tmp106_);
+ _g_object_unref0 (_tmp104_);
+ _tmp107_ = keys;
+ _tmp108_ = gee_sorted_set_floor (_tmp107_, "six");
+ _tmp109_ = (gchar*) _tmp108_;
+ _vala_assert (g_strcmp0 (_tmp109_, "six") == 0, "keys.floor (\"six\") == \"six\"");
+ _g_free0 (_tmp109_);
+ _tmp110_ = entries;
+ _tmp111_ = map_tests_entry_for ("six", "six");
+ _tmp112_ = _tmp111_;
+ _tmp113_ = gee_sorted_set_floor (_tmp110_, _tmp112_);
+ _tmp114_ = (GeeMapEntry*) _tmp113_;
+ map_tests_assert_entry (_tmp114_, "six", "six");
+ _g_object_unref0 (_tmp114_);
+ _g_object_unref0 (_tmp112_);
+ _tmp115_ = keys;
+ _tmp116_ = gee_sorted_set_floor (_tmp115_, "three");
+ _tmp117_ = (gchar*) _tmp116_;
+ _vala_assert (g_strcmp0 (_tmp117_, "six") == 0, "keys.floor (\"three\") == \"six\"");
+ _g_free0 (_tmp117_);
+ _tmp118_ = entries;
+ _tmp119_ = map_tests_entry_for ("three", "three");
+ _tmp120_ = _tmp119_;
+ _tmp121_ = gee_sorted_set_floor (_tmp118_, _tmp120_);
+ _tmp122_ = (GeeMapEntry*) _tmp121_;
+ map_tests_assert_entry (_tmp122_, "six", "six");
+ _g_object_unref0 (_tmp122_);
+ _g_object_unref0 (_tmp120_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ GeeSortedSet* _tmp123_;
+ gpointer _tmp124_ = NULL;
+ gchar* _tmp125_;
+ GeeSortedSet* _tmp126_;
+ GeeMapEntry* _tmp127_ = NULL;
+ GeeMapEntry* _tmp128_;
+ gpointer _tmp129_ = NULL;
+ GeeMapEntry* _tmp130_;
+ _tmp123_ = keys;
+ _tmp124_ = gee_sorted_set_floor (_tmp123_, "six");
+ _tmp125_ = (gchar*) _tmp124_;
+ _vala_assert (_tmp125_ == NULL, "keys.floor (\"six\") == null");
+ _g_free0 (_tmp125_);
+ _tmp126_ = entries;
+ _tmp127_ = map_tests_entry_for ("six", "six");
+ _tmp128_ = _tmp127_;
+ _tmp129_ = gee_sorted_set_floor (_tmp126_, _tmp128_);
+ _tmp130_ = (GeeMapEntry*) _tmp129_;
+ _vala_assert (_tmp130_ == NULL, "entries.floor (MapTests.entry_for (\"six\", \"six\")) == null");
+ _g_object_unref0 (_tmp130_);
+ _g_object_unref0 (_tmp128_);
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_ceil (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ GeeSortedMap* _tmp0_;
+ GeeSortedSet* _tmp1_;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gchar** _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ GeeSortedMapTestsSubMapTestsType _tmp10_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_sorted_map_get_ascending_keys (_tmp0_);
+ _tmp2_ = _tmp1_;
+ keys = _tmp2_;
+ _tmp3_ = self->priv->submap;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (_tmp3_);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp6_;
+ contains_length1 = _tmp7_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp8_;
+ not_contains_length1 = _tmp9_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp10_ = self->priv->type;
+ switch (_tmp10_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ GeeSortedSet* _tmp11_;
+ gpointer _tmp12_ = NULL;
+ gchar* _tmp13_;
+ GeeSortedSet* _tmp14_;
+ GeeMapEntry* _tmp15_ = NULL;
+ GeeMapEntry* _tmp16_;
+ gpointer _tmp17_ = NULL;
+ GeeMapEntry* _tmp18_;
+ GeeSortedSet* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
+ GeeSortedSet* _tmp22_;
+ GeeMapEntry* _tmp23_ = NULL;
+ GeeMapEntry* _tmp24_;
+ gpointer _tmp25_ = NULL;
+ GeeMapEntry* _tmp26_;
+ GeeSortedSet* _tmp27_;
+ gpointer _tmp28_ = NULL;
+ gchar* _tmp29_;
+ GeeSortedSet* _tmp30_;
+ GeeMapEntry* _tmp31_ = NULL;
+ GeeMapEntry* _tmp32_;
+ gpointer _tmp33_ = NULL;
+ GeeMapEntry* _tmp34_;
+ GeeSortedSet* _tmp35_;
+ gpointer _tmp36_ = NULL;
+ gchar* _tmp37_;
+ GeeSortedSet* _tmp38_;
+ GeeMapEntry* _tmp39_ = NULL;
+ GeeMapEntry* _tmp40_;
+ gpointer _tmp41_ = NULL;
+ GeeMapEntry* _tmp42_;
+ _tmp11_ = keys;
+ _tmp12_ = gee_sorted_set_ceil (_tmp11_, "a");
+ _tmp13_ = (gchar*) _tmp12_;
+ _vala_assert (g_strcmp0 (_tmp13_, "five") == 0, "keys.ceil (\"a\") == \"five\"");
+ _g_free0 (_tmp13_);
+ _tmp14_ = entries;
+ _tmp15_ = map_tests_entry_for ("a", "a");
+ _tmp16_ = _tmp15_;
+ _tmp17_ = gee_sorted_set_ceil (_tmp14_, _tmp16_);
+ _tmp18_ = (GeeMapEntry*) _tmp17_;
+ map_tests_assert_entry (_tmp18_, "five", "five");
+ _g_object_unref0 (_tmp18_);
+ _g_object_unref0 (_tmp16_);
+ _tmp19_ = keys;
+ _tmp20_ = gee_sorted_set_ceil (_tmp19_, "five");
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "five") == 0, "keys.ceil (\"five\") == \"five\"");
+ _g_free0 (_tmp21_);
+ _tmp22_ = entries;
+ _tmp23_ = map_tests_entry_for ("five", "five");
+ _tmp24_ = _tmp23_;
+ _tmp25_ = gee_sorted_set_ceil (_tmp22_, _tmp24_);
+ _tmp26_ = (GeeMapEntry*) _tmp25_;
+ map_tests_assert_entry (_tmp26_, "five", "five");
+ _g_object_unref0 (_tmp26_);
+ _g_object_unref0 (_tmp24_);
+ _tmp27_ = keys;
+ _tmp28_ = gee_sorted_set_ceil (_tmp27_, "four");
+ _tmp29_ = (gchar*) _tmp28_;
+ _vala_assert (g_strcmp0 (_tmp29_, "four") == 0, "keys.ceil (\"four\") == \"four\"");
+ _g_free0 (_tmp29_);
+ _tmp30_ = entries;
+ _tmp31_ = map_tests_entry_for ("four", "four");
+ _tmp32_ = _tmp31_;
+ _tmp33_ = gee_sorted_set_ceil (_tmp30_, _tmp32_);
+ _tmp34_ = (GeeMapEntry*) _tmp33_;
+ map_tests_assert_entry (_tmp34_, "four", "four");
+ _g_object_unref0 (_tmp34_);
+ _g_object_unref0 (_tmp32_);
+ _tmp35_ = keys;
+ _tmp36_ = gee_sorted_set_ceil (_tmp35_, "six");
+ _tmp37_ = (gchar*) _tmp36_;
+ _vala_assert (_tmp37_ == NULL, "keys.ceil (\"six\") == null");
+ _g_free0 (_tmp37_);
+ _tmp38_ = entries;
+ _tmp39_ = map_tests_entry_for ("six", "six");
+ _tmp40_ = _tmp39_;
+ _tmp41_ = gee_sorted_set_ceil (_tmp38_, _tmp40_);
+ _tmp42_ = (GeeMapEntry*) _tmp41_;
+ _vala_assert (_tmp42_ == NULL, "entries.ceil (MapTests.entry_for (\"six\", \"six\")) == null");
+ _g_object_unref0 (_tmp42_);
+ _g_object_unref0 (_tmp40_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ GeeSortedSet* _tmp43_;
+ gpointer _tmp44_ = NULL;
+ gchar* _tmp45_;
+ GeeSortedSet* _tmp46_;
+ GeeMapEntry* _tmp47_ = NULL;
+ GeeMapEntry* _tmp48_;
+ gpointer _tmp49_ = NULL;
+ GeeMapEntry* _tmp50_;
+ GeeSortedSet* _tmp51_;
+ gpointer _tmp52_ = NULL;
+ gchar* _tmp53_;
+ GeeSortedSet* _tmp54_;
+ GeeMapEntry* _tmp55_ = NULL;
+ GeeMapEntry* _tmp56_;
+ gpointer _tmp57_ = NULL;
+ GeeMapEntry* _tmp58_;
+ GeeSortedSet* _tmp59_;
+ gpointer _tmp60_ = NULL;
+ gchar* _tmp61_;
+ GeeSortedSet* _tmp62_;
+ GeeMapEntry* _tmp63_ = NULL;
+ GeeMapEntry* _tmp64_;
+ gpointer _tmp65_ = NULL;
+ GeeMapEntry* _tmp66_;
+ GeeSortedSet* _tmp67_;
+ gpointer _tmp68_ = NULL;
+ gchar* _tmp69_;
+ GeeSortedSet* _tmp70_;
+ GeeMapEntry* _tmp71_ = NULL;
+ GeeMapEntry* _tmp72_;
+ gpointer _tmp73_ = NULL;
+ GeeMapEntry* _tmp74_;
+ GeeSortedSet* _tmp75_;
+ gpointer _tmp76_ = NULL;
+ gchar* _tmp77_;
+ GeeSortedSet* _tmp78_;
+ GeeMapEntry* _tmp79_ = NULL;
+ GeeMapEntry* _tmp80_;
+ gpointer _tmp81_ = NULL;
+ GeeMapEntry* _tmp82_;
+ _tmp43_ = keys;
+ _tmp44_ = gee_sorted_set_ceil (_tmp43_, "one");
+ _tmp45_ = (gchar*) _tmp44_;
+ _vala_assert (g_strcmp0 (_tmp45_, "six") == 0, "keys.ceil (\"one\") == \"six\"");
+ _g_free0 (_tmp45_);
+ _tmp46_ = entries;
+ _tmp47_ = map_tests_entry_for ("one", "one");
+ _tmp48_ = _tmp47_;
+ _tmp49_ = gee_sorted_set_ceil (_tmp46_, _tmp48_);
+ _tmp50_ = (GeeMapEntry*) _tmp49_;
+ map_tests_assert_entry (_tmp50_, "six", "six");
+ _g_object_unref0 (_tmp50_);
+ _g_object_unref0 (_tmp48_);
+ _tmp51_ = keys;
+ _tmp52_ = gee_sorted_set_ceil (_tmp51_, "six");
+ _tmp53_ = (gchar*) _tmp52_;
+ _vala_assert (g_strcmp0 (_tmp53_, "six") == 0, "keys.ceil (\"six\") == \"six\"");
+ _g_free0 (_tmp53_);
+ _tmp54_ = entries;
+ _tmp55_ = map_tests_entry_for ("six", "six");
+ _tmp56_ = _tmp55_;
+ _tmp57_ = gee_sorted_set_ceil (_tmp54_, _tmp56_);
+ _tmp58_ = (GeeMapEntry*) _tmp57_;
+ map_tests_assert_entry (_tmp58_, "six", "six");
+ _g_object_unref0 (_tmp58_);
+ _g_object_unref0 (_tmp56_);
+ _tmp59_ = keys;
+ _tmp60_ = gee_sorted_set_ceil (_tmp59_, "three");
+ _tmp61_ = (gchar*) _tmp60_;
+ _vala_assert (g_strcmp0 (_tmp61_, "three") == 0, "keys.ceil (\"three\") == \"three\"");
+ _g_free0 (_tmp61_);
+ _tmp62_ = entries;
+ _tmp63_ = map_tests_entry_for ("three", "three");
+ _tmp64_ = _tmp63_;
+ _tmp65_ = gee_sorted_set_ceil (_tmp62_, _tmp64_);
+ _tmp66_ = (GeeMapEntry*) _tmp65_;
+ map_tests_assert_entry (_tmp66_, "three", "three");
+ _g_object_unref0 (_tmp66_);
+ _g_object_unref0 (_tmp64_);
+ _tmp67_ = keys;
+ _tmp68_ = gee_sorted_set_ceil (_tmp67_, "two");
+ _tmp69_ = (gchar*) _tmp68_;
+ _vala_assert (g_strcmp0 (_tmp69_, "two") == 0, "keys.ceil (\"two\") == \"two\"");
+ _g_free0 (_tmp69_);
+ _tmp70_ = entries;
+ _tmp71_ = map_tests_entry_for ("two", "two");
+ _tmp72_ = _tmp71_;
+ _tmp73_ = gee_sorted_set_ceil (_tmp70_, _tmp72_);
+ _tmp74_ = (GeeMapEntry*) _tmp73_;
+ map_tests_assert_entry (_tmp74_, "two", "two");
+ _g_object_unref0 (_tmp74_);
+ _g_object_unref0 (_tmp72_);
+ _tmp75_ = keys;
+ _tmp76_ = gee_sorted_set_ceil (_tmp75_, "z");
+ _tmp77_ = (gchar*) _tmp76_;
+ _vala_assert (_tmp77_ == NULL, "keys.ceil (\"z\") == null");
+ _g_free0 (_tmp77_);
+ _tmp78_ = entries;
+ _tmp79_ = map_tests_entry_for ("z", "z");
+ _tmp80_ = _tmp79_;
+ _tmp81_ = gee_sorted_set_ceil (_tmp78_, _tmp80_);
+ _tmp82_ = (GeeMapEntry*) _tmp81_;
+ _vala_assert (_tmp82_ == NULL, "entries.ceil (MapTests.entry_for (\"z\", \"z\")) == null");
+ _g_object_unref0 (_tmp82_);
+ _g_object_unref0 (_tmp80_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ GeeSortedSet* _tmp83_;
+ gpointer _tmp84_ = NULL;
+ gchar* _tmp85_;
+ GeeSortedSet* _tmp86_;
+ GeeMapEntry* _tmp87_ = NULL;
+ GeeMapEntry* _tmp88_;
+ gpointer _tmp89_ = NULL;
+ GeeMapEntry* _tmp90_;
+ GeeSortedSet* _tmp91_;
+ gpointer _tmp92_ = NULL;
+ gchar* _tmp93_;
+ GeeSortedSet* _tmp94_;
+ GeeMapEntry* _tmp95_ = NULL;
+ GeeMapEntry* _tmp96_;
+ gpointer _tmp97_ = NULL;
+ GeeMapEntry* _tmp98_;
+ GeeSortedSet* _tmp99_;
+ gpointer _tmp100_ = NULL;
+ gchar* _tmp101_;
+ GeeSortedSet* _tmp102_;
+ GeeMapEntry* _tmp103_ = NULL;
+ GeeMapEntry* _tmp104_;
+ gpointer _tmp105_ = NULL;
+ GeeMapEntry* _tmp106_;
+ GeeSortedSet* _tmp107_;
+ gpointer _tmp108_ = NULL;
+ gchar* _tmp109_;
+ GeeSortedSet* _tmp110_;
+ GeeMapEntry* _tmp111_ = NULL;
+ GeeMapEntry* _tmp112_;
+ gpointer _tmp113_ = NULL;
+ GeeMapEntry* _tmp114_;
+ GeeSortedSet* _tmp115_;
+ gpointer _tmp116_ = NULL;
+ gchar* _tmp117_;
+ GeeSortedSet* _tmp118_;
+ GeeMapEntry* _tmp119_ = NULL;
+ GeeMapEntry* _tmp120_;
+ gpointer _tmp121_ = NULL;
+ GeeMapEntry* _tmp122_;
+ _tmp83_ = keys;
+ _tmp84_ = gee_sorted_set_ceil (_tmp83_, "five");
+ _tmp85_ = (gchar*) _tmp84_;
+ _vala_assert (g_strcmp0 (_tmp85_, "four") == 0, "keys.ceil (\"five\") == \"four\"");
+ _g_free0 (_tmp85_);
+ _tmp86_ = entries;
+ _tmp87_ = map_tests_entry_for ("five", "five");
+ _tmp88_ = _tmp87_;
+ _tmp89_ = gee_sorted_set_ceil (_tmp86_, _tmp88_);
+ _tmp90_ = (GeeMapEntry*) _tmp89_;
+ map_tests_assert_entry (_tmp90_, "four", "four");
+ _g_object_unref0 (_tmp90_);
+ _g_object_unref0 (_tmp88_);
+ _tmp91_ = keys;
+ _tmp92_ = gee_sorted_set_ceil (_tmp91_, "four");
+ _tmp93_ = (gchar*) _tmp92_;
+ _vala_assert (g_strcmp0 (_tmp93_, "four") == 0, "keys.ceil (\"four\") == \"four\"");
+ _g_free0 (_tmp93_);
+ _tmp94_ = entries;
+ _tmp95_ = map_tests_entry_for ("four", "four");
+ _tmp96_ = _tmp95_;
+ _tmp97_ = gee_sorted_set_ceil (_tmp94_, _tmp96_);
+ _tmp98_ = (GeeMapEntry*) _tmp97_;
+ map_tests_assert_entry (_tmp98_, "four", "four");
+ _g_object_unref0 (_tmp98_);
+ _g_object_unref0 (_tmp96_);
+ _tmp99_ = keys;
+ _tmp100_ = gee_sorted_set_ceil (_tmp99_, "one");
+ _tmp101_ = (gchar*) _tmp100_;
+ _vala_assert (g_strcmp0 (_tmp101_, "one") == 0, "keys.ceil (\"one\") == \"one\"");
+ _g_free0 (_tmp101_);
+ _tmp102_ = entries;
+ _tmp103_ = map_tests_entry_for ("one", "one");
+ _tmp104_ = _tmp103_;
+ _tmp105_ = gee_sorted_set_ceil (_tmp102_, _tmp104_);
+ _tmp106_ = (GeeMapEntry*) _tmp105_;
+ map_tests_assert_entry (_tmp106_, "one", "one");
+ _g_object_unref0 (_tmp106_);
+ _g_object_unref0 (_tmp104_);
+ _tmp107_ = keys;
+ _tmp108_ = gee_sorted_set_ceil (_tmp107_, "six");
+ _tmp109_ = (gchar*) _tmp108_;
+ _vala_assert (g_strcmp0 (_tmp109_, "six") == 0, "keys.ceil (\"six\") == \"six\"");
+ _g_free0 (_tmp109_);
+ _tmp110_ = entries;
+ _tmp111_ = map_tests_entry_for ("six", "six");
+ _tmp112_ = _tmp111_;
+ _tmp113_ = gee_sorted_set_ceil (_tmp110_, _tmp112_);
+ _tmp114_ = (GeeMapEntry*) _tmp113_;
+ map_tests_assert_entry (_tmp114_, "six", "six");
+ _g_object_unref0 (_tmp114_);
+ _g_object_unref0 (_tmp112_);
+ _tmp115_ = keys;
+ _tmp116_ = gee_sorted_set_ceil (_tmp115_, "three");
+ _tmp117_ = (gchar*) _tmp116_;
+ _vala_assert (_tmp117_ == NULL, "keys.ceil (\"three\") == null");
+ _g_free0 (_tmp117_);
+ _tmp118_ = entries;
+ _tmp119_ = map_tests_entry_for ("three", "three");
+ _tmp120_ = _tmp119_;
+ _tmp121_ = gee_sorted_set_ceil (_tmp118_, _tmp120_);
+ _tmp122_ = (GeeMapEntry*) _tmp121_;
+ _vala_assert (_tmp122_ == NULL, "entries.ceil (MapTests.entry_for (\"three\", \"three\")) == null");
+ _g_object_unref0 (_tmp122_);
+ _g_object_unref0 (_tmp120_);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ GeeSortedSet* _tmp123_;
+ gpointer _tmp124_ = NULL;
+ gchar* _tmp125_;
+ GeeSortedSet* _tmp126_;
+ GeeMapEntry* _tmp127_ = NULL;
+ GeeMapEntry* _tmp128_;
+ gpointer _tmp129_ = NULL;
+ GeeMapEntry* _tmp130_;
+ _tmp123_ = keys;
+ _tmp124_ = gee_sorted_set_ceil (_tmp123_, "six");
+ _tmp125_ = (gchar*) _tmp124_;
+ _vala_assert (_tmp125_ == NULL, "keys.ceil (\"six\") == null");
+ _g_free0 (_tmp125_);
+ _tmp126_ = entries;
+ _tmp127_ = map_tests_entry_for ("six", "six");
+ _tmp128_ = _tmp127_;
+ _tmp129_ = gee_sorted_set_ceil (_tmp126_, _tmp128_);
+ _tmp130_ = (GeeMapEntry*) _tmp129_;
+ _vala_assert (_tmp130_ == NULL, "entries.ceil (MapTests.entry_for (\"six\", \"six\")) == null");
+ _g_object_unref0 (_tmp130_);
+ _g_object_unref0 (_tmp128_);
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_iterator_at (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ GeeSortedMap* _tmp0_;
+ GeeSortedSet* _tmp1_;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gchar** _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ gchar** _tmp10_;
+ gint _tmp10__length1;
+ gchar** _tmp32_;
+ gint _tmp32__length1;
+ GeeSortedSet* _tmp46_;
+ GeeIterator* _tmp47_ = NULL;
+ GeeIterator* _tmp48_;
+ GeeSortedSet* _tmp49_;
+ GeeMapEntry* _tmp50_ = NULL;
+ GeeMapEntry* _tmp51_;
+ GeeIterator* _tmp52_ = NULL;
+ GeeIterator* _tmp53_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_sorted_map_get_ascending_keys (_tmp0_);
+ _tmp2_ = _tmp1_;
+ keys = _tmp2_;
+ _tmp3_ = self->priv->submap;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (_tmp3_);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp6_;
+ contains_length1 = _tmp7_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp8_;
+ not_contains_length1 = _tmp9_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp10_ = contains;
+ _tmp10__length1 = contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp10_;
+ s_collection_length1 = _tmp10__length1;
+ for (s_it = 0; s_it < _tmp10__length1; s_it = s_it + 1) {
+ gchar* _tmp11_;
+ gchar* s = NULL;
+ _tmp11_ = g_strdup (s_collection[s_it]);
+ s = _tmp11_;
+ {
+ GeeSortedSet* _tmp12_;
+ const gchar* _tmp13_;
+ GeeIterator* _tmp14_ = NULL;
+ GeeIterator* key_iter;
+ GeeSortedSet* _tmp15_;
+ const gchar* _tmp16_;
+ const gchar* _tmp17_;
+ GeeMapEntry* _tmp18_ = NULL;
+ GeeMapEntry* _tmp19_;
+ GeeIterator* _tmp20_ = NULL;
+ GeeIterator* _tmp21_;
+ GeeIterator* entry_iter;
+ GeeIterator* _tmp22_;
+ GeeIterator* _tmp23_;
+ gpointer _tmp24_ = NULL;
+ gchar* _tmp25_;
+ const gchar* _tmp26_;
+ GeeIterator* _tmp27_;
+ gpointer _tmp28_ = NULL;
+ GeeMapEntry* _tmp29_;
+ const gchar* _tmp30_;
+ const gchar* _tmp31_;
+ _tmp12_ = keys;
+ _tmp13_ = s;
+ _tmp14_ = gee_sorted_set_iterator_at (_tmp12_, _tmp13_);
+ key_iter = _tmp14_;
+ _tmp15_ = entries;
+ _tmp16_ = s;
+ _tmp17_ = s;
+ _tmp18_ = map_tests_entry_for (_tmp16_, _tmp17_);
+ _tmp19_ = _tmp18_;
+ _tmp20_ = gee_sorted_set_iterator_at (_tmp15_, _tmp19_);
+ _tmp21_ = _tmp20_;
+ _g_object_unref0 (_tmp19_);
+ entry_iter = _tmp21_;
+ _tmp22_ = key_iter;
+ _vala_assert (_tmp22_ != NULL, "key_iter != null");
+ _tmp23_ = key_iter;
+ _tmp24_ = gee_iterator_get (_tmp23_);
+ _tmp25_ = (gchar*) _tmp24_;
+ _tmp26_ = s;
+ _vala_assert (g_strcmp0 (_tmp25_, _tmp26_) == 0, "key_iter.get () == s");
+ _g_free0 (_tmp25_);
+ _tmp27_ = entry_iter;
+ _tmp28_ = gee_iterator_get (_tmp27_);
+ _tmp29_ = (GeeMapEntry*) _tmp28_;
+ _tmp30_ = s;
+ _tmp31_ = s;
+ map_tests_assert_entry (_tmp29_, _tmp30_, _tmp31_);
+ _g_object_unref0 (_tmp29_);
+ _g_object_unref0 (entry_iter);
+ _g_object_unref0 (key_iter);
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp32_ = not_contains;
+ _tmp32__length1 = not_contains_length1;
+ {
+ gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+ s_collection = _tmp32_;
+ s_collection_length1 = _tmp32__length1;
+ for (s_it = 0; s_it < _tmp32__length1; s_it = s_it + 1) {
+ gchar* _tmp33_;
+ gchar* s = NULL;
+ _tmp33_ = g_strdup (s_collection[s_it]);
+ s = _tmp33_;
+ {
+ GeeSortedSet* _tmp34_;
+ const gchar* _tmp35_;
+ GeeIterator* _tmp36_ = NULL;
+ GeeIterator* key_iter;
+ GeeSortedSet* _tmp37_;
+ const gchar* _tmp38_;
+ const gchar* _tmp39_;
+ GeeMapEntry* _tmp40_ = NULL;
+ GeeMapEntry* _tmp41_;
+ GeeIterator* _tmp42_ = NULL;
+ GeeIterator* _tmp43_;
+ GeeIterator* entry_iter;
+ GeeIterator* _tmp44_;
+ GeeIterator* _tmp45_;
+ _tmp34_ = keys;
+ _tmp35_ = s;
+ _tmp36_ = gee_sorted_set_iterator_at (_tmp34_, _tmp35_);
+ key_iter = _tmp36_;
+ _tmp37_ = entries;
+ _tmp38_ = s;
+ _tmp39_ = s;
+ _tmp40_ = map_tests_entry_for (_tmp38_, _tmp39_);
+ _tmp41_ = _tmp40_;
+ _tmp42_ = gee_sorted_set_iterator_at (_tmp37_, _tmp41_);
+ _tmp43_ = _tmp42_;
+ _g_object_unref0 (_tmp41_);
+ entry_iter = _tmp43_;
+ _tmp44_ = key_iter;
+ _vala_assert (_tmp44_ == NULL, "key_iter == null");
+ _tmp45_ = entry_iter;
+ _vala_assert (_tmp45_ == NULL, "entry_iter == null");
+ _g_object_unref0 (entry_iter);
+ _g_object_unref0 (key_iter);
+ _g_free0 (s);
+ }
+ }
+ }
+ _tmp46_ = keys;
+ _tmp47_ = gee_sorted_set_iterator_at (_tmp46_, "seven");
+ _tmp48_ = _tmp47_;
+ _vala_assert (_tmp48_ == NULL, "keys.iterator_at (\"seven\") == null");
+ _g_object_unref0 (_tmp48_);
+ _tmp49_ = entries;
+ _tmp50_ = map_tests_entry_for ("seven", "seven");
+ _tmp51_ = _tmp50_;
+ _tmp52_ = gee_sorted_set_iterator_at (_tmp49_, _tmp51_);
+ _tmp53_ = _tmp52_;
+ _vala_assert (_tmp53_ == NULL, "entries.iterator_at (MapTests.entry_for (\"seven\", \"seven\")) == null");
+ _g_object_unref0 (_tmp53_);
+ _g_object_unref0 (_tmp51_);
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+void gee_sorted_map_tests_sub_map_tests_test_submap_and_subsets (GeeSortedMapTestsSubMapTests* self) {
+ gchar** contains = NULL;
+ gint contains_length1 = 0;
+ gint _contains_size_ = 0;
+ gchar** not_contains = NULL;
+ gint not_contains_length1 = 0;
+ gint _not_contains_size_ = 0;
+ GeeSortedMap* _tmp0_;
+ GeeSortedSet* _tmp1_;
+ GeeSortedSet* _tmp2_;
+ GeeSortedSet* keys;
+ GeeSortedMap* _tmp3_;
+ GeeSortedSet* _tmp4_;
+ GeeSortedSet* _tmp5_;
+ GeeSortedSet* entries;
+ gchar** _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gchar** _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ GeeSortedMapTestsSubMapTestsType _tmp10_;
+ g_return_if_fail (self != NULL);
+ _tmp0_ = self->priv->submap;
+ _tmp1_ = gee_sorted_map_get_ascending_keys (_tmp0_);
+ _tmp2_ = _tmp1_;
+ keys = _tmp2_;
+ _tmp3_ = self->priv->submap;
+ _tmp4_ = gee_sorted_map_get_ascending_entries (_tmp3_);
+ _tmp5_ = _tmp4_;
+ entries = _tmp5_;
+ gee_sorted_map_tests_sub_map_tests_set_default_values (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = _tmp6_;
+ contains_length1 = _tmp7_;
+ _contains_size_ = contains_length1;
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ not_contains = _tmp8_;
+ not_contains_length1 = _tmp9_;
+ _not_contains_size_ = not_contains_length1;
+ _tmp10_ = self->priv->type;
+ switch (_tmp10_) {
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_HEAD:
+ {
+ GeeSortedMap* _tmp11_;
+ GeeSortedMap* _tmp12_ = NULL;
+ GeeSortedMap* subsubmap;
+ GeeSortedSet* _tmp13_;
+ GeeSortedSet* _tmp14_ = NULL;
+ GeeSortedSet* keyssubset;
+ GeeSortedSet* _tmp15_;
+ GeeMapEntry* _tmp16_ = NULL;
+ GeeMapEntry* _tmp17_;
+ GeeSortedSet* _tmp18_ = NULL;
+ GeeSortedSet* _tmp19_;
+ GeeSortedSet* entriessubset;
+ GeeSortedMap* _tmp20_;
+ gint _tmp21_;
+ gint _tmp22_;
+ GeeSortedSet* _tmp23_;
+ gint _tmp24_;
+ gint _tmp25_;
+ GeeSortedSet* _tmp26_;
+ gint _tmp27_;
+ gint _tmp28_;
+ GeeSortedMap* _tmp29_;
+ GeeSortedMap* _tmp30_ = NULL;
+ GeeSortedSet* _tmp31_;
+ GeeSortedSet* _tmp32_ = NULL;
+ GeeSortedSet* _tmp33_;
+ GeeMapEntry* _tmp34_ = NULL;
+ GeeMapEntry* _tmp35_;
+ GeeSortedSet* _tmp36_ = NULL;
+ GeeSortedMap* _tmp37_;
+ gint _tmp38_;
+ gint _tmp39_;
+ GeeSortedSet* _tmp40_;
+ gint _tmp41_;
+ gint _tmp42_;
+ GeeSortedSet* _tmp43_;
+ gint _tmp44_;
+ gint _tmp45_;
+ GeeSortedMap* _tmp46_;
+ GeeSortedMap* _tmp47_ = NULL;
+ GeeSortedSet* _tmp48_;
+ GeeSortedSet* _tmp49_ = NULL;
+ GeeSortedSet* _tmp50_;
+ GeeMapEntry* _tmp51_ = NULL;
+ GeeMapEntry* _tmp52_;
+ GeeMapEntry* _tmp53_ = NULL;
+ GeeMapEntry* _tmp54_;
+ GeeSortedSet* _tmp55_ = NULL;
+ GeeSortedMap* _tmp56_;
+ gint _tmp57_;
+ gint _tmp58_;
+ GeeSortedSet* _tmp59_;
+ gint _tmp60_;
+ gint _tmp61_;
+ GeeSortedSet* _tmp62_;
+ gint _tmp63_;
+ gint _tmp64_;
+ GeeSortedMap* _tmp65_;
+ GeeSortedMap* _tmp66_ = NULL;
+ GeeSortedSet* _tmp67_;
+ GeeSortedSet* _tmp68_ = NULL;
+ GeeSortedSet* _tmp69_;
+ GeeMapEntry* _tmp70_ = NULL;
+ GeeMapEntry* _tmp71_;
+ GeeMapEntry* _tmp72_ = NULL;
+ GeeMapEntry* _tmp73_;
+ GeeSortedSet* _tmp74_ = NULL;
+ GeeSortedMap* _tmp75_;
+ gint _tmp76_;
+ gint _tmp77_;
+ GeeSortedSet* _tmp78_;
+ gint _tmp79_;
+ gint _tmp80_;
+ GeeSortedSet* _tmp81_;
+ gint _tmp82_;
+ gint _tmp83_;
+ _tmp11_ = self->priv->submap;
+ _tmp12_ = gee_sorted_map_head_map (_tmp11_, "four");
+ subsubmap = _tmp12_;
+ _tmp13_ = keys;
+ _tmp14_ = gee_sorted_set_head_set (_tmp13_, "four");
+ keyssubset = _tmp14_;
+ _tmp15_ = entries;
+ _tmp16_ = map_tests_entry_for ("four", "four");
+ _tmp17_ = _tmp16_;
+ _tmp18_ = gee_sorted_set_head_set (_tmp15_, _tmp17_);
+ _tmp19_ = _tmp18_;
+ _g_object_unref0 (_tmp17_);
+ entriessubset = _tmp19_;
+ _tmp20_ = subsubmap;
+ _tmp21_ = gee_map_get_size ((GeeMap*) _tmp20_);
+ _tmp22_ = _tmp21_;
+ _vala_assert (_tmp22_ == 1, "subsubmap.size == 1");
+ _tmp23_ = keyssubset;
+ _tmp24_ = gee_collection_get_size ((GeeCollection*) _tmp23_);
+ _tmp25_ = _tmp24_;
+ _vala_assert (_tmp25_ == 1, "keyssubset.size == 1");
+ _tmp26_ = entriessubset;
+ _tmp27_ = gee_collection_get_size ((GeeCollection*) _tmp26_);
+ _tmp28_ = _tmp27_;
+ _vala_assert (_tmp28_ == 1, "entriessubset.size == 1");
+ _tmp29_ = self->priv->submap;
+ _tmp30_ = gee_sorted_map_tail_map (_tmp29_, "four");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp30_;
+ _tmp31_ = keys;
+ _tmp32_ = gee_sorted_set_tail_set (_tmp31_, "four");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp32_;
+ _tmp33_ = entries;
+ _tmp34_ = map_tests_entry_for ("four", "four");
+ _tmp35_ = _tmp34_;
+ _tmp36_ = gee_sorted_set_tail_set (_tmp33_, _tmp35_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp36_;
+ _g_object_unref0 (_tmp35_);
+ _tmp37_ = subsubmap;
+ _tmp38_ = gee_map_get_size ((GeeMap*) _tmp37_);
+ _tmp39_ = _tmp38_;
+ _vala_assert (_tmp39_ == 1, "subsubmap.size == 1");
+ _tmp40_ = keyssubset;
+ _tmp41_ = gee_collection_get_size ((GeeCollection*) _tmp40_);
+ _tmp42_ = _tmp41_;
+ _vala_assert (_tmp42_ == 1, "keyssubset.size == 1");
+ _tmp43_ = entriessubset;
+ _tmp44_ = gee_collection_get_size ((GeeCollection*) _tmp43_);
+ _tmp45_ = _tmp44_;
+ _vala_assert (_tmp45_ == 1, "entriessubset.size == 1");
+ _tmp46_ = self->priv->submap;
+ _tmp47_ = gee_sorted_map_sub_map (_tmp46_, "four", "one");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp47_;
+ _tmp48_ = keys;
+ _tmp49_ = gee_sorted_set_sub_set (_tmp48_, "four", "one");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp49_;
+ _tmp50_ = entries;
+ _tmp51_ = map_tests_entry_for ("four", "four");
+ _tmp52_ = _tmp51_;
+ _tmp53_ = map_tests_entry_for ("one", "one");
+ _tmp54_ = _tmp53_;
+ _tmp55_ = gee_sorted_set_sub_set (_tmp50_, _tmp52_, _tmp54_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp55_;
+ _g_object_unref0 (_tmp54_);
+ _g_object_unref0 (_tmp52_);
+ _tmp56_ = subsubmap;
+ _tmp57_ = gee_map_get_size ((GeeMap*) _tmp56_);
+ _tmp58_ = _tmp57_;
+ _vala_assert (_tmp58_ == 1, "subsubmap.size == 1");
+ _tmp59_ = keyssubset;
+ _tmp60_ = gee_collection_get_size ((GeeCollection*) _tmp59_);
+ _tmp61_ = _tmp60_;
+ _vala_assert (_tmp61_ == 1, "keyssubset.size == 1");
+ _tmp62_ = entriessubset;
+ _tmp63_ = gee_collection_get_size ((GeeCollection*) _tmp62_);
+ _tmp64_ = _tmp63_;
+ _vala_assert (_tmp64_ == 1, "entriessubset.size == 1");
+ _tmp65_ = self->priv->submap;
+ _tmp66_ = gee_sorted_map_sub_map (_tmp65_, "four", "four");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp66_;
+ _tmp67_ = keys;
+ _tmp68_ = gee_sorted_set_sub_set (_tmp67_, "four", "four");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp68_;
+ _tmp69_ = entries;
+ _tmp70_ = map_tests_entry_for ("four", "four");
+ _tmp71_ = _tmp70_;
+ _tmp72_ = map_tests_entry_for ("four", "four");
+ _tmp73_ = _tmp72_;
+ _tmp74_ = gee_sorted_set_sub_set (_tmp69_, _tmp71_, _tmp73_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp74_;
+ _g_object_unref0 (_tmp73_);
+ _g_object_unref0 (_tmp71_);
+ _tmp75_ = subsubmap;
+ _tmp76_ = gee_map_get_size ((GeeMap*) _tmp75_);
+ _tmp77_ = _tmp76_;
+ _vala_assert (_tmp77_ == 0, "subsubmap.size == 0");
+ _tmp78_ = keyssubset;
+ _tmp79_ = gee_collection_get_size ((GeeCollection*) _tmp78_);
+ _tmp80_ = _tmp79_;
+ _vala_assert (_tmp80_ == 0, "keyssubset.size == 0");
+ _tmp81_ = entriessubset;
+ _tmp82_ = gee_collection_get_size ((GeeCollection*) _tmp81_);
+ _tmp83_ = _tmp82_;
+ _vala_assert (_tmp83_ == 0, "entriessubset.size == 0");
+ _g_object_unref0 (entriessubset);
+ _g_object_unref0 (keyssubset);
+ _g_object_unref0 (subsubmap);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_TAIL:
+ {
+ GeeSortedMap* _tmp84_;
+ GeeSortedMap* _tmp85_ = NULL;
+ GeeSortedMap* subsubmap;
+ GeeSortedSet* _tmp86_;
+ GeeSortedSet* _tmp87_ = NULL;
+ GeeSortedSet* keyssubset;
+ GeeSortedSet* _tmp88_;
+ GeeMapEntry* _tmp89_ = NULL;
+ GeeMapEntry* _tmp90_;
+ GeeSortedSet* _tmp91_ = NULL;
+ GeeSortedSet* _tmp92_;
+ GeeSortedSet* entriessubset;
+ GeeSortedMap* _tmp93_;
+ gint _tmp94_;
+ gint _tmp95_;
+ GeeSortedSet* _tmp96_;
+ gint _tmp97_;
+ gint _tmp98_;
+ GeeSortedSet* _tmp99_;
+ gint _tmp100_;
+ gint _tmp101_;
+ GeeSortedMap* _tmp102_;
+ GeeSortedMap* _tmp103_ = NULL;
+ GeeSortedSet* _tmp104_;
+ GeeSortedSet* _tmp105_ = NULL;
+ GeeSortedSet* _tmp106_;
+ GeeMapEntry* _tmp107_ = NULL;
+ GeeMapEntry* _tmp108_;
+ GeeSortedSet* _tmp109_ = NULL;
+ GeeSortedMap* _tmp110_;
+ gint _tmp111_;
+ gint _tmp112_;
+ GeeSortedSet* _tmp113_;
+ gint _tmp114_;
+ gint _tmp115_;
+ GeeSortedSet* _tmp116_;
+ gint _tmp117_;
+ gint _tmp118_;
+ GeeSortedMap* _tmp119_;
+ GeeSortedMap* _tmp120_ = NULL;
+ GeeSortedSet* _tmp121_;
+ GeeSortedSet* _tmp122_ = NULL;
+ GeeSortedSet* _tmp123_;
+ GeeMapEntry* _tmp124_ = NULL;
+ GeeMapEntry* _tmp125_;
+ GeeMapEntry* _tmp126_ = NULL;
+ GeeMapEntry* _tmp127_;
+ GeeSortedSet* _tmp128_ = NULL;
+ GeeSortedMap* _tmp129_;
+ gint _tmp130_;
+ gint _tmp131_;
+ GeeSortedSet* _tmp132_;
+ gint _tmp133_;
+ gint _tmp134_;
+ GeeSortedSet* _tmp135_;
+ gint _tmp136_;
+ gint _tmp137_;
+ _tmp84_ = self->priv->submap;
+ _tmp85_ = gee_sorted_map_head_map (_tmp84_, "two");
+ subsubmap = _tmp85_;
+ _tmp86_ = keys;
+ _tmp87_ = gee_sorted_set_head_set (_tmp86_, "two");
+ keyssubset = _tmp87_;
+ _tmp88_ = entries;
+ _tmp89_ = map_tests_entry_for ("two", "two");
+ _tmp90_ = _tmp89_;
+ _tmp91_ = gee_sorted_set_head_set (_tmp88_, _tmp90_);
+ _tmp92_ = _tmp91_;
+ _g_object_unref0 (_tmp90_);
+ entriessubset = _tmp92_;
+ _tmp93_ = subsubmap;
+ _tmp94_ = gee_map_get_size ((GeeMap*) _tmp93_);
+ _tmp95_ = _tmp94_;
+ _vala_assert (_tmp95_ == 2, "subsubmap.size == 2");
+ _tmp96_ = keyssubset;
+ _tmp97_ = gee_collection_get_size ((GeeCollection*) _tmp96_);
+ _tmp98_ = _tmp97_;
+ _vala_assert (_tmp98_ == 2, "keyssubset.size == 2");
+ _tmp99_ = entriessubset;
+ _tmp100_ = gee_collection_get_size ((GeeCollection*) _tmp99_);
+ _tmp101_ = _tmp100_;
+ _vala_assert (_tmp101_ == 2, "entriessubset.size == 2");
+ _tmp102_ = self->priv->submap;
+ _tmp103_ = gee_sorted_map_tail_map (_tmp102_, "three");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp103_;
+ _tmp104_ = keys;
+ _tmp105_ = gee_sorted_set_tail_set (_tmp104_, "three");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp105_;
+ _tmp106_ = entries;
+ _tmp107_ = map_tests_entry_for ("three", "three");
+ _tmp108_ = _tmp107_;
+ _tmp109_ = gee_sorted_set_tail_set (_tmp106_, _tmp108_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp109_;
+ _g_object_unref0 (_tmp108_);
+ _tmp110_ = subsubmap;
+ _tmp111_ = gee_map_get_size ((GeeMap*) _tmp110_);
+ _tmp112_ = _tmp111_;
+ _vala_assert (_tmp112_ == 2, "subsubmap.size == 2");
+ _tmp113_ = keyssubset;
+ _tmp114_ = gee_collection_get_size ((GeeCollection*) _tmp113_);
+ _tmp115_ = _tmp114_;
+ _vala_assert (_tmp115_ == 2, "keyssubset.size == 2");
+ _tmp116_ = entriessubset;
+ _tmp117_ = gee_collection_get_size ((GeeCollection*) _tmp116_);
+ _tmp118_ = _tmp117_;
+ _vala_assert (_tmp118_ == 2, "entriessubset.size == 2");
+ _tmp119_ = self->priv->submap;
+ _tmp120_ = gee_sorted_map_sub_map (_tmp119_, "three", "two");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp120_;
+ _tmp121_ = keys;
+ _tmp122_ = gee_sorted_set_sub_set (_tmp121_, "three", "two");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp122_;
+ _tmp123_ = entries;
+ _tmp124_ = map_tests_entry_for ("three", "three");
+ _tmp125_ = _tmp124_;
+ _tmp126_ = map_tests_entry_for ("two", "two");
+ _tmp127_ = _tmp126_;
+ _tmp128_ = gee_sorted_set_sub_set (_tmp123_, _tmp125_, _tmp127_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp128_;
+ _g_object_unref0 (_tmp127_);
+ _g_object_unref0 (_tmp125_);
+ _tmp129_ = subsubmap;
+ _tmp130_ = gee_map_get_size ((GeeMap*) _tmp129_);
+ _tmp131_ = _tmp130_;
+ _vala_assert (_tmp131_ == 1, "subsubmap.size == 1");
+ _tmp132_ = keyssubset;
+ _tmp133_ = gee_collection_get_size ((GeeCollection*) _tmp132_);
+ _tmp134_ = _tmp133_;
+ _vala_assert (_tmp134_ == 1, "keyssubset.size == 1");
+ _tmp135_ = entriessubset;
+ _tmp136_ = gee_collection_get_size ((GeeCollection*) _tmp135_);
+ _tmp137_ = _tmp136_;
+ _vala_assert (_tmp137_ == 1, "entriessubset.size == 1");
+ _g_object_unref0 (entriessubset);
+ _g_object_unref0 (keyssubset);
+ _g_object_unref0 (subsubmap);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_SUB:
+ {
+ GeeSortedMap* _tmp138_;
+ GeeSortedMap* _tmp139_ = NULL;
+ GeeSortedMap* subsubmap;
+ GeeSortedSet* _tmp140_;
+ GeeSortedSet* _tmp141_ = NULL;
+ GeeSortedSet* keyssubset;
+ GeeSortedSet* _tmp142_;
+ GeeMapEntry* _tmp143_ = NULL;
+ GeeMapEntry* _tmp144_;
+ GeeSortedSet* _tmp145_ = NULL;
+ GeeSortedSet* _tmp146_;
+ GeeSortedSet* entriessubset;
+ GeeSortedMap* _tmp147_;
+ gint _tmp148_;
+ gint _tmp149_;
+ GeeSortedSet* _tmp150_;
+ gint _tmp151_;
+ gint _tmp152_;
+ GeeSortedSet* _tmp153_;
+ gint _tmp154_;
+ gint _tmp155_;
+ GeeSortedMap* _tmp156_;
+ GeeSortedMap* _tmp157_ = NULL;
+ GeeSortedSet* _tmp158_;
+ GeeSortedSet* _tmp159_ = NULL;
+ GeeSortedSet* _tmp160_;
+ GeeMapEntry* _tmp161_ = NULL;
+ GeeMapEntry* _tmp162_;
+ GeeSortedSet* _tmp163_ = NULL;
+ GeeSortedMap* _tmp164_;
+ gint _tmp165_;
+ gint _tmp166_;
+ GeeSortedSet* _tmp167_;
+ gint _tmp168_;
+ gint _tmp169_;
+ GeeSortedSet* _tmp170_;
+ gint _tmp171_;
+ gint _tmp172_;
+ GeeSortedMap* _tmp173_;
+ GeeSortedMap* _tmp174_ = NULL;
+ GeeSortedSet* _tmp175_;
+ GeeSortedSet* _tmp176_ = NULL;
+ GeeSortedSet* _tmp177_;
+ GeeMapEntry* _tmp178_ = NULL;
+ GeeMapEntry* _tmp179_;
+ GeeMapEntry* _tmp180_ = NULL;
+ GeeMapEntry* _tmp181_;
+ GeeSortedSet* _tmp182_ = NULL;
+ GeeSortedMap* _tmp183_;
+ gint _tmp184_;
+ gint _tmp185_;
+ GeeSortedSet* _tmp186_;
+ gint _tmp187_;
+ gint _tmp188_;
+ GeeSortedSet* _tmp189_;
+ gint _tmp190_;
+ gint _tmp191_;
+ GeeSortedMap* _tmp192_;
+ GeeSortedMap* _tmp193_ = NULL;
+ GeeSortedSet* _tmp194_;
+ GeeSortedSet* _tmp195_ = NULL;
+ GeeSortedSet* _tmp196_;
+ GeeMapEntry* _tmp197_ = NULL;
+ GeeMapEntry* _tmp198_;
+ GeeMapEntry* _tmp199_ = NULL;
+ GeeMapEntry* _tmp200_;
+ GeeSortedSet* _tmp201_ = NULL;
+ GeeSortedMap* _tmp202_;
+ gint _tmp203_;
+ gint _tmp204_;
+ GeeSortedSet* _tmp205_;
+ gint _tmp206_;
+ gint _tmp207_;
+ GeeSortedSet* _tmp208_;
+ gint _tmp209_;
+ gint _tmp210_;
+ _tmp138_ = self->priv->submap;
+ _tmp139_ = gee_sorted_map_head_map (_tmp138_, "six");
+ subsubmap = _tmp139_;
+ _tmp140_ = keys;
+ _tmp141_ = gee_sorted_set_head_set (_tmp140_, "six");
+ keyssubset = _tmp141_;
+ _tmp142_ = entries;
+ _tmp143_ = map_tests_entry_for ("six", "six");
+ _tmp144_ = _tmp143_;
+ _tmp145_ = gee_sorted_set_head_set (_tmp142_, _tmp144_);
+ _tmp146_ = _tmp145_;
+ _g_object_unref0 (_tmp144_);
+ entriessubset = _tmp146_;
+ _tmp147_ = subsubmap;
+ _tmp148_ = gee_map_get_size ((GeeMap*) _tmp147_);
+ _tmp149_ = _tmp148_;
+ _vala_assert (_tmp149_ == 2, "subsubmap.size == 2");
+ _tmp150_ = keyssubset;
+ _tmp151_ = gee_collection_get_size ((GeeCollection*) _tmp150_);
+ _tmp152_ = _tmp151_;
+ _vala_assert (_tmp152_ == 2, "keyssubset.size == 2");
+ _tmp153_ = entriessubset;
+ _tmp154_ = gee_collection_get_size ((GeeCollection*) _tmp153_);
+ _tmp155_ = _tmp154_;
+ _vala_assert (_tmp155_ == 2, "entriessubset.size == 2");
+ _tmp156_ = self->priv->submap;
+ _tmp157_ = gee_sorted_map_tail_map (_tmp156_, "one");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp157_;
+ _tmp158_ = keys;
+ _tmp159_ = gee_sorted_set_tail_set (_tmp158_, "one");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp159_;
+ _tmp160_ = entries;
+ _tmp161_ = map_tests_entry_for ("one", "one");
+ _tmp162_ = _tmp161_;
+ _tmp163_ = gee_sorted_set_tail_set (_tmp160_, _tmp162_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp163_;
+ _g_object_unref0 (_tmp162_);
+ _tmp164_ = subsubmap;
+ _tmp165_ = gee_map_get_size ((GeeMap*) _tmp164_);
+ _tmp166_ = _tmp165_;
+ _vala_assert (_tmp166_ == 2, "subsubmap.size == 2");
+ _tmp167_ = keyssubset;
+ _tmp168_ = gee_collection_get_size ((GeeCollection*) _tmp167_);
+ _tmp169_ = _tmp168_;
+ _vala_assert (_tmp169_ == 2, "keyssubset.size == 2");
+ _tmp170_ = entriessubset;
+ _tmp171_ = gee_collection_get_size ((GeeCollection*) _tmp170_);
+ _tmp172_ = _tmp171_;
+ _vala_assert (_tmp172_ == 2, "entriessubset.size == 2");
+ _tmp173_ = self->priv->submap;
+ _tmp174_ = gee_sorted_map_sub_map (_tmp173_, "one", "six");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp174_;
+ _tmp175_ = keys;
+ _tmp176_ = gee_sorted_set_sub_set (_tmp175_, "one", "six");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp176_;
+ _tmp177_ = entries;
+ _tmp178_ = map_tests_entry_for ("one", "one");
+ _tmp179_ = _tmp178_;
+ _tmp180_ = map_tests_entry_for ("six", "six");
+ _tmp181_ = _tmp180_;
+ _tmp182_ = gee_sorted_set_sub_set (_tmp177_, _tmp179_, _tmp181_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp182_;
+ _g_object_unref0 (_tmp181_);
+ _g_object_unref0 (_tmp179_);
+ _tmp183_ = subsubmap;
+ _tmp184_ = gee_map_get_size ((GeeMap*) _tmp183_);
+ _tmp185_ = _tmp184_;
+ _vala_assert (_tmp185_ == 1, "subsubmap.size == 1");
+ _tmp186_ = keyssubset;
+ _tmp187_ = gee_collection_get_size ((GeeCollection*) _tmp186_);
+ _tmp188_ = _tmp187_;
+ _vala_assert (_tmp188_ == 1, "keyssubset.size == 1");
+ _tmp189_ = entriessubset;
+ _tmp190_ = gee_collection_get_size ((GeeCollection*) _tmp189_);
+ _tmp191_ = _tmp190_;
+ _vala_assert (_tmp191_ == 1, "entriessubset.size == 1");
+ _tmp192_ = self->priv->submap;
+ _tmp193_ = gee_sorted_map_sub_map (_tmp192_, "five", "two");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp193_;
+ _tmp194_ = keys;
+ _tmp195_ = gee_sorted_set_sub_set (_tmp194_, "five", "two");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp195_;
+ _tmp196_ = entries;
+ _tmp197_ = map_tests_entry_for ("five", "five");
+ _tmp198_ = _tmp197_;
+ _tmp199_ = map_tests_entry_for ("two", "two");
+ _tmp200_ = _tmp199_;
+ _tmp201_ = gee_sorted_set_sub_set (_tmp196_, _tmp198_, _tmp200_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp201_;
+ _g_object_unref0 (_tmp200_);
+ _g_object_unref0 (_tmp198_);
+ _tmp202_ = subsubmap;
+ _tmp203_ = gee_map_get_size ((GeeMap*) _tmp202_);
+ _tmp204_ = _tmp203_;
+ _vala_assert (_tmp204_ == 3, "subsubmap.size == 3");
+ _tmp205_ = keyssubset;
+ _tmp206_ = gee_collection_get_size ((GeeCollection*) _tmp205_);
+ _tmp207_ = _tmp206_;
+ _vala_assert (_tmp207_ == 3, "keyssubset.size == 3");
+ _tmp208_ = entriessubset;
+ _tmp209_ = gee_collection_get_size ((GeeCollection*) _tmp208_);
+ _tmp210_ = _tmp209_;
+ _vala_assert (_tmp210_ == 3, "entriessubset.size == 3");
+ _g_object_unref0 (entriessubset);
+ _g_object_unref0 (keyssubset);
+ _g_object_unref0 (subsubmap);
+ break;
+ }
+ case GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_TYPE_EMPTY:
+ {
+ GeeSortedMap* _tmp211_;
+ GeeSortedMap* _tmp212_ = NULL;
+ GeeSortedMap* subsubmap;
+ GeeSortedSet* _tmp213_;
+ GeeSortedSet* _tmp214_ = NULL;
+ GeeSortedSet* keyssubset;
+ GeeSortedSet* _tmp215_;
+ GeeMapEntry* _tmp216_ = NULL;
+ GeeMapEntry* _tmp217_;
+ GeeSortedSet* _tmp218_ = NULL;
+ GeeSortedSet* _tmp219_;
+ GeeSortedSet* entriessubset;
+ GeeSortedMap* _tmp220_;
+ gint _tmp221_;
+ gint _tmp222_;
+ GeeSortedSet* _tmp223_;
+ gint _tmp224_;
+ gint _tmp225_;
+ GeeSortedSet* _tmp226_;
+ gint _tmp227_;
+ gint _tmp228_;
+ GeeSortedMap* _tmp229_;
+ GeeSortedMap* _tmp230_ = NULL;
+ GeeSortedSet* _tmp231_;
+ GeeSortedSet* _tmp232_ = NULL;
+ GeeSortedSet* _tmp233_;
+ GeeMapEntry* _tmp234_ = NULL;
+ GeeMapEntry* _tmp235_;
+ GeeSortedSet* _tmp236_ = NULL;
+ GeeSortedMap* _tmp237_;
+ gint _tmp238_;
+ gint _tmp239_;
+ GeeSortedSet* _tmp240_;
+ gint _tmp241_;
+ gint _tmp242_;
+ GeeSortedSet* _tmp243_;
+ gint _tmp244_;
+ gint _tmp245_;
+ GeeSortedMap* _tmp246_;
+ GeeSortedMap* _tmp247_ = NULL;
+ GeeSortedSet* _tmp248_;
+ GeeSortedSet* _tmp249_ = NULL;
+ GeeSortedSet* _tmp250_;
+ GeeMapEntry* _tmp251_ = NULL;
+ GeeMapEntry* _tmp252_;
+ GeeMapEntry* _tmp253_ = NULL;
+ GeeMapEntry* _tmp254_;
+ GeeSortedSet* _tmp255_ = NULL;
+ GeeSortedMap* _tmp256_;
+ gint _tmp257_;
+ gint _tmp258_;
+ GeeSortedSet* _tmp259_;
+ gint _tmp260_;
+ gint _tmp261_;
+ GeeSortedSet* _tmp262_;
+ gint _tmp263_;
+ gint _tmp264_;
+ _tmp211_ = self->priv->submap;
+ _tmp212_ = gee_sorted_map_head_map (_tmp211_, "six");
+ subsubmap = _tmp212_;
+ _tmp213_ = keys;
+ _tmp214_ = gee_sorted_set_head_set (_tmp213_, "six");
+ keyssubset = _tmp214_;
+ _tmp215_ = entries;
+ _tmp216_ = map_tests_entry_for ("six", "six");
+ _tmp217_ = _tmp216_;
+ _tmp218_ = gee_sorted_set_head_set (_tmp215_, _tmp217_);
+ _tmp219_ = _tmp218_;
+ _g_object_unref0 (_tmp217_);
+ entriessubset = _tmp219_;
+ _tmp220_ = subsubmap;
+ _tmp221_ = gee_map_get_size ((GeeMap*) _tmp220_);
+ _tmp222_ = _tmp221_;
+ _vala_assert (_tmp222_ == 0, "subsubmap.size == 0");
+ _tmp223_ = keyssubset;
+ _tmp224_ = gee_collection_get_size ((GeeCollection*) _tmp223_);
+ _tmp225_ = _tmp224_;
+ _vala_assert (_tmp225_ == 0, "keyssubset.size == 0");
+ _tmp226_ = entriessubset;
+ _tmp227_ = gee_collection_get_size ((GeeCollection*) _tmp226_);
+ _tmp228_ = _tmp227_;
+ _vala_assert (_tmp228_ == 0, "entriessubset.size == 0");
+ _tmp229_ = self->priv->submap;
+ _tmp230_ = gee_sorted_map_tail_map (_tmp229_, "three");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp230_;
+ _tmp231_ = keys;
+ _tmp232_ = gee_sorted_set_tail_set (_tmp231_, "three");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp232_;
+ _tmp233_ = entries;
+ _tmp234_ = map_tests_entry_for ("three", "three");
+ _tmp235_ = _tmp234_;
+ _tmp236_ = gee_sorted_set_tail_set (_tmp233_, _tmp235_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp236_;
+ _g_object_unref0 (_tmp235_);
+ _tmp237_ = subsubmap;
+ _tmp238_ = gee_map_get_size ((GeeMap*) _tmp237_);
+ _tmp239_ = _tmp238_;
+ _vala_assert (_tmp239_ == 0, "subsubmap.size == 0");
+ _tmp240_ = keyssubset;
+ _tmp241_ = gee_collection_get_size ((GeeCollection*) _tmp240_);
+ _tmp242_ = _tmp241_;
+ _vala_assert (_tmp242_ == 0, "keyssubset.size == 0");
+ _tmp243_ = entriessubset;
+ _tmp244_ = gee_collection_get_size ((GeeCollection*) _tmp243_);
+ _tmp245_ = _tmp244_;
+ _vala_assert (_tmp245_ == 0, "entriessubset.size == 0");
+ _tmp246_ = self->priv->submap;
+ _tmp247_ = gee_sorted_map_sub_map (_tmp246_, "one", "six");
+ _g_object_unref0 (subsubmap);
+ subsubmap = _tmp247_;
+ _tmp248_ = keys;
+ _tmp249_ = gee_sorted_set_sub_set (_tmp248_, "one", "six");
+ _g_object_unref0 (keyssubset);
+ keyssubset = _tmp249_;
+ _tmp250_ = entries;
+ _tmp251_ = map_tests_entry_for ("one", "one");
+ _tmp252_ = _tmp251_;
+ _tmp253_ = map_tests_entry_for ("six", "six");
+ _tmp254_ = _tmp253_;
+ _tmp255_ = gee_sorted_set_sub_set (_tmp250_, _tmp252_, _tmp254_);
+ _g_object_unref0 (entriessubset);
+ entriessubset = _tmp255_;
+ _g_object_unref0 (_tmp254_);
+ _g_object_unref0 (_tmp252_);
+ _tmp256_ = subsubmap;
+ _tmp257_ = gee_map_get_size ((GeeMap*) _tmp256_);
+ _tmp258_ = _tmp257_;
+ _vala_assert (_tmp258_ == 0, "subsubmap.size == 0");
+ _tmp259_ = keyssubset;
+ _tmp260_ = gee_collection_get_size ((GeeCollection*) _tmp259_);
+ _tmp261_ = _tmp260_;
+ _vala_assert (_tmp261_ == 0, "keyssubset.size == 0");
+ _tmp262_ = entriessubset;
+ _tmp263_ = gee_collection_get_size ((GeeCollection*) _tmp262_);
+ _tmp264_ = _tmp263_;
+ _vala_assert (_tmp264_ == 0, "entriessubset.size == 0");
+ _g_object_unref0 (entriessubset);
+ _g_object_unref0 (keyssubset);
+ _g_object_unref0 (subsubmap);
+ break;
+ }
+ default:
+ {
+ g_assert_not_reached ();
+ }
+ }
+ _g_object_unref0 (entries);
+ _g_object_unref0 (keys);
+ not_contains = (_vala_array_free (not_contains, not_contains_length1, (GDestroyNotify) g_free), NULL);
+ contains = (_vala_array_free (contains, contains_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+static void gee_sorted_map_tests_sub_map_tests_class_init (GeeSortedMapTestsSubMapTestsClass * klass) {
+ gee_sorted_map_tests_sub_map_tests_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (GeeSortedMapTestsSubMapTestsPrivate));
+ GEE_TEST_CASE_CLASS (klass)->set_up = gee_sorted_map_tests_sub_map_tests_real_set_up;
+ GEE_TEST_CASE_CLASS (klass)->tear_down = gee_sorted_map_tests_sub_map_tests_real_tear_down;
+ G_OBJECT_CLASS (klass)->finalize = gee_sorted_map_tests_sub_map_tests_finalize;
+}
+
+
+static void gee_sorted_map_tests_sub_map_tests_instance_init (GeeSortedMapTestsSubMapTests * self) {
+ self->priv = GEE_SORTED_MAP_TESTS_SUB_MAP_TESTS_GET_PRIVATE (self);
+}
+
+
+static void gee_sorted_map_tests_sub_map_tests_finalize (GObject* obj) {
+ GeeSortedMapTestsSubMapTests * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_SORTED_MAP_TESTS_TYPE_SUB_MAP_TESTS, GeeSortedMapTestsSubMapTests);
+ _g_object_unref0 (self->priv->master);
+ _g_object_unref0 (self->priv->submap);
+ _g_object_unref0 (self->priv->test);
+ G_OBJECT_CLASS (gee_sorted_map_tests_sub_map_tests_parent_class)->finalize (obj);
+}
+
+
+GType gee_sorted_map_tests_sub_map_tests_get_type (void) {
+ static volatile gsize gee_sorted_map_tests_sub_map_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&gee_sorted_map_tests_sub_map_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (GeeSortedMapTestsSubMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_sorted_map_tests_sub_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeSortedMapTestsSubMapTests), 0, (GInstanceInitFunc) gee_sorted_map_tests_sub_map_tests_instance_init, NULL };
+ GType gee_sorted_map_tests_sub_map_tests_type_id;
+ gee_sorted_map_tests_sub_map_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "GeeSortedMapTestsSubMapTests", &g_define_type_info, 0);
+ g_once_init_leave (&gee_sorted_map_tests_sub_map_tests_type_id__volatile, gee_sorted_map_tests_sub_map_tests_type_id);
+ }
+ return gee_sorted_map_tests_sub_map_tests_type_id__volatile;
+}
+
+
+static void gee_sorted_map_tests_class_init (GeeSortedMapTestsClass * klass) {
+ gee_sorted_map_tests_parent_class = g_type_class_peek_parent (klass);
+}
+
+
+static void gee_sorted_map_tests_instance_init (GeeSortedMapTests * self) {
+}
+
+
+GType gee_sorted_map_tests_get_type (void) {
+ static volatile gsize gee_sorted_map_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&gee_sorted_map_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (GeeSortedMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_sorted_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeSortedMapTests), 0, (GInstanceInitFunc) gee_sorted_map_tests_instance_init, NULL };
+ GType gee_sorted_map_tests_type_id;
+ gee_sorted_map_tests_type_id = g_type_register_static (TYPE_MAP_TESTS, "GeeSortedMapTests", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
+ g_once_init_leave (&gee_sorted_map_tests_type_id__volatile, gee_sorted_map_tests_type_id);
+ }
+ return gee_sorted_map_tests_type_id__volatile;
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/tests/testsortedmap.vala b/tests/testsortedmap.vala
new file mode 100644
index 0000000..abfbfc8
--- /dev/null
+++ b/tests/testsortedmap.vala
@@ -0,0 +1,1174 @@
+/* sortedset.vala
+ *
+ * Copyright (C) 2009-2011 Maciej Piechotka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Maciej Piechotka <uzytkownik2@gmail.com>
+ */
+
+public abstract class Gee.SortedMapTests : MapTests {
+ public SortedMapTests (string name) {
+ base (name);
+ add_test ("[SortedMap] key ordering", test_key_ordering);
+ add_test ("[SortedMap] first", test_first);
+ add_test ("[SortedMap] last", test_last);
+ add_test ("[SortedMap] iterator_at", test_iterator_at);
+ add_test ("[SortedMap] lower", test_lower);
+ add_test ("[SortedMap] higher", test_higher);
+ add_test ("[SortedMap] floor", test_floor);
+ add_test ("[SortedMap] ceil", test_ceil);
+ get_suite ().add_suite (new SubMapTests (this, SubMapTests.Type.HEAD).get_suite ());
+ get_suite ().add_suite (new SubMapTests (this, SubMapTests.Type.TAIL).get_suite ());
+ get_suite ().add_suite (new SubMapTests (this, SubMapTests.Type.SUB).get_suite ());
+ get_suite ().add_suite (new SubMapTests (this, SubMapTests.Type.EMPTY).get_suite ());
+ }
+
+ public void test_key_ordering () {
+ var test_sorted_map = test_map as SortedMap<string,string>;
+
+ // Check the map exists
+ assert (test_sorted_map != null);
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+ test_sorted_map.set ("seven", "seven");
+ test_sorted_map.set ("eight", "eight");
+ test_sorted_map.set ("nine", "nine");
+ test_sorted_map.set ("ten", "ten");
+ test_sorted_map.set ("eleven", "eleven");
+ test_sorted_map.set ("twelve", "twelve");
+
+ Iterator<string> iterator = test_sorted_map.keys.iterator ();
+ assert (iterator.next ());
+ assert (iterator.get () == "eight");
+ assert (iterator.next ());
+ assert (iterator.get () == "eleven");
+ assert (iterator.next ());
+ assert (iterator.get () == "five");
+ assert (iterator.next ());
+ assert (iterator.get () == "four");
+ assert (iterator.next ());
+ assert (iterator.get () == "nine");
+ assert (iterator.next ());
+ assert (iterator.get () == "one");
+ assert (iterator.next ());
+ assert (iterator.get () == "seven");
+ assert (iterator.next ());
+ assert (iterator.get () == "six");
+ assert (iterator.next ());
+ assert (iterator.get () == "ten");
+ assert (iterator.next ());
+ assert (iterator.get () == "three");
+ assert (iterator.next ());
+ assert (iterator.get () == "twelve");
+ assert (iterator.next ());
+ assert (iterator.get () == "two");
+ assert (iterator.next () == false);
+ }
+
+ public void test_first () {
+ var test_sorted_map = test_map as SortedMap<string,string>;
+ var keys = test_sorted_map.ascending_keys;
+ var entries = test_sorted_map.ascending_entries;
+
+ // Check the map exists
+ assert (test_sorted_map != null);
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys.first ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ entries.first ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+ test_sorted_map.set ("seven", "seven");
+ test_sorted_map.set ("eight", "eight");
+ test_sorted_map.set ("nine", "nine");
+ test_sorted_map.set ("ten", "ten");
+ test_sorted_map.set ("eleven", "eleven");
+ test_sorted_map.set ("twelve", "twelve");
+
+ assert (keys.first () == "eight");
+ /*assert_entry (entries.first (), "eight", "eight");*/
+ }
+
+ public void test_last () {
+ var test_sorted_map = test_map as SortedMap<string,string>;
+ var keys = test_sorted_map.ascending_keys;
+ var entries = test_sorted_map.ascending_entries;
+ // Check the map exists
+ assert (test_sorted_map != null);
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys.last ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ entries.last ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+ test_sorted_map.set ("seven", "seven");
+ test_sorted_map.set ("eight", "eight");
+ test_sorted_map.set ("nine", "nine");
+ test_sorted_map.set ("ten", "ten");
+ test_sorted_map.set ("eleven", "eleven");
+ test_sorted_map.set ("twelve", "twelve");
+
+ assert (keys.last () == "two");
+ assert_entry (entries.last (), "two", "two");
+ }
+
+ public void test_iterator_at () {
+ var test_sorted_map = test_map as SortedMap<string,string>;
+ var keys = test_sorted_map.ascending_keys;
+ var entries = test_sorted_map.ascending_entries;
+
+ test_map.set ("one", "one");
+ test_map.set ("two", "two");
+ test_map.set ("three", "three");
+
+ var keys_iter = keys.iterator_at ("one");
+ assert (keys_iter != null);
+ assert (keys_iter.get () == "one");
+
+ var entries_iter = entries.iterator_at (entry_for ("one", "one"));
+ assert (entries_iter != null);
+ assert_entry (entries_iter.get (), "one", "one");
+
+ keys_iter = keys.iterator_at ("two");
+ assert (keys_iter != null);
+ assert (keys_iter.get () == "two");
+
+ entries_iter = entries.iterator_at (entry_for ("two", "two"));
+ assert (entries_iter != null);
+ assert_entry (entries_iter.get (), "two", "two");
+
+ keys_iter = keys.iterator_at ("three");
+ assert (keys_iter != null);
+ assert (keys_iter.get () == "three");
+
+ entries_iter = entries.iterator_at (entry_for ("three", "three"));
+ assert (entries_iter != null);
+ assert_entry (entries_iter.get (), "three", "three");
+
+ keys_iter = keys.iterator_at ("zero");
+ assert (keys_iter == null);
+
+ entries_iter = entries.iterator_at (entry_for ("zero", "zero"));
+ assert (entries_iter == null);
+ }
+
+ public void test_lower () {
+ var test_sorted_map = test_map as SortedMap<string,string>;
+ var keys = test_sorted_map.ascending_keys;
+ var entries = test_sorted_map.ascending_entries;
+
+ assert (keys.lower ("one") == null);
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+
+ assert (keys.lower ("one") == "four");
+ assert_entry (entries.lower (entry_for ("one", "one")), "four", "four");
+
+ assert (keys.lower ("o") == "four");
+ assert_entry (entries.lower (entry_for ("o", "one")), "four", "four");
+
+ assert (keys.lower ("two") == "three");
+ assert_entry (entries.lower (entry_for ("two", "two")), "three", "three");
+
+ assert (keys.lower ("t") == "six");
+ assert_entry (entries.lower (entry_for ("t", "two")), "six", "six");
+
+ assert (keys.lower ("three") == "six");
+ assert_entry (entries.lower (entry_for ("three", "three")), "six", "six");
+
+ assert (keys.lower ("four") == "five");
+ assert_entry (entries.lower (entry_for ("four", "four")), "five", "five");
+
+ assert (keys.lower ("f") == null);
+ assert (entries.lower (entry_for ("f", "four")) == null);
+
+ assert (keys.lower ("five") == null);
+ assert (entries.lower (entry_for ("five", "five")) == null);
+
+ assert (keys.lower ("six") == "one");
+ assert_entry (entries.lower (entry_for ("six", "six")), "one", "one");
+
+ assert (keys.lower ("s") == "one");
+ assert_entry (entries.lower (entry_for ("s", "six")), "one", "one");
+
+ }
+
+ public void test_higher () {
+ var test_sorted_map = test_map as SortedMap<string,string>;
+ var keys = test_sorted_map.ascending_keys;
+ var entries = test_sorted_map.ascending_entries;
+
+ assert (keys.higher ("one") == null);
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+
+ assert (keys.higher ("one") == "six");
+ assert_entry (entries.higher (entry_for ("one", "one")), "six", "six");
+
+ assert (keys.higher ("o") == "one");
+ assert_entry (entries.higher (entry_for ("o", "one")), "one", "one");
+
+ assert (keys.higher ("two") == null);
+ assert (entries.higher (entry_for ("two", "two")) == null);
+
+ assert (keys.higher ("t") == "three");
+ assert_entry (entries.higher (entry_for ("t", "two")), "three", "three");
+
+ assert (keys.higher ("three") == "two");
+ assert_entry (entries.higher (entry_for ("three", "three")), "two", "two");
+
+ assert (keys.higher ("four") == "one");
+ assert_entry (entries.higher (entry_for ("four", "four")), "one", "one");
+
+ assert (keys.higher ("f") == "five");
+ assert_entry (entries.higher (entry_for ("f", "four")), "five", "five");
+
+ assert (keys.higher ("five") == "four");
+ assert_entry (entries.higher (entry_for ("five", "five")), "four", "four");
+
+ assert (keys.higher ("six") == "three");
+ assert_entry (entries.higher (entry_for ("six", "six")), "three", "three");
+
+ assert (keys.higher ("s") == "six");
+ assert_entry (entries.higher (entry_for ("s", "six")), "six", "six");
+ }
+
+ public void test_floor () {
+ var test_sorted_map = test_map as SortedMap<string,string>;
+ var keys = test_sorted_map.ascending_keys;
+ var entries = test_sorted_map.ascending_entries;
+
+ assert (keys.floor ("one") == null);
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+
+ assert (keys.floor ("one") == "one");
+ assert_entry (entries.floor (entry_for ("one", "one")), "one", "one");
+
+ assert (keys.floor ("o") == "four");
+ assert_entry (entries.floor (entry_for ("o", "one")), "four", "four");
+
+ assert (keys.floor ("two") == "two");
+ assert_entry (entries.floor (entry_for ("two", "two")), "two", "two");
+
+ assert (keys.floor ("t") == "six");
+ assert_entry (entries.floor (entry_for ("t", "two")), "six", "six");
+
+ assert (keys.floor ("three") == "three");
+ assert_entry (entries.floor (entry_for ("three", "three")), "three", "three");
+
+ assert (keys.floor ("four") == "four");
+ assert_entry (entries.floor (entry_for ("four", "four")), "four", "four");
+
+ assert (keys.floor ("f") == null);
+ assert (entries.floor (entry_for ("f", "four")) == null);
+
+ assert (keys.floor ("five") == "five");
+ assert_entry (entries.floor (entry_for ("five", "five")), "five", "five");
+
+ assert (keys.floor ("six") == "six");
+ assert_entry (entries.floor (entry_for ("six", "six")), "six", "six");
+
+ assert (keys.floor ("s") == "one");
+ assert_entry (entries.floor (entry_for ("s", "six")), "one", "one");
+ }
+
+ public void test_ceil () {
+ var test_sorted_map = test_map as SortedMap<string,string>;
+ var keys = test_sorted_map.ascending_keys;
+ var entries = test_sorted_map.ascending_entries;
+
+ assert (keys.ceil ("one") == null);
+
+ test_sorted_map.set ("one", "one");
+ test_sorted_map.set ("two", "two");
+ test_sorted_map.set ("three", "three");
+ test_sorted_map.set ("four", "four");
+ test_sorted_map.set ("five", "five");
+ test_sorted_map.set ("six", "six");
+
+ assert (keys.ceil ("one") == "one");
+ assert_entry (entries.ceil (entry_for ("one", "one")), "one", "one");
+
+ assert (keys.ceil ("o") == "one");
+ assert_entry (entries.ceil (entry_for ("o", "one")), "one", "one");
+
+ assert (keys.ceil ("two") == "two");
+ assert_entry (entries.ceil (entry_for ("two", "two")), "two", "two");
+
+ assert (keys.ceil ("t") == "three");
+ assert_entry (entries.ceil (entry_for ("t", "two")), "three", "three");
+
+ assert (keys.ceil ("three") == "three");
+ assert_entry (entries.ceil (entry_for ("three", "three")), "three", "three");
+
+ assert (keys.ceil ("four") == "four");
+ assert_entry (entries.ceil (entry_for ("four", "four")), "four", "four");
+
+ assert (keys.ceil ("f") == "five");
+ assert_entry (entries.ceil (entry_for ("f", "four")), "five", "five");
+
+ assert (keys.ceil ("five") == "five");
+ assert_entry (entries.ceil (entry_for ("five", "five")), "five", "five");
+
+ assert (keys.ceil ("six") == "six");
+ assert_entry (entries.ceil (entry_for ("six", "six")), "six", "six");
+
+ assert (keys.ceil ("s") == "six");
+ assert_entry (entries.ceil (entry_for ("s", "six")), "six", "six");
+ }
+
+ public class SubMapTests : Gee.TestCase {
+ private SortedMap<string,string> master;
+ private SortedMap<string,string> submap;
+ private SortedMapTests test;
+ public enum Type {
+ HEAD,
+ TAIL,
+ SUB,
+ EMPTY;
+ public unowned string to_string () {
+ switch (this) {
+ case Type.HEAD: return "Head";
+ case Type.TAIL: return "Tail";
+ case Type.SUB: return "Range";
+ case Type.EMPTY: return "Empty";
+ default: assert_not_reached ();
+ }
+ }
+ }
+ private Type type;
+
+ public SubMapTests (SortedMapTests test, Type type) {
+ base ("%s Submap".printf (type.to_string ()));
+ this.test = test;
+ this.type = type;
+ add_test ("[Map] has_key, size and is_empty",
+ test_has_key_size_is_empty);
+ add_test ("[Map] keys", test_keys);
+ add_test ("[Map] values", test_values);
+ add_test ("[Map] entries", test_entries);
+ add_test ("[Map] get", test_get);
+ add_test ("[Map] set", test_set);
+ add_test ("[Map] unset", test_unset);
+ add_test ("[Map] clear", test_clear);
+ add_test ("[Map] iterators", test_iterators);
+ add_test ("[SortedMap] boundaries", test_boundaries);
+ add_test ("[SortedMap] lower", test_lower);
+ add_test ("[SortedMap] higher", test_higher);
+ add_test ("[SortedMap] floor", test_floor);
+ add_test ("[SortedMap] ceil", test_ceil);
+ add_test ("[SortedMap] iterator_at", test_iterator_at);
+ add_test ("[SortedMap] submap and subsets", test_submap_and_subsets);
+ }
+
+ public override void set_up () {
+ test.set_up ();
+ master = test.test_map as SortedMap<string,string>;
+ switch (type) {
+ case Type.HEAD:
+ submap = master.head_map ("one"); break;
+ case Type.TAIL:
+ submap = master.tail_map ("six"); break;
+ case Type.SUB:
+ submap = master.sub_map ("four", "three"); break;
+ case Type.EMPTY:
+ submap = master.sub_map ("three", "four"); break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public override void tear_down () {
+ test.tear_down ();
+ }
+
+ protected void set_default_values (out string[] contains = null, out string[] not_contains = null) {
+ master.set ("one", "one");
+ master.set ("two", "two");
+ master.set ("three", "three");
+ master.set ("four", "four");
+ master.set ("five", "five");
+ master.set ("six", "six");
+ switch (type) {
+ case Type.HEAD:
+ contains = {"five", "four"};
+ not_contains = {"one", "two", "three", "six"};
+ break;
+ case Type.TAIL:
+ contains = {"six", "three", "two"};
+ not_contains = {"one", "four", "five"};
+ break;
+ case Type.SUB:
+ contains = {"four", "one", "six"};
+ not_contains = {"two", "three", "five"};
+ break;
+ case Type.EMPTY:
+ contains = {};
+ not_contains = {"one", "two", "three", "four", "five", "six"};
+ break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public void test_has_key_size_is_empty () {
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ assert (submap.size == contains.length);
+ assert (submap.is_empty == (contains.length == 0));
+
+ foreach (var s in contains) {
+ assert (submap.has_key (s));
+ assert (submap.has (s, s));
+ }
+ foreach (var s in not_contains) {
+ assert (!submap.has_key (s));
+ assert (!submap.has (s, s));
+ }
+ }
+
+ public void test_get () {
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ foreach (var s in contains) {
+ assert (submap.get (s) == s);
+ }
+ }
+
+ public void test_keys () {
+ var keys = submap.keys;
+
+ assert (keys.size == 0);
+ assert (keys.is_empty);
+
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ assert (keys.size == contains.length);
+ foreach (var s in contains)
+ assert (keys.contains (s));
+ foreach (var s in not_contains)
+ assert (!keys.contains (s));
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys.add ("three");
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys.remove ("three");
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ }
+
+ public void test_values () {
+ var values = submap.values;
+
+ assert (values.size == 0);
+ assert (values.is_empty);
+
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ assert (values.size == contains.length);
+ foreach (var s in contains)
+ assert (values.contains (s));
+ foreach (var s in not_contains)
+ assert (!values.contains (s));
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ values.add ("three");
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ values.remove ("three");
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ }
+
+ public void test_entries () {
+ var entries = submap.entries;
+
+ assert (entries.size == 0);
+ assert (entries.is_empty);
+
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ assert (entries.size == contains.length);
+ foreach (var s in contains)
+ assert (entries.contains (MapTests.entry_for (s, s)));
+ foreach (var s in not_contains)
+ assert (!entries.contains (MapTests.entry_for (s, s)));
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ entries.add (MapTests.entry_for ("three", "three"));
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ entries.remove (MapTests.entry_for ("three", "three"));
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ }
+
+ public void test_set () {
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ string[] success, fail;
+ switch (type) {
+ case Type.HEAD:
+ success = {"a", "o"};
+ fail = {"oz", "z"};
+ break;
+ case Type.TAIL:
+ success = {"siz", "z"};
+ fail = {"sia", "a"};
+ break;
+ case Type.SUB:
+ success = {"o", "th"};
+ fail = {"f", "u"};
+ break;
+ case Type.EMPTY:
+ success = {};
+ fail = {"o", "th", "f", "u"};
+ break;
+ default:
+ assert_not_reached ();
+ }
+
+ foreach (var s in success) {
+ submap.set (s, s);
+ assert (submap.has (s, s));
+ assert (master.has (s, s));
+ }
+
+ foreach (var s in fail) {
+ submap.set (s, s);
+ assert (!submap.has_key (s));
+ assert (!master.has_key (s));
+ }
+
+ assert (master.size == 6 + success.length);
+ }
+
+ public void test_unset () {
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ foreach (var s in contains) {
+ string? value;
+ assert (submap.unset (s, out value));
+ assert (value == s);
+ assert (!master.has_key (s));
+ }
+ foreach (var s in not_contains) {
+ assert (!submap.unset (s));
+ assert (master.has (s, s));
+ }
+
+ assert (master.size == 6 - contains.length);
+ }
+
+ public void test_clear () {
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ submap.clear ();
+
+ foreach (var s in contains) {
+ assert (!master.has_key (s));
+ }
+ foreach (var s in not_contains) {
+ assert (!submap.unset (s));
+ assert (master.has (s, s));
+ }
+
+ assert (master.size == 6 - contains.length);
+ }
+
+ public void test_iterators () {
+ string[] contains, not_contains;
+
+ var _map_iter = submap.map_iterator ();
+
+ assert (!_map_iter.has_next ());
+ assert (!_map_iter.next ());
+
+ set_default_values (out contains, out not_contains);
+
+ var i = 0;
+ _map_iter = submap.map_iterator ();
+ while (_map_iter.next ()) {
+ assert (_map_iter.get_key () == contains[i]);
+ assert (_map_iter.get_value () == contains[i]);
+ i++;
+ }
+ assert (i == contains.length);
+
+ i = 0;
+ foreach (var k in submap.keys)
+ assert (k == contains[i++]);
+ assert (i == contains.length);
+
+ i = 0;
+ foreach (var e in submap.entries) {
+ MapTests.assert_entry (e, contains[i], contains[i]);
+ i++;
+ }
+ assert (i == contains.length);
+
+ if (type != Type.EMPTY) {
+ var map_iter = submap.map_iterator ();
+ assert (map_iter.next ());
+
+ assert (map_iter.get_key () == contains[0]);
+ assert (map_iter.get_value () == contains[0]);
+
+ assert (map_iter.has_next ());
+ assert (map_iter.next ());
+ assert (map_iter.get_key () == contains[1]);
+ assert (map_iter.get_value () == contains[1]);
+
+ // Repeat for keys
+ master.clear ();
+ set_default_values (out contains, out not_contains);
+ var keys_iter = submap.ascending_keys.iterator ();
+
+ assert (keys_iter.has_next ());
+ assert (keys_iter.next ());
+
+ assert (keys_iter.get () == contains[0]);
+ assert (keys_iter.has_next ());
+ assert (keys_iter.next ());
+ assert (keys_iter.get () == contains[1]);
+
+ // Repeat for entries
+ master.clear ();
+ set_default_values (out contains, out not_contains);
+ var entries_iter = submap.ascending_entries.iterator ();
+
+ assert (entries_iter.has_next ());
+ assert (entries_iter.next ());
+
+ MapTests.assert_entry (entries_iter.get (), contains[0], contains[0]);
+ assert (entries_iter.has_next ());
+ assert (entries_iter.next ());
+ MapTests.assert_entry (entries_iter.get (), contains[1], contains[1]);
+ } else {
+ var keys_iter = submap.ascending_keys.iterator ();
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys_iter.remove ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ }
+ }
+
+ public void test_boundaries () {
+ var keys = submap.ascending_keys;
+ var entries = submap.ascending_entries;
+
+ string[] contains, not_contains;
+
+ set_default_values (out contains, out not_contains);
+
+ switch (type) {
+ case Type.HEAD:
+ assert (keys.first () == "five");
+ assert (keys.last () == "four");
+ assert_entry (entries.first (), "five", "five");
+ assert_entry (entries.last (), "four", "four");
+ break;
+ case Type.TAIL:
+ assert (keys.first () == "six");
+ assert (keys.last () == "two");
+ assert_entry (entries.first (), "six", "six");
+ assert_entry (entries.last (), "two", "two");
+ break;
+ case Type.SUB:
+ assert (keys.first () == "four");
+ assert (keys.last () == "six");
+ assert_entry (entries.first (), "four", "four");
+ assert_entry (entries.last (), "six", "six");
+ break;
+ case Type.EMPTY:
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys.first ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ keys.last ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ entries.first ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ entries.last ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public void test_lower () {
+ string[] contains, not_contains;
+ var keys = submap.ascending_keys;
+ var entries = submap.ascending_entries;
+
+ set_default_values (out contains, out not_contains);
+
+ switch (type) {
+ case Type.HEAD:
+ assert (keys.lower ("a") == null);
+ assert (entries.lower (MapTests.entry_for ("a", "a")) == null);
+ assert (keys.lower ("five") == null);
+ assert (entries.lower (MapTests.entry_for ("five", "five")) == null);
+ assert (keys.lower ("four") == "five");
+ MapTests.assert_entry (entries.lower (MapTests.entry_for ("four", "four")), "five", "five");
+ assert (keys.lower ("six") == "four");
+ MapTests.assert_entry (entries.lower (MapTests.entry_for ("six", "six")), "four", "four");
+ break;
+ case Type.TAIL:
+ assert (keys.lower ("one") == null);
+ assert (entries.lower (MapTests.entry_for ("one", "one")) == null);
+ assert (keys.lower ("six") == null);
+ assert (entries.lower (MapTests.entry_for ("six", "six")) == null);
+ assert (keys.lower ("three") == "six");
+ MapTests.assert_entry (entries.lower (MapTests.entry_for ("three", "three")), "six", "six");
+ assert (keys.lower ("two") == "three");
+ MapTests.assert_entry (entries.lower (MapTests.entry_for ("two", "two")), "three", "three");
+ assert (keys.lower ("z") == "two");
+ MapTests.assert_entry (entries.lower (MapTests.entry_for ("z", "z")), "two", "two");
+ break;
+ case Type.SUB:
+ assert (keys.lower ("five") == null);
+ assert (entries.lower (MapTests.entry_for ("five", "five")) == null);
+ assert (keys.lower ("four") == null);
+ assert (entries.lower (MapTests.entry_for ("four", "four")) == null);
+ assert (keys.lower ("one") == "four");
+ MapTests.assert_entry (entries.lower (MapTests.entry_for ("one", "one")), "four", "four");
+ assert (keys.lower ("six") == "one");
+ MapTests.assert_entry (entries.lower (MapTests.entry_for ("six", "six")), "one", "one");
+ assert (keys.lower ("three") == "six");
+ MapTests.assert_entry (entries.lower (MapTests.entry_for ("three", "three")), "six", "six");
+ break;
+ case Type.EMPTY:
+ assert (keys.lower ("six") == null);
+ assert (entries.lower (MapTests.entry_for ("six", "six")) == null);
+ break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public void test_higher () {
+ string[] contains, not_contains;
+ var keys = submap.ascending_keys;
+ var entries = submap.ascending_entries;
+
+ set_default_values (out contains, out not_contains);
+
+ switch (type) {
+ case Type.HEAD:
+ assert (keys.higher ("a") == "five");
+ MapTests.assert_entry (entries.higher (MapTests.entry_for ("a", "a")), "five", "five");
+ assert (keys.higher ("five") == "four");
+ MapTests.assert_entry (entries.higher (MapTests.entry_for ("five", "five")), "four", "four");
+ assert (keys.higher ("four") == null);
+ assert (entries.higher (MapTests.entry_for ("four", "four")) == null);
+ assert (keys.higher ("six") == null);
+ assert (entries.higher (MapTests.entry_for ("six", "six")) == null);
+ break;
+ case Type.TAIL:
+ assert (keys.higher ("one") == "six");
+ MapTests.assert_entry (entries.higher (MapTests.entry_for ("one", "one")), "six", "six");
+ assert (keys.higher ("six") == "three");
+ MapTests.assert_entry (entries.higher (MapTests.entry_for ("six", "six")), "three", "three");
+ assert (keys.higher ("three") == "two");
+ MapTests.assert_entry (entries.higher (MapTests.entry_for ("three", "three")), "two", "two");
+ assert (keys.higher ("two") == null);
+ assert (entries.higher (MapTests.entry_for ("two", "two")) == null);
+ assert (keys.higher ("z") == null);
+ assert (entries.higher (MapTests.entry_for ("z", "z")) == null);
+ break;
+ case Type.SUB:
+ assert (keys.higher ("five") == "four");
+ MapTests.assert_entry (entries.higher (MapTests.entry_for ("five", "five")), "four", "four");
+ assert (keys.higher ("four") == "one");
+ MapTests.assert_entry (entries.higher (MapTests.entry_for ("four", "four")), "one", "one");
+ assert (keys.higher ("one") == "six");
+ MapTests.assert_entry (entries.higher (MapTests.entry_for ("one", "one")), "six", "six");
+ assert (keys.higher ("six") == null);
+ assert (entries.higher (MapTests.entry_for ("six", "six")) == null);
+ assert (keys.higher ("three") == null);
+ assert (entries.higher (MapTests.entry_for ("three", "three")) == null);
+ break;
+ case Type.EMPTY:
+ assert (keys.higher ("six") == null);
+ assert (entries.higher (MapTests.entry_for ("six", "six")) == null);
+ break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public void test_floor () {
+ string[] contains, not_contains;
+ var keys = submap.ascending_keys;
+ var entries = submap.ascending_entries;
+
+ set_default_values (out contains, out not_contains);
+
+ switch (type) {
+ case Type.HEAD:
+ assert (keys.floor ("a") == null);
+ assert (entries.floor (MapTests.entry_for ("a", "a")) == null);
+ assert (keys.floor ("five") == "five");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("five", "fiv")), "five", "five");
+ assert (keys.floor ("four") == "four");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("four", "four")), "four", "four");
+ assert (keys.floor ("six") == "four");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("six", "six")), "four", "four");
+ break;
+ case Type.TAIL:
+ assert (keys.floor ("one") == null);
+ assert (entries.floor (MapTests.entry_for ("one", "one")) == null);
+ assert (keys.floor ("six") == "six");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("six", "six")), "six", "six");
+ assert (keys.floor ("three") == "three");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("three", "three")), "three", "three");
+ assert (keys.floor ("two") == "two");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("two", "two")), "two", "two");
+ assert (keys.floor ("z") == "two");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("z", "z")), "two", "two");
+ break;
+ case Type.SUB:
+ assert (keys.floor ("five") == null);
+ assert (entries.floor (MapTests.entry_for ("five", "five")) == null);
+ assert (keys.floor ("four") == "four");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("four", "four")), "four", "four");
+ assert (keys.floor ("one") == "one");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("one", "one")), "one", "one");
+ assert (keys.floor ("six") == "six");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("six", "six")), "six", "six");
+ assert (keys.floor ("three") == "six");
+ MapTests.assert_entry (entries.floor (MapTests.entry_for ("three", "three")), "six", "six");
+ break;
+ case Type.EMPTY:
+ assert (keys.floor ("six") == null);
+ assert (entries.floor (MapTests.entry_for ("six", "six")) == null);
+ break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public void test_ceil () {
+ string[] contains, not_contains;
+ var keys = submap.ascending_keys;
+ var entries = submap.ascending_entries;
+
+ set_default_values (out contains, out not_contains);
+
+ switch (type) {
+ case Type.HEAD:
+ assert (keys.ceil ("a") == "five");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("a", "a")), "five", "five");
+ assert (keys.ceil ("five") == "five");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("five", "five")), "five", "five");
+ assert (keys.ceil ("four") == "four");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("four", "four")), "four", "four");
+ assert (keys.ceil ("six") == null);
+ assert (entries.ceil (MapTests.entry_for ("six", "six")) == null);
+ break;
+ case Type.TAIL:
+ assert (keys.ceil ("one") == "six");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("one", "one")), "six", "six");
+ assert (keys.ceil ("six") == "six");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("six", "six")), "six", "six");
+ assert (keys.ceil ("three") == "three");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("three", "three")), "three", "three");
+ assert (keys.ceil ("two") == "two");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("two", "two")), "two", "two");
+ assert (keys.ceil ("z") == null);
+ assert (entries.ceil (MapTests.entry_for ("z", "z")) == null);
+ break;
+ case Type.SUB:
+ assert (keys.ceil ("five") == "four");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("five", "five")), "four", "four");
+ assert (keys.ceil ("four") == "four");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("four", "four")), "four", "four");
+ assert (keys.ceil ("one") == "one");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("one", "one")), "one", "one");
+ assert (keys.ceil ("six") == "six");
+ MapTests.assert_entry (entries.ceil (MapTests.entry_for ("six", "six")), "six", "six");
+ assert (keys.ceil ("three") == null);
+ assert (entries.ceil (MapTests.entry_for ("three", "three")) == null);
+ break;
+ case Type.EMPTY:
+ assert (keys.ceil ("six") == null);
+ assert (entries.ceil (MapTests.entry_for ("six", "six")) == null);
+ break;
+ default:
+ assert_not_reached ();
+ }
+ }
+
+ public void test_iterator_at () {
+ string[] contains, not_contains;
+ var keys = submap.ascending_keys;
+ var entries = submap.ascending_entries;
+
+ set_default_values (out contains, out not_contains);
+
+ foreach (var s in contains) {
+ var key_iter = keys.iterator_at (s);
+ var entry_iter = entries.iterator_at (MapTests.entry_for (s, s));
+ assert (key_iter != null);
+ assert (key_iter.get () == s);
+ MapTests.assert_entry (entry_iter.get (), s, s);
+ }
+ foreach (var s in not_contains) {
+ var key_iter = keys.iterator_at (s);
+ var entry_iter = entries.iterator_at (MapTests.entry_for (s, s));
+ assert (key_iter == null);
+ assert (entry_iter == null);
+ }
+ assert (keys.iterator_at ("seven") == null);
+ assert (entries.iterator_at (MapTests.entry_for ("seven", "seven")) == null);
+ }
+
+ public void test_submap_and_subsets () {
+ string[] contains, not_contains;
+ var keys = submap.ascending_keys;
+ var entries = submap.ascending_entries;
+
+ set_default_values (out contains, out not_contains);
+
+ switch (type) {
+ case Type.HEAD:
+ var subsubmap = submap.head_map ("four");
+ var keyssubset = keys.head_set ("four");
+ var entriessubset = entries.head_set (MapTests.entry_for ("four", "four"));
+
+ assert (subsubmap.size == 1);
+ assert (keyssubset.size == 1);
+ assert (entriessubset.size == 1);
+
+ subsubmap = submap.tail_map ("four");
+ keyssubset = keys.tail_set ("four");
+ entriessubset = entries.tail_set (MapTests.entry_for ("four", "four"));
+
+ assert (subsubmap.size == 1);
+ assert (keyssubset.size == 1);
+ assert (entriessubset.size == 1);
+
+ subsubmap = submap.sub_map ("four", "one");
+ keyssubset = keys.sub_set ("four", "one");
+ entriessubset = entries.sub_set (MapTests.entry_for ("four", "four"), MapTests.entry_for ("one", "one"));
+
+ assert (subsubmap.size == 1);
+ assert (keyssubset.size == 1);
+ assert (entriessubset.size == 1);
+
+ subsubmap = submap.sub_map ("four", "four");
+ keyssubset = keys.sub_set ("four", "four");
+ entriessubset = entries.sub_set (MapTests.entry_for ("four", "four"), MapTests.entry_for ("four", "four"));
+
+ assert (subsubmap.size == 0);
+ assert (keyssubset.size == 0);
+ assert (entriessubset.size == 0);
+ break;
+ case Type.TAIL:
+ var subsubmap = submap.head_map ("two");
+ var keyssubset = keys.head_set ("two");
+ var entriessubset = entries.head_set (MapTests.entry_for ("two", "two"));
+
+ assert (subsubmap.size == 2);
+ assert (keyssubset.size == 2);
+ assert (entriessubset.size == 2);
+
+ subsubmap = submap.tail_map ("three");
+ keyssubset = keys.tail_set ("three");
+ entriessubset = entries.tail_set (MapTests.entry_for ("three", "three"));
+
+ assert (subsubmap.size == 2);
+ assert (keyssubset.size == 2);
+ assert (entriessubset.size == 2);
+
+ subsubmap = submap.sub_map ("three", "two");
+ keyssubset = keys.sub_set ("three", "two");
+ entriessubset = entries.sub_set (MapTests.entry_for ("three", "three"), MapTests.entry_for ("two", "two"));
+
+ assert (subsubmap.size == 1);
+ assert (keyssubset.size == 1);
+ assert (entriessubset.size == 1);
+ break;
+ case Type.SUB:
+ var subsubmap = submap.head_map ("six");
+ var keyssubset = keys.head_set ("six");
+ var entriessubset = entries.head_set (MapTests.entry_for ("six", "six"));
+
+ assert (subsubmap.size == 2);
+ assert (keyssubset.size == 2);
+ assert (entriessubset.size == 2);
+
+ subsubmap = submap.tail_map ("one");
+ keyssubset = keys.tail_set ("one");
+ entriessubset = entries.tail_set (MapTests.entry_for ("one", "one"));
+
+ assert (subsubmap.size == 2);
+ assert (keyssubset.size == 2);
+ assert (entriessubset.size == 2);
+
+ subsubmap = submap.sub_map ("one", "six");
+ keyssubset = keys.sub_set ("one", "six");
+ entriessubset = entries.sub_set (MapTests.entry_for ("one", "one"), MapTests.entry_for ("six", "six"));
+
+ assert (subsubmap.size == 1);
+ assert (keyssubset.size == 1);
+ assert (entriessubset.size == 1);
+
+ subsubmap = submap.sub_map ("five", "two");
+ keyssubset = keys.sub_set ("five", "two");
+ entriessubset = entries.sub_set (MapTests.entry_for ("five", "five"), MapTests.entry_for ("two", "two"));
+
+ assert (subsubmap.size == 3);
+ assert (keyssubset.size == 3);
+ assert (entriessubset.size == 3);
+ break;
+ case Type.EMPTY:
+ var subsubmap = submap.head_map ("six");
+ var keyssubset = keys.head_set ("six");
+ var entriessubset = entries.head_set (MapTests.entry_for ("six", "six"));
+
+ assert (subsubmap.size == 0);
+ assert (keyssubset.size == 0);
+ assert (entriessubset.size == 0);
+
+ subsubmap = submap.tail_map ("three");
+ keyssubset = keys.tail_set ("three");
+ entriessubset = entries.tail_set (MapTests.entry_for ("three", "three"));
+
+ assert (subsubmap.size == 0);
+ assert (keyssubset.size == 0);
+ assert (entriessubset.size == 0);
+
+ subsubmap = submap.sub_map ("one", "six");
+ keyssubset = keys.sub_set ("one", "six");
+ entriessubset = entries.sub_set (MapTests.entry_for ("one", "one"), MapTests.entry_for ("six", "six"));
+
+ assert (subsubmap.size == 0);
+ assert (keyssubset.size == 0);
+ assert (entriessubset.size == 0);
+ break;
+ default:
+ assert_not_reached ();
+ }
+ }
+ }
+}
+
diff --git a/tests/testsortedset.c b/tests/testsortedset.c
index 5b09260..00b2b55 100644
--- a/tests/testsortedset.c
+++ b/tests/testsortedset.c
@@ -74,20 +74,20 @@ typedef struct _SortedSetTests SortedSetTests;
typedef struct _SortedSetTestsClass SortedSetTestsClass;
typedef struct _SortedSetTestsPrivate SortedSetTestsPrivate;
-#define SORTED_SET_TESTS_SUB_SET_TYPE_TYPE (sorted_set_tests_sub_set_type_get_type ())
+#define SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TYPE (sorted_set_tests_sub_set_tests_type_get_type ())
-#define SORTED_SET_TESTS_TYPE_SUB_SET (sorted_set_tests_sub_set_get_type ())
-#define SORTED_SET_TESTS_SUB_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SORTED_SET_TESTS_TYPE_SUB_SET, SortedSetTestsSubSet))
-#define SORTED_SET_TESTS_SUB_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SORTED_SET_TESTS_TYPE_SUB_SET, SortedSetTestsSubSetClass))
-#define SORTED_SET_TESTS_IS_SUB_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SORTED_SET_TESTS_TYPE_SUB_SET))
-#define SORTED_SET_TESTS_IS_SUB_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SORTED_SET_TESTS_TYPE_SUB_SET))
-#define SORTED_SET_TESTS_SUB_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SORTED_SET_TESTS_TYPE_SUB_SET, SortedSetTestsSubSetClass))
+#define SORTED_SET_TESTS_TYPE_SUB_SET_TESTS (sorted_set_tests_sub_set_tests_get_type ())
+#define SORTED_SET_TESTS_SUB_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SORTED_SET_TESTS_TYPE_SUB_SET_TESTS, SortedSetTestsSubSetTests))
+#define SORTED_SET_TESTS_SUB_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SORTED_SET_TESTS_TYPE_SUB_SET_TESTS, SortedSetTestsSubSetTestsClass))
+#define SORTED_SET_TESTS_IS_SUB_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SORTED_SET_TESTS_TYPE_SUB_SET_TESTS))
+#define SORTED_SET_TESTS_IS_SUB_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SORTED_SET_TESTS_TYPE_SUB_SET_TESTS))
+#define SORTED_SET_TESTS_SUB_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SORTED_SET_TESTS_TYPE_SUB_SET_TESTS, SortedSetTestsSubSetTestsClass))
-typedef struct _SortedSetTestsSubSet SortedSetTestsSubSet;
-typedef struct _SortedSetTestsSubSetClass SortedSetTestsSubSetClass;
+typedef struct _SortedSetTestsSubSetTests SortedSetTestsSubSetTests;
+typedef struct _SortedSetTestsSubSetTestsClass SortedSetTestsSubSetTestsClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
-typedef struct _SortedSetTestsSubSetPrivate SortedSetTestsSubSetPrivate;
+typedef struct _SortedSetTestsSubSetTestsPrivate SortedSetTestsSubSetTestsPrivate;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _GeeTestCase {
@@ -130,44 +130,50 @@ struct _SortedSetTestsClass {
SetTestsClass parent_class;
};
+struct _SortedSetTestsPrivate {
+ gboolean strict;
+};
+
typedef void (*GeeTestCaseTestMethod) (void* user_data);
typedef enum {
- SORTED_SET_TESTS_SUB_SET_TYPE_HEAD,
- SORTED_SET_TESTS_SUB_SET_TYPE_TAIL,
- SORTED_SET_TESTS_SUB_SET_TYPE_SUB,
- SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY
-} SortedSetTestsSubSetType;
+ SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD,
+ SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL,
+ SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB,
+ SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY
+} SortedSetTestsSubSetTestsType;
-struct _SortedSetTestsSubSet {
+struct _SortedSetTestsSubSetTests {
GeeTestCase parent_instance;
- SortedSetTestsSubSetPrivate * priv;
+ SortedSetTestsSubSetTestsPrivate * priv;
};
-struct _SortedSetTestsSubSetClass {
+struct _SortedSetTestsSubSetTestsClass {
GeeTestCaseClass parent_class;
};
-struct _SortedSetTestsSubSetPrivate {
+struct _SortedSetTestsSubSetTestsPrivate {
GeeSortedSet* master;
GeeSortedSet* subset;
SortedSetTests* test;
- SortedSetTestsSubSetType type;
+ SortedSetTestsSubSetTestsType type;
+ gboolean strict;
};
static gpointer sorted_set_tests_parent_class = NULL;
-static gpointer sorted_set_tests_sub_set_parent_class = NULL;
+static gpointer sorted_set_tests_sub_set_tests_parent_class = NULL;
GType gee_test_case_get_type (void) G_GNUC_CONST;
GType collection_tests_get_type (void) G_GNUC_CONST;
GType set_tests_get_type (void) G_GNUC_CONST;
GType sorted_set_tests_get_type (void) G_GNUC_CONST;
+#define SORTED_SET_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SORTED_SET_TESTS, SortedSetTestsPrivate))
enum {
SORTED_SET_TESTS_DUMMY_PROPERTY
};
-SortedSetTests* sorted_set_tests_construct (GType object_type, const gchar* name);
+SortedSetTests* sorted_set_tests_construct (GType object_type, const gchar* name, gboolean strict);
SetTests* set_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void sorted_set_tests_test_first (SortedSetTests* self);
static void _sorted_set_tests_test_first_gee_test_case_test_method (gpointer self);
void sorted_set_tests_test_last (SortedSetTests* self);
@@ -184,54 +190,49 @@ void sorted_set_tests_test_floor (SortedSetTests* self);
static void _sorted_set_tests_test_floor_gee_test_case_test_method (gpointer self);
void sorted_set_tests_test_ceil (SortedSetTests* self);
static void _sorted_set_tests_test_ceil_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_test_bidir_iterator_can_go_backward (SortedSetTests* self);
-static void _sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_test_mutable_bidir_iterator (SortedSetTests* self);
-static void _sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_test_bidir_iterator_last (SortedSetTests* self);
-static void _sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method (gpointer self);
GTestSuite* gee_test_case_get_suite (GeeTestCase* self);
-GType sorted_set_tests_sub_set_type_get_type (void) G_GNUC_CONST;
-SortedSetTestsSubSet* sorted_set_tests_sub_set_new (SortedSetTests* test, SortedSetTestsSubSetType type);
-SortedSetTestsSubSet* sorted_set_tests_sub_set_construct (GType object_type, SortedSetTests* test, SortedSetTestsSubSetType type);
-GType sorted_set_tests_sub_set_get_type (void) G_GNUC_CONST;
-#define SORTED_SET_TESTS_SUB_SET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SORTED_SET_TESTS_TYPE_SUB_SET, SortedSetTestsSubSetPrivate))
+GType sorted_set_tests_sub_set_tests_type_get_type (void) G_GNUC_CONST;
+SortedSetTestsSubSetTests* sorted_set_tests_sub_set_tests_new (SortedSetTests* test, SortedSetTestsSubSetTestsType type, gboolean strict);
+SortedSetTestsSubSetTests* sorted_set_tests_sub_set_tests_construct (GType object_type, SortedSetTests* test, SortedSetTestsSubSetTestsType type, gboolean strict);
+GType sorted_set_tests_sub_set_tests_get_type (void) G_GNUC_CONST;
+#define SORTED_SET_TESTS_SUB_SET_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SORTED_SET_TESTS_TYPE_SUB_SET_TESTS, SortedSetTestsSubSetTestsPrivate))
enum {
- SORTED_SET_TESTS_SUB_SET_DUMMY_PROPERTY
+ SORTED_SET_TESTS_SUB_SET_TESTS_DUMMY_PROPERTY
};
-const gchar* sorted_set_tests_sub_set_type_to_string (SortedSetTestsSubSetType self);
+const gchar* sorted_set_tests_sub_set_tests_type_to_string (SortedSetTestsSubSetTestsType self);
GeeTestCase* gee_test_case_construct (GType object_type, const gchar* name);
-void sorted_set_tests_sub_set_test_size (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_size_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_contains (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_contains_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_add (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_add_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_remove (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_remove_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_iterator_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_clear (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_clear_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_iterator_at_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_lower (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_lower_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_higher (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_higher_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_ceil (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_ceil_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_floor (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_floor_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_subsets (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_subsets_gee_test_case_test_method (gpointer self);
-void sorted_set_tests_sub_set_test_boundaries (SortedSetTestsSubSet* self);
-static void _sorted_set_tests_sub_set_test_boundaries_gee_test_case_test_method (gpointer self);
-static void sorted_set_tests_sub_set_real_set_up (GeeTestCase* base);
+void sorted_set_tests_sub_set_tests_test_size (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_size_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_contains (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_contains_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_add (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_add_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_remove (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_remove_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_iterator (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_iterator_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_clear (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_clear_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_iterator_at (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_iterator_at_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_lower (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_lower_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_higher (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_higher_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_ceil (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_ceil_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_floor (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_floor_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_subsets (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_subsets_gee_test_case_test_method (gpointer self);
+void sorted_set_tests_sub_set_tests_test_boundaries (SortedSetTestsSubSetTests* self);
+static void _sorted_set_tests_sub_set_tests_test_boundaries_gee_test_case_test_method (gpointer self);
+static void sorted_set_tests_sub_set_tests_real_set_up (GeeTestCase* base);
void gee_test_case_set_up (GeeTestCase* self);
-static void sorted_set_tests_sub_set_real_tear_down (GeeTestCase* base);
+static void sorted_set_tests_sub_set_tests_real_tear_down (GeeTestCase* base);
void gee_test_case_tear_down (GeeTestCase* self);
-static void sorted_set_tests_sub_set_finalize (GObject* obj);
+static void sorted_set_tests_sub_set_tests_finalize (GObject* obj);
+static void sorted_set_tests_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
@@ -276,78 +277,71 @@ static void _sorted_set_tests_test_ceil_gee_test_case_test_method (gpointer self
}
-static void _sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_test_bidir_iterator_can_go_backward (self);
-}
-
-
-static void _sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_test_mutable_bidir_iterator (self);
-}
-
-
-static void _sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_test_bidir_iterator_last (self);
-}
-
-
-SortedSetTests* sorted_set_tests_construct (GType object_type, const gchar* name) {
+SortedSetTests* sorted_set_tests_construct (GType object_type, const gchar* name, gboolean strict) {
SortedSetTests * self = NULL;
const gchar* _tmp0_;
- GTestSuite* _tmp1_ = NULL;
- SortedSetTestsSubSet* _tmp2_;
- SortedSetTestsSubSet* _tmp3_;
- GTestSuite* _tmp4_ = NULL;
- GTestSuite* _tmp5_ = NULL;
- SortedSetTestsSubSet* _tmp6_;
- SortedSetTestsSubSet* _tmp7_;
- GTestSuite* _tmp8_ = NULL;
- GTestSuite* _tmp9_ = NULL;
- SortedSetTestsSubSet* _tmp10_;
- SortedSetTestsSubSet* _tmp11_;
+ gboolean _tmp1_;
+ GTestSuite* _tmp2_ = NULL;
+ gboolean _tmp3_;
+ SortedSetTestsSubSetTests* _tmp4_;
+ SortedSetTestsSubSetTests* _tmp5_;
+ GTestSuite* _tmp6_ = NULL;
+ GTestSuite* _tmp7_ = NULL;
+ gboolean _tmp8_;
+ SortedSetTestsSubSetTests* _tmp9_;
+ SortedSetTestsSubSetTests* _tmp10_;
+ GTestSuite* _tmp11_ = NULL;
GTestSuite* _tmp12_ = NULL;
- GTestSuite* _tmp13_ = NULL;
- SortedSetTestsSubSet* _tmp14_;
- SortedSetTestsSubSet* _tmp15_;
+ gboolean _tmp13_;
+ SortedSetTestsSubSetTests* _tmp14_;
+ SortedSetTestsSubSetTests* _tmp15_;
GTestSuite* _tmp16_ = NULL;
+ GTestSuite* _tmp17_ = NULL;
+ gboolean _tmp18_;
+ SortedSetTestsSubSetTests* _tmp19_;
+ SortedSetTestsSubSetTests* _tmp20_;
+ GTestSuite* _tmp21_ = NULL;
g_return_val_if_fail (name != NULL, NULL);
_tmp0_ = name;
self = (SortedSetTests*) set_tests_construct (object_type, _tmp0_);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] first", _sorted_set_tests_test_first_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] last", _sorted_set_tests_test_last_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] ordering", _sorted_set_tests_test_ordering_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] iterator at", _sorted_set_tests_test_iterator_at_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] lower", _sorted_set_tests_test_lower_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] higher", _sorted_set_tests_test_higher_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] floor", _sorted_set_tests_test_floor_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] ceil", _sorted_set_tests_test_ceil_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can go backward", _sorted_set_tests_test_bidir_iterator_can_go_backward_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators are mutable", _sorted_set_tests_test_mutable_bidir_iterator_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] bi-directional iterators can to end", _sorted_set_tests_test_bidir_iterator_last_gee_test_case_test_method, self);
- _tmp1_ = gee_test_case_get_suite ((GeeTestCase*) self);
- _tmp2_ = sorted_set_tests_sub_set_new (self, SORTED_SET_TESTS_SUB_SET_TYPE_HEAD);
- _tmp3_ = _tmp2_;
- _tmp4_ = gee_test_case_get_suite ((GeeTestCase*) _tmp3_);
- g_test_suite_add_suite (_tmp1_, _tmp4_);
- _g_object_unref0 (_tmp3_);
- _tmp5_ = gee_test_case_get_suite ((GeeTestCase*) self);
- _tmp6_ = sorted_set_tests_sub_set_new (self, SORTED_SET_TESTS_SUB_SET_TYPE_TAIL);
- _tmp7_ = _tmp6_;
- _tmp8_ = gee_test_case_get_suite ((GeeTestCase*) _tmp7_);
- g_test_suite_add_suite (_tmp5_, _tmp8_);
- _g_object_unref0 (_tmp7_);
- _tmp9_ = gee_test_case_get_suite ((GeeTestCase*) self);
- _tmp10_ = sorted_set_tests_sub_set_new (self, SORTED_SET_TESTS_SUB_SET_TYPE_SUB);
- _tmp11_ = _tmp10_;
- _tmp12_ = gee_test_case_get_suite ((GeeTestCase*) _tmp11_);
- g_test_suite_add_suite (_tmp9_, _tmp12_);
- _g_object_unref0 (_tmp11_);
- _tmp13_ = gee_test_case_get_suite ((GeeTestCase*) self);
- _tmp14_ = sorted_set_tests_sub_set_new (self, SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY);
+ _tmp1_ = strict;
+ self->priv->strict = _tmp1_;
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] first", _sorted_set_tests_test_first_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] last", _sorted_set_tests_test_last_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] ordering", _sorted_set_tests_test_ordering_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] iterator at", _sorted_set_tests_test_iterator_at_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] lower", _sorted_set_tests_test_lower_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] higher", _sorted_set_tests_test_higher_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] floor", _sorted_set_tests_test_floor_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] ceil", _sorted_set_tests_test_ceil_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ _tmp2_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp3_ = strict;
+ _tmp4_ = sorted_set_tests_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD, _tmp3_);
+ _tmp5_ = _tmp4_;
+ _tmp6_ = gee_test_case_get_suite ((GeeTestCase*) _tmp5_);
+ g_test_suite_add_suite (_tmp2_, _tmp6_);
+ _g_object_unref0 (_tmp5_);
+ _tmp7_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp8_ = strict;
+ _tmp9_ = sorted_set_tests_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL, _tmp8_);
+ _tmp10_ = _tmp9_;
+ _tmp11_ = gee_test_case_get_suite ((GeeTestCase*) _tmp10_);
+ g_test_suite_add_suite (_tmp7_, _tmp11_);
+ _g_object_unref0 (_tmp10_);
+ _tmp12_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp13_ = strict;
+ _tmp14_ = sorted_set_tests_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB, _tmp13_);
_tmp15_ = _tmp14_;
_tmp16_ = gee_test_case_get_suite ((GeeTestCase*) _tmp15_);
- g_test_suite_add_suite (_tmp13_, _tmp16_);
+ g_test_suite_add_suite (_tmp12_, _tmp16_);
_g_object_unref0 (_tmp15_);
+ _tmp17_ = gee_test_case_get_suite ((GeeTestCase*) self);
+ _tmp18_ = strict;
+ _tmp19_ = sorted_set_tests_sub_set_tests_new (self, SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY, _tmp18_);
+ _tmp20_ = _tmp19_;
+ _tmp21_ = gee_test_case_get_suite ((GeeTestCase*) _tmp20_);
+ g_test_suite_add_suite (_tmp17_, _tmp21_);
+ _g_object_unref0 (_tmp20_);
return self;
}
@@ -502,61 +496,65 @@ void sorted_set_tests_test_first (SortedSetTests* self) {
GeeCollection* _tmp0_;
GeeSortedSet* _tmp1_;
GeeSortedSet* test_set;
- gboolean _tmp2_ = FALSE;
- GeeSortedSet* _tmp6_;
- gboolean _tmp7_ = FALSE;
- GeeSortedSet* _tmp8_;
- gboolean _tmp9_ = FALSE;
- GeeSortedSet* _tmp10_;
- gboolean _tmp11_ = FALSE;
- GeeSortedSet* _tmp12_;
- gboolean _tmp13_ = FALSE;
- GeeSortedSet* _tmp14_;
- gboolean _tmp15_ = FALSE;
- GeeSortedSet* _tmp16_;
- gboolean _tmp17_ = FALSE;
- GeeSortedSet* _tmp18_;
- gpointer _tmp19_ = NULL;
- gchar* _tmp20_;
+ gboolean _tmp2_;
+ GeeSortedSet* _tmp7_;
+ gboolean _tmp8_ = FALSE;
+ GeeSortedSet* _tmp9_;
+ gboolean _tmp10_ = FALSE;
+ GeeSortedSet* _tmp11_;
+ gboolean _tmp12_ = FALSE;
+ GeeSortedSet* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ GeeSortedSet* _tmp15_;
+ gboolean _tmp16_ = FALSE;
+ GeeSortedSet* _tmp17_;
+ gboolean _tmp18_ = FALSE;
+ GeeSortedSet* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_SET) ? ((GeeSortedSet*) _tmp0_) : NULL);
test_set = _tmp1_;
- _tmp2_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ _tmp2_ = self->priv->strict;
if (_tmp2_) {
- GeeSortedSet* _tmp3_;
- gpointer _tmp4_ = NULL;
- gchar* _tmp5_;
- _tmp3_ = test_set;
- _tmp4_ = gee_sorted_set_first (_tmp3_);
- _tmp5_ = (gchar*) _tmp4_;
- _g_free0 (_tmp5_);
- exit (0);
+ gboolean _tmp3_ = FALSE;
+ _tmp3_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp3_) {
+ GeeSortedSet* _tmp4_;
+ gpointer _tmp5_ = NULL;
+ gchar* _tmp6_;
+ _tmp4_ = test_set;
+ _tmp5_ = gee_sorted_set_first (_tmp4_);
+ _tmp6_ = (gchar*) _tmp5_;
+ _g_free0 (_tmp6_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
}
- g_test_trap_assert_failed ();
- _tmp6_ = test_set;
- _tmp7_ = gee_collection_add ((GeeCollection*) _tmp6_, "one");
- _vala_assert (_tmp7_, "test_set.add (\"one\")");
- _tmp8_ = test_set;
- _tmp9_ = gee_collection_add ((GeeCollection*) _tmp8_, "two");
- _vala_assert (_tmp9_, "test_set.add (\"two\")");
- _tmp10_ = test_set;
- _tmp11_ = gee_collection_add ((GeeCollection*) _tmp10_, "three");
- _vala_assert (_tmp11_, "test_set.add (\"three\")");
- _tmp12_ = test_set;
- _tmp13_ = gee_collection_add ((GeeCollection*) _tmp12_, "four");
- _vala_assert (_tmp13_, "test_set.add (\"four\")");
- _tmp14_ = test_set;
- _tmp15_ = gee_collection_add ((GeeCollection*) _tmp14_, "five");
- _vala_assert (_tmp15_, "test_set.add (\"five\")");
- _tmp16_ = test_set;
- _tmp17_ = gee_collection_add ((GeeCollection*) _tmp16_, "six");
- _vala_assert (_tmp17_, "test_set.add (\"six\")");
- _tmp18_ = test_set;
- _tmp19_ = gee_sorted_set_first (_tmp18_);
- _tmp20_ = (gchar*) _tmp19_;
- _vala_assert (g_strcmp0 (_tmp20_, "five") == 0, "test_set.first () == \"five\"");
- _g_free0 (_tmp20_);
+ _tmp7_ = test_set;
+ _tmp8_ = gee_collection_add ((GeeCollection*) _tmp7_, "one");
+ _vala_assert (_tmp8_, "test_set.add (\"one\")");
+ _tmp9_ = test_set;
+ _tmp10_ = gee_collection_add ((GeeCollection*) _tmp9_, "two");
+ _vala_assert (_tmp10_, "test_set.add (\"two\")");
+ _tmp11_ = test_set;
+ _tmp12_ = gee_collection_add ((GeeCollection*) _tmp11_, "three");
+ _vala_assert (_tmp12_, "test_set.add (\"three\")");
+ _tmp13_ = test_set;
+ _tmp14_ = gee_collection_add ((GeeCollection*) _tmp13_, "four");
+ _vala_assert (_tmp14_, "test_set.add (\"four\")");
+ _tmp15_ = test_set;
+ _tmp16_ = gee_collection_add ((GeeCollection*) _tmp15_, "five");
+ _vala_assert (_tmp16_, "test_set.add (\"five\")");
+ _tmp17_ = test_set;
+ _tmp18_ = gee_collection_add ((GeeCollection*) _tmp17_, "six");
+ _vala_assert (_tmp18_, "test_set.add (\"six\")");
+ _tmp19_ = test_set;
+ _tmp20_ = gee_sorted_set_first (_tmp19_);
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "five") == 0, "test_set.first () == \"five\"");
+ _g_free0 (_tmp21_);
_g_object_unref0 (test_set);
}
@@ -565,61 +563,65 @@ void sorted_set_tests_test_last (SortedSetTests* self) {
GeeCollection* _tmp0_;
GeeSortedSet* _tmp1_;
GeeSortedSet* test_set;
- gboolean _tmp2_ = FALSE;
- GeeSortedSet* _tmp6_;
- gboolean _tmp7_ = FALSE;
- GeeSortedSet* _tmp8_;
- gboolean _tmp9_ = FALSE;
- GeeSortedSet* _tmp10_;
- gboolean _tmp11_ = FALSE;
- GeeSortedSet* _tmp12_;
- gboolean _tmp13_ = FALSE;
- GeeSortedSet* _tmp14_;
- gboolean _tmp15_ = FALSE;
- GeeSortedSet* _tmp16_;
- gboolean _tmp17_ = FALSE;
- GeeSortedSet* _tmp18_;
- gpointer _tmp19_ = NULL;
- gchar* _tmp20_;
+ gboolean _tmp2_;
+ GeeSortedSet* _tmp7_;
+ gboolean _tmp8_ = FALSE;
+ GeeSortedSet* _tmp9_;
+ gboolean _tmp10_ = FALSE;
+ GeeSortedSet* _tmp11_;
+ gboolean _tmp12_ = FALSE;
+ GeeSortedSet* _tmp13_;
+ gboolean _tmp14_ = FALSE;
+ GeeSortedSet* _tmp15_;
+ gboolean _tmp16_ = FALSE;
+ GeeSortedSet* _tmp17_;
+ gboolean _tmp18_ = FALSE;
+ GeeSortedSet* _tmp19_;
+ gpointer _tmp20_ = NULL;
+ gchar* _tmp21_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_SET) ? ((GeeSortedSet*) _tmp0_) : NULL);
test_set = _tmp1_;
- _tmp2_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ _tmp2_ = self->priv->strict;
if (_tmp2_) {
- GeeSortedSet* _tmp3_;
- gpointer _tmp4_ = NULL;
- gchar* _tmp5_;
- _tmp3_ = test_set;
- _tmp4_ = gee_sorted_set_last (_tmp3_);
- _tmp5_ = (gchar*) _tmp4_;
- _g_free0 (_tmp5_);
- exit (0);
+ gboolean _tmp3_ = FALSE;
+ _tmp3_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp3_) {
+ GeeSortedSet* _tmp4_;
+ gpointer _tmp5_ = NULL;
+ gchar* _tmp6_;
+ _tmp4_ = test_set;
+ _tmp5_ = gee_sorted_set_last (_tmp4_);
+ _tmp6_ = (gchar*) _tmp5_;
+ _g_free0 (_tmp6_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
}
- g_test_trap_assert_failed ();
- _tmp6_ = test_set;
- _tmp7_ = gee_collection_add ((GeeCollection*) _tmp6_, "one");
- _vala_assert (_tmp7_, "test_set.add (\"one\")");
- _tmp8_ = test_set;
- _tmp9_ = gee_collection_add ((GeeCollection*) _tmp8_, "two");
- _vala_assert (_tmp9_, "test_set.add (\"two\")");
- _tmp10_ = test_set;
- _tmp11_ = gee_collection_add ((GeeCollection*) _tmp10_, "three");
- _vala_assert (_tmp11_, "test_set.add (\"three\")");
- _tmp12_ = test_set;
- _tmp13_ = gee_collection_add ((GeeCollection*) _tmp12_, "four");
- _vala_assert (_tmp13_, "test_set.add (\"four\")");
- _tmp14_ = test_set;
- _tmp15_ = gee_collection_add ((GeeCollection*) _tmp14_, "five");
- _vala_assert (_tmp15_, "test_set.add (\"five\")");
- _tmp16_ = test_set;
- _tmp17_ = gee_collection_add ((GeeCollection*) _tmp16_, "six");
- _vala_assert (_tmp17_, "test_set.add (\"six\")");
- _tmp18_ = test_set;
- _tmp19_ = gee_sorted_set_last (_tmp18_);
- _tmp20_ = (gchar*) _tmp19_;
- _vala_assert (g_strcmp0 (_tmp20_, "two") == 0, "test_set.last () == \"two\"");
- _g_free0 (_tmp20_);
+ _tmp7_ = test_set;
+ _tmp8_ = gee_collection_add ((GeeCollection*) _tmp7_, "one");
+ _vala_assert (_tmp8_, "test_set.add (\"one\")");
+ _tmp9_ = test_set;
+ _tmp10_ = gee_collection_add ((GeeCollection*) _tmp9_, "two");
+ _vala_assert (_tmp10_, "test_set.add (\"two\")");
+ _tmp11_ = test_set;
+ _tmp12_ = gee_collection_add ((GeeCollection*) _tmp11_, "three");
+ _vala_assert (_tmp12_, "test_set.add (\"three\")");
+ _tmp13_ = test_set;
+ _tmp14_ = gee_collection_add ((GeeCollection*) _tmp13_, "four");
+ _vala_assert (_tmp14_, "test_set.add (\"four\")");
+ _tmp15_ = test_set;
+ _tmp16_ = gee_collection_add ((GeeCollection*) _tmp15_, "five");
+ _vala_assert (_tmp16_, "test_set.add (\"five\")");
+ _tmp17_ = test_set;
+ _tmp18_ = gee_collection_add ((GeeCollection*) _tmp17_, "six");
+ _vala_assert (_tmp18_, "test_set.add (\"six\")");
+ _tmp19_ = test_set;
+ _tmp20_ = gee_sorted_set_last (_tmp19_);
+ _tmp21_ = (gchar*) _tmp20_;
+ _vala_assert (g_strcmp0 (_tmp21_, "two") == 0, "test_set.last () == \"two\"");
+ _g_free0 (_tmp21_);
_g_object_unref0 (test_set);
}
@@ -631,24 +633,24 @@ void sorted_set_tests_test_iterator_at (SortedSetTests* self) {
gboolean _tmp2_ = FALSE;
gboolean _tmp3_ = FALSE;
gboolean _tmp4_ = FALSE;
- GeeBidirIterator* _tmp5_ = NULL;
- GeeBidirIterator* iter;
- GeeBidirIterator* _tmp6_;
- GeeBidirIterator* _tmp7_;
+ GeeIterator* _tmp5_ = NULL;
+ GeeIterator* iter;
+ GeeIterator* _tmp6_;
+ GeeIterator* _tmp7_;
gpointer _tmp8_ = NULL;
gchar* _tmp9_;
- GeeBidirIterator* _tmp10_ = NULL;
- GeeBidirIterator* _tmp11_;
- GeeBidirIterator* _tmp12_;
+ GeeIterator* _tmp10_ = NULL;
+ GeeIterator* _tmp11_;
+ GeeIterator* _tmp12_;
gpointer _tmp13_ = NULL;
gchar* _tmp14_;
- GeeBidirIterator* _tmp15_ = NULL;
- GeeBidirIterator* _tmp16_;
- GeeBidirIterator* _tmp17_;
+ GeeIterator* _tmp15_ = NULL;
+ GeeIterator* _tmp16_;
+ GeeIterator* _tmp17_;
gpointer _tmp18_ = NULL;
gchar* _tmp19_;
- GeeBidirIterator* _tmp20_ = NULL;
- GeeBidirIterator* _tmp21_;
+ GeeIterator* _tmp20_ = NULL;
+ GeeIterator* _tmp21_;
g_return_if_fail (self != NULL);
_tmp0_ = ((CollectionTests*) self)->test_collection;
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_SET) ? ((GeeSortedSet*) _tmp0_) : NULL);
@@ -664,7 +666,7 @@ void sorted_set_tests_test_iterator_at (SortedSetTests* self) {
_tmp6_ = iter;
_vala_assert (_tmp6_ != NULL, "iter != null");
_tmp7_ = iter;
- _tmp8_ = gee_iterator_get ((GeeIterator*) _tmp7_);
+ _tmp8_ = gee_iterator_get (_tmp7_);
_tmp9_ = (gchar*) _tmp8_;
_vala_assert (g_strcmp0 (_tmp9_, "one") == 0, "iter.get () == \"one\"");
_g_free0 (_tmp9_);
@@ -674,7 +676,7 @@ void sorted_set_tests_test_iterator_at (SortedSetTests* self) {
_tmp11_ = iter;
_vala_assert (_tmp11_ != NULL, "iter != null");
_tmp12_ = iter;
- _tmp13_ = gee_iterator_get ((GeeIterator*) _tmp12_);
+ _tmp13_ = gee_iterator_get (_tmp12_);
_tmp14_ = (gchar*) _tmp13_;
_vala_assert (g_strcmp0 (_tmp14_, "two") == 0, "iter.get () == \"two\"");
_g_free0 (_tmp14_);
@@ -684,7 +686,7 @@ void sorted_set_tests_test_iterator_at (SortedSetTests* self) {
_tmp16_ = iter;
_vala_assert (_tmp16_ != NULL, "iter != null");
_tmp17_ = iter;
- _tmp18_ = gee_iterator_get ((GeeIterator*) _tmp17_);
+ _tmp18_ = gee_iterator_get (_tmp17_);
_tmp19_ = (gchar*) _tmp18_;
_vala_assert (g_strcmp0 (_tmp19_, "three") == 0, "iter.get () == \"three\"");
_g_free0 (_tmp19_);
@@ -1082,491 +1084,25 @@ void sorted_set_tests_test_ceil (SortedSetTests* self) {
}
-void sorted_set_tests_test_bidir_iterator_can_go_backward (SortedSetTests* self) {
- GeeCollection* _tmp0_;
- GeeSortedSet* _tmp1_;
- GeeSortedSet* test_set;
- GeeBidirIterator* _tmp2_ = NULL;
- GeeBidirIterator* iterator;
- GeeBidirIterator* _tmp3_;
- gboolean _tmp4_ = FALSE;
- gboolean _tmp5_ = FALSE;
- gboolean _tmp6_ = FALSE;
- gboolean _tmp7_ = FALSE;
- gboolean _tmp8_ = FALSE;
- gboolean _tmp9_ = FALSE;
- gboolean _tmp10_ = FALSE;
- GeeBidirIterator* _tmp11_ = NULL;
- GeeBidirIterator* _tmp12_;
- gboolean _tmp13_ = FALSE;
- GeeBidirIterator* _tmp14_;
- gpointer _tmp15_ = NULL;
- gchar* _tmp16_;
- GeeBidirIterator* _tmp17_;
- gboolean _tmp18_ = FALSE;
- GeeBidirIterator* _tmp19_;
- gboolean _tmp20_ = FALSE;
- GeeBidirIterator* _tmp21_;
- gpointer _tmp22_ = NULL;
- gchar* _tmp23_;
- GeeBidirIterator* _tmp24_;
- gboolean _tmp25_ = FALSE;
- GeeBidirIterator* _tmp26_;
- gboolean _tmp27_ = FALSE;
- GeeBidirIterator* _tmp28_;
- gpointer _tmp29_ = NULL;
- gchar* _tmp30_;
- GeeBidirIterator* _tmp31_;
- gboolean _tmp32_ = FALSE;
- GeeBidirIterator* _tmp33_;
- gboolean _tmp34_ = FALSE;
- GeeBidirIterator* _tmp35_;
- gpointer _tmp36_ = NULL;
- gchar* _tmp37_;
- GeeBidirIterator* _tmp38_;
- gboolean _tmp39_ = FALSE;
- GeeBidirIterator* _tmp40_;
- gboolean _tmp41_ = FALSE;
- GeeBidirIterator* _tmp42_;
- gpointer _tmp43_ = NULL;
- gchar* _tmp44_;
- GeeBidirIterator* _tmp45_;
- gboolean _tmp46_ = FALSE;
- GeeBidirIterator* _tmp47_;
- gboolean _tmp48_ = FALSE;
- GeeBidirIterator* _tmp49_;
- gpointer _tmp50_ = NULL;
- gchar* _tmp51_;
- GeeBidirIterator* _tmp52_;
- gboolean _tmp53_ = FALSE;
- GeeBidirIterator* _tmp54_;
- gboolean _tmp55_ = FALSE;
- GeeBidirIterator* _tmp56_;
- gboolean _tmp57_ = FALSE;
- GeeBidirIterator* _tmp58_;
- gpointer _tmp59_ = NULL;
- gchar* _tmp60_;
- GeeBidirIterator* _tmp61_;
- gboolean _tmp62_ = FALSE;
- GeeBidirIterator* _tmp63_;
- gpointer _tmp64_ = NULL;
- gchar* _tmp65_;
- GeeBidirIterator* _tmp66_;
- gboolean _tmp67_ = FALSE;
- GeeBidirIterator* _tmp68_;
- gpointer _tmp69_ = NULL;
- gchar* _tmp70_;
- GeeBidirIterator* _tmp71_;
- gboolean _tmp72_ = FALSE;
- GeeBidirIterator* _tmp73_;
- gpointer _tmp74_ = NULL;
- gchar* _tmp75_;
- GeeBidirIterator* _tmp76_;
- gboolean _tmp77_ = FALSE;
- GeeBidirIterator* _tmp78_;
- gpointer _tmp79_ = NULL;
- gchar* _tmp80_;
- GeeBidirIterator* _tmp81_;
- gboolean _tmp82_ = FALSE;
- GeeBidirIterator* _tmp83_;
- gpointer _tmp84_ = NULL;
- gchar* _tmp85_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_SET) ? ((GeeSortedSet*) _tmp0_) : NULL);
- test_set = _tmp1_;
- _tmp2_ = gee_sorted_set_bidir_iterator (test_set);
- iterator = _tmp2_;
- _tmp3_ = iterator;
- _tmp4_ = gee_bidir_iterator_has_previous (_tmp3_);
- _vala_assert (!_tmp4_, "!iterator.has_previous ()");
- _tmp5_ = gee_collection_add ((GeeCollection*) test_set, "one");
- _vala_assert (_tmp5_, "test_set.add (\"one\")");
- _tmp6_ = gee_collection_add ((GeeCollection*) test_set, "two");
- _vala_assert (_tmp6_, "test_set.add (\"two\")");
- _tmp7_ = gee_collection_add ((GeeCollection*) test_set, "three");
- _vala_assert (_tmp7_, "test_set.add (\"three\")");
- _tmp8_ = gee_collection_add ((GeeCollection*) test_set, "four");
- _vala_assert (_tmp8_, "test_set.add (\"four\")");
- _tmp9_ = gee_collection_add ((GeeCollection*) test_set, "five");
- _vala_assert (_tmp9_, "test_set.add (\"five\")");
- _tmp10_ = gee_collection_add ((GeeCollection*) test_set, "six");
- _vala_assert (_tmp10_, "test_set.add (\"six\")");
- _tmp11_ = gee_sorted_set_bidir_iterator (test_set);
- _g_object_unref0 (iterator);
- iterator = _tmp11_;
- _tmp12_ = iterator;
- _tmp13_ = gee_iterator_next ((GeeIterator*) _tmp12_);
- _vala_assert (_tmp13_, "iterator.next ()");
- _tmp14_ = iterator;
- _tmp15_ = gee_iterator_get ((GeeIterator*) _tmp14_);
- _tmp16_ = (gchar*) _tmp15_;
- _vala_assert (g_strcmp0 (_tmp16_, "five") == 0, "iterator.get () == \"five\"");
- _g_free0 (_tmp16_);
- _tmp17_ = iterator;
- _tmp18_ = gee_bidir_iterator_has_previous (_tmp17_);
- _vala_assert (!_tmp18_, "!iterator.has_previous ()");
- _tmp19_ = iterator;
- _tmp20_ = gee_iterator_next ((GeeIterator*) _tmp19_);
- _vala_assert (_tmp20_, "iterator.next ()");
- _tmp21_ = iterator;
- _tmp22_ = gee_iterator_get ((GeeIterator*) _tmp21_);
- _tmp23_ = (gchar*) _tmp22_;
- _vala_assert (g_strcmp0 (_tmp23_, "four") == 0, "iterator.get () == \"four\"");
- _g_free0 (_tmp23_);
- _tmp24_ = iterator;
- _tmp25_ = gee_bidir_iterator_has_previous (_tmp24_);
- _vala_assert (_tmp25_, "iterator.has_previous ()");
- _tmp26_ = iterator;
- _tmp27_ = gee_iterator_next ((GeeIterator*) _tmp26_);
- _vala_assert (_tmp27_, "iterator.next ()");
- _tmp28_ = iterator;
- _tmp29_ = gee_iterator_get ((GeeIterator*) _tmp28_);
- _tmp30_ = (gchar*) _tmp29_;
- _vala_assert (g_strcmp0 (_tmp30_, "one") == 0, "iterator.get () == \"one\"");
- _g_free0 (_tmp30_);
- _tmp31_ = iterator;
- _tmp32_ = gee_bidir_iterator_has_previous (_tmp31_);
- _vala_assert (_tmp32_, "iterator.has_previous ()");
- _tmp33_ = iterator;
- _tmp34_ = gee_iterator_next ((GeeIterator*) _tmp33_);
- _vala_assert (_tmp34_, "iterator.next ()");
- _tmp35_ = iterator;
- _tmp36_ = gee_iterator_get ((GeeIterator*) _tmp35_);
- _tmp37_ = (gchar*) _tmp36_;
- _vala_assert (g_strcmp0 (_tmp37_, "six") == 0, "iterator.get () == \"six\"");
- _g_free0 (_tmp37_);
- _tmp38_ = iterator;
- _tmp39_ = gee_bidir_iterator_has_previous (_tmp38_);
- _vala_assert (_tmp39_, "iterator.has_previous ()");
- _tmp40_ = iterator;
- _tmp41_ = gee_iterator_next ((GeeIterator*) _tmp40_);
- _vala_assert (_tmp41_, "iterator.next ()");
- _tmp42_ = iterator;
- _tmp43_ = gee_iterator_get ((GeeIterator*) _tmp42_);
- _tmp44_ = (gchar*) _tmp43_;
- _vala_assert (g_strcmp0 (_tmp44_, "three") == 0, "iterator.get () == \"three\"");
- _g_free0 (_tmp44_);
- _tmp45_ = iterator;
- _tmp46_ = gee_bidir_iterator_has_previous (_tmp45_);
- _vala_assert (_tmp46_, "iterator.has_previous ()");
- _tmp47_ = iterator;
- _tmp48_ = gee_iterator_next ((GeeIterator*) _tmp47_);
- _vala_assert (_tmp48_, "iterator.next ()");
- _tmp49_ = iterator;
- _tmp50_ = gee_iterator_get ((GeeIterator*) _tmp49_);
- _tmp51_ = (gchar*) _tmp50_;
- _vala_assert (g_strcmp0 (_tmp51_, "two") == 0, "iterator.get () == \"two\"");
- _g_free0 (_tmp51_);
- _tmp52_ = iterator;
- _tmp53_ = gee_bidir_iterator_has_previous (_tmp52_);
- _vala_assert (_tmp53_, "iterator.has_previous ()");
- _tmp54_ = iterator;
- _tmp55_ = gee_iterator_next ((GeeIterator*) _tmp54_);
- _vala_assert (!_tmp55_, "!iterator.next ()");
- _tmp56_ = iterator;
- _tmp57_ = gee_bidir_iterator_previous (_tmp56_);
- _vala_assert (_tmp57_, "iterator.previous ()");
- _tmp58_ = iterator;
- _tmp59_ = gee_iterator_get ((GeeIterator*) _tmp58_);
- _tmp60_ = (gchar*) _tmp59_;
- _vala_assert (g_strcmp0 (_tmp60_, "three") == 0, "iterator.get () == \"three\"");
- _g_free0 (_tmp60_);
- _tmp61_ = iterator;
- _tmp62_ = gee_bidir_iterator_previous (_tmp61_);
- _vala_assert (_tmp62_, "iterator.previous ()");
- _tmp63_ = iterator;
- _tmp64_ = gee_iterator_get ((GeeIterator*) _tmp63_);
- _tmp65_ = (gchar*) _tmp64_;
- _vala_assert (g_strcmp0 (_tmp65_, "six") == 0, "iterator.get () == \"six\"");
- _g_free0 (_tmp65_);
- _tmp66_ = iterator;
- _tmp67_ = gee_bidir_iterator_previous (_tmp66_);
- _vala_assert (_tmp67_, "iterator.previous ()");
- _tmp68_ = iterator;
- _tmp69_ = gee_iterator_get ((GeeIterator*) _tmp68_);
- _tmp70_ = (gchar*) _tmp69_;
- _vala_assert (g_strcmp0 (_tmp70_, "one") == 0, "iterator.get () == \"one\"");
- _g_free0 (_tmp70_);
- _tmp71_ = iterator;
- _tmp72_ = gee_bidir_iterator_previous (_tmp71_);
- _vala_assert (_tmp72_, "iterator.previous ()");
- _tmp73_ = iterator;
- _tmp74_ = gee_iterator_get ((GeeIterator*) _tmp73_);
- _tmp75_ = (gchar*) _tmp74_;
- _vala_assert (g_strcmp0 (_tmp75_, "four") == 0, "iterator.get () == \"four\"");
- _g_free0 (_tmp75_);
- _tmp76_ = iterator;
- _tmp77_ = gee_bidir_iterator_previous (_tmp76_);
- _vala_assert (_tmp77_, "iterator.previous ()");
- _tmp78_ = iterator;
- _tmp79_ = gee_iterator_get ((GeeIterator*) _tmp78_);
- _tmp80_ = (gchar*) _tmp79_;
- _vala_assert (g_strcmp0 (_tmp80_, "five") == 0, "iterator.get () == \"five\"");
- _g_free0 (_tmp80_);
- _tmp81_ = iterator;
- _tmp82_ = gee_bidir_iterator_previous (_tmp81_);
- _vala_assert (!_tmp82_, "!iterator.previous ()");
- _tmp83_ = iterator;
- _tmp84_ = gee_iterator_get ((GeeIterator*) _tmp83_);
- _tmp85_ = (gchar*) _tmp84_;
- _vala_assert (g_strcmp0 (_tmp85_, "five") == 0, "iterator.get () == \"five\"");
- _g_free0 (_tmp85_);
- _g_object_unref0 (iterator);
- _g_object_unref0 (test_set);
-}
-
-
-void sorted_set_tests_test_bidir_iterator_last (SortedSetTests* self) {
- GeeCollection* _tmp0_;
- GeeSortedSet* _tmp1_;
- GeeSortedSet* test_set;
- GeeBidirIterator* _tmp2_ = NULL;
- GeeBidirIterator* iterator;
- GeeBidirIterator* _tmp3_;
- gboolean _tmp4_ = FALSE;
- gboolean _tmp5_ = FALSE;
- gboolean _tmp6_ = FALSE;
- gboolean _tmp7_ = FALSE;
- gboolean _tmp8_ = FALSE;
- gboolean _tmp9_ = FALSE;
- gboolean _tmp10_ = FALSE;
- GeeBidirIterator* _tmp11_ = NULL;
- GeeBidirIterator* _tmp12_;
- gboolean _tmp13_ = FALSE;
- GeeBidirIterator* _tmp14_;
- gpointer _tmp15_ = NULL;
- gchar* _tmp16_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_SET) ? ((GeeSortedSet*) _tmp0_) : NULL);
- test_set = _tmp1_;
- _tmp2_ = gee_sorted_set_bidir_iterator (test_set);
- iterator = _tmp2_;
- _tmp3_ = iterator;
- _tmp4_ = gee_bidir_iterator_last (_tmp3_);
- _vala_assert (!_tmp4_, "!iterator.last ()");
- _tmp5_ = gee_collection_add ((GeeCollection*) test_set, "one");
- _vala_assert (_tmp5_, "test_set.add (\"one\")");
- _tmp6_ = gee_collection_add ((GeeCollection*) test_set, "two");
- _vala_assert (_tmp6_, "test_set.add (\"two\")");
- _tmp7_ = gee_collection_add ((GeeCollection*) test_set, "three");
- _vala_assert (_tmp7_, "test_set.add (\"three\")");
- _tmp8_ = gee_collection_add ((GeeCollection*) test_set, "four");
- _vala_assert (_tmp8_, "test_set.add (\"four\")");
- _tmp9_ = gee_collection_add ((GeeCollection*) test_set, "five");
- _vala_assert (_tmp9_, "test_set.add (\"five\")");
- _tmp10_ = gee_collection_add ((GeeCollection*) test_set, "six");
- _vala_assert (_tmp10_, "test_set.add (\"six\")");
- _tmp11_ = gee_sorted_set_bidir_iterator (test_set);
- _g_object_unref0 (iterator);
- iterator = _tmp11_;
- _tmp12_ = iterator;
- _tmp13_ = gee_bidir_iterator_last (_tmp12_);
- _vala_assert (_tmp13_, "iterator.last ()");
- _tmp14_ = iterator;
- _tmp15_ = gee_iterator_get ((GeeIterator*) _tmp14_);
- _tmp16_ = (gchar*) _tmp15_;
- _vala_assert (g_strcmp0 (_tmp16_, "two") == 0, "iterator.get () == \"two\"");
- _g_free0 (_tmp16_);
- _g_object_unref0 (iterator);
- _g_object_unref0 (test_set);
-}
-
-
-void sorted_set_tests_test_mutable_bidir_iterator (SortedSetTests* self) {
- GeeCollection* _tmp0_;
- GeeSortedSet* _tmp1_;
- GeeSortedSet* test_set;
- GeeSortedSet* _tmp2_;
- GeeBidirIterator* _tmp3_ = NULL;
- GeeBidirIterator* iterator;
- GeeBidirIterator* _tmp4_;
- gboolean _tmp5_ = FALSE;
- GeeSortedSet* _tmp6_;
- gboolean _tmp7_ = FALSE;
- GeeSortedSet* _tmp8_;
- gboolean _tmp9_ = FALSE;
- GeeSortedSet* _tmp10_;
- gboolean _tmp11_ = FALSE;
- GeeSortedSet* _tmp12_;
- gboolean _tmp13_ = FALSE;
- GeeSortedSet* _tmp14_;
- gboolean _tmp15_ = FALSE;
- GeeSortedSet* _tmp16_;
- gboolean _tmp17_ = FALSE;
- GeeSortedSet* _tmp18_;
- GeeBidirIterator* _tmp19_ = NULL;
- gboolean _tmp20_ = FALSE;
- GeeBidirIterator* _tmp22_;
- gboolean _tmp23_ = FALSE;
- GeeBidirIterator* _tmp24_;
- gpointer _tmp25_ = NULL;
- gchar* _tmp26_;
- GeeBidirIterator* _tmp27_;
- GeeSortedSet* _tmp28_;
- gboolean _tmp29_ = FALSE;
- GeeBidirIterator* _tmp30_;
- gboolean _tmp31_ = FALSE;
- GeeBidirIterator* _tmp32_;
- gboolean _tmp33_ = FALSE;
- gboolean _tmp34_ = FALSE;
- GeeBidirIterator* _tmp38_;
- gboolean _tmp39_ = FALSE;
- GeeBidirIterator* _tmp40_;
- gboolean _tmp41_ = FALSE;
- GeeBidirIterator* _tmp42_;
- gpointer _tmp43_ = NULL;
- gchar* _tmp44_;
- GeeBidirIterator* _tmp45_;
- gboolean _tmp46_ = FALSE;
- GeeBidirIterator* _tmp47_;
- gpointer _tmp48_ = NULL;
- gchar* _tmp49_;
- GeeBidirIterator* _tmp50_;
- GeeSortedSet* _tmp51_;
- gboolean _tmp52_ = FALSE;
- GeeBidirIterator* _tmp53_;
- gboolean _tmp54_ = FALSE;
- GeeBidirIterator* _tmp55_;
- gboolean _tmp56_ = FALSE;
- GeeBidirIterator* _tmp57_;
- gboolean _tmp58_ = FALSE;
- GeeBidirIterator* _tmp59_;
- gpointer _tmp60_ = NULL;
- gchar* _tmp61_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_SORTED_SET) ? ((GeeSortedSet*) _tmp0_) : NULL);
- test_set = _tmp1_;
- _tmp2_ = test_set;
- _tmp3_ = gee_sorted_set_bidir_iterator (_tmp2_);
- iterator = _tmp3_;
- _tmp4_ = iterator;
- _tmp5_ = gee_bidir_iterator_has_previous (_tmp4_);
- _vala_assert (!_tmp5_, "!iterator.has_previous ()");
- _tmp6_ = test_set;
- _tmp7_ = gee_collection_add ((GeeCollection*) _tmp6_, "one");
- _vala_assert (_tmp7_, "test_set.add (\"one\")");
- _tmp8_ = test_set;
- _tmp9_ = gee_collection_add ((GeeCollection*) _tmp8_, "two");
- _vala_assert (_tmp9_, "test_set.add (\"two\")");
- _tmp10_ = test_set;
- _tmp11_ = gee_collection_add ((GeeCollection*) _tmp10_, "three");
- _vala_assert (_tmp11_, "test_set.add (\"three\")");
- _tmp12_ = test_set;
- _tmp13_ = gee_collection_add ((GeeCollection*) _tmp12_, "four");
- _vala_assert (_tmp13_, "test_set.add (\"four\")");
- _tmp14_ = test_set;
- _tmp15_ = gee_collection_add ((GeeCollection*) _tmp14_, "five");
- _vala_assert (_tmp15_, "test_set.add (\"five\")");
- _tmp16_ = test_set;
- _tmp17_ = gee_collection_add ((GeeCollection*) _tmp16_, "six");
- _vala_assert (_tmp17_, "test_set.add (\"six\")");
- _tmp18_ = test_set;
- _tmp19_ = gee_sorted_set_bidir_iterator (_tmp18_);
- _g_object_unref0 (iterator);
- iterator = _tmp19_;
- _tmp20_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp20_) {
- GeeBidirIterator* _tmp21_;
- _tmp21_ = iterator;
- gee_iterator_remove ((GeeIterator*) _tmp21_);
- exit (0);
- }
- g_test_trap_assert_failed ();
- _tmp22_ = iterator;
- _tmp23_ = gee_iterator_next ((GeeIterator*) _tmp22_);
- _vala_assert (_tmp23_, "iterator.next ()");
- _tmp24_ = iterator;
- _tmp25_ = gee_iterator_get ((GeeIterator*) _tmp24_);
- _tmp26_ = (gchar*) _tmp25_;
- _vala_assert (g_strcmp0 (_tmp26_, "five") == 0, "iterator.get () == \"five\"");
- _g_free0 (_tmp26_);
- _tmp27_ = iterator;
- gee_iterator_remove ((GeeIterator*) _tmp27_);
- _tmp28_ = test_set;
- _tmp29_ = gee_collection_contains ((GeeCollection*) _tmp28_, "five");
- _vala_assert (!_tmp29_, "!test_set.contains (\"five\")");
- _tmp30_ = iterator;
- _tmp31_ = gee_iterator_has_next ((GeeIterator*) _tmp30_);
- _vala_assert (_tmp31_, "iterator.has_next ()");
- _tmp32_ = iterator;
- _tmp33_ = gee_bidir_iterator_has_previous (_tmp32_);
- _vala_assert (!_tmp33_, "!iterator.has_previous ()");
- _tmp34_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp34_) {
- GeeBidirIterator* _tmp35_;
- gpointer _tmp36_ = NULL;
- gchar* _tmp37_;
- _tmp35_ = iterator;
- _tmp36_ = gee_iterator_get ((GeeIterator*) _tmp35_);
- _tmp37_ = (gchar*) _tmp36_;
- _g_free0 (_tmp37_);
- exit (0);
- }
- _tmp38_ = iterator;
- _tmp39_ = gee_bidir_iterator_previous (_tmp38_);
- _vala_assert (!_tmp39_, "!iterator.previous ()");
- _tmp40_ = iterator;
- _tmp41_ = gee_iterator_next ((GeeIterator*) _tmp40_);
- _vala_assert (_tmp41_, "iterator.next ()");
- _tmp42_ = iterator;
- _tmp43_ = gee_iterator_get ((GeeIterator*) _tmp42_);
- _tmp44_ = (gchar*) _tmp43_;
- _vala_assert (g_strcmp0 (_tmp44_, "four") == 0, "iterator.get () == \"four\"");
- _g_free0 (_tmp44_);
- _tmp45_ = iterator;
- _tmp46_ = gee_iterator_next ((GeeIterator*) _tmp45_);
- _vala_assert (_tmp46_, "iterator.next ()");
- _tmp47_ = iterator;
- _tmp48_ = gee_iterator_get ((GeeIterator*) _tmp47_);
- _tmp49_ = (gchar*) _tmp48_;
- _vala_assert (g_strcmp0 (_tmp49_, "one") == 0, "iterator.get () == \"one\"");
- _g_free0 (_tmp49_);
- _tmp50_ = iterator;
- gee_iterator_remove ((GeeIterator*) _tmp50_);
- _tmp51_ = test_set;
- _tmp52_ = gee_collection_contains ((GeeCollection*) _tmp51_, "one");
- _vala_assert (!_tmp52_, "!test_set.contains (\"one\")");
- _tmp53_ = iterator;
- _tmp54_ = gee_iterator_has_next ((GeeIterator*) _tmp53_);
- _vala_assert (_tmp54_, "iterator.has_next ()");
- _tmp55_ = iterator;
- _tmp56_ = gee_bidir_iterator_has_previous (_tmp55_);
- _vala_assert (_tmp56_, "iterator.has_previous ()");
- _tmp57_ = iterator;
- _tmp58_ = gee_bidir_iterator_previous (_tmp57_);
- _vala_assert (_tmp58_, "iterator.previous ()");
- _tmp59_ = iterator;
- _tmp60_ = gee_iterator_get ((GeeIterator*) _tmp59_);
- _tmp61_ = (gchar*) _tmp60_;
- _vala_assert (g_strcmp0 (_tmp61_, "four") == 0, "iterator.get () == \"four\"");
- _g_free0 (_tmp61_);
- _g_object_unref0 (iterator);
- _g_object_unref0 (test_set);
-}
-
-
-const gchar* sorted_set_tests_sub_set_type_to_string (SortedSetTestsSubSetType self) {
+const gchar* sorted_set_tests_sub_set_tests_type_to_string (SortedSetTestsSubSetTestsType self) {
const gchar* result = NULL;
switch (self) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
result = "Head";
return result;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
result = "Tail";
return result;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
result = "Range";
return result;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
result = "Empty";
return result;
@@ -1579,98 +1115,99 @@ const gchar* sorted_set_tests_sub_set_type_to_string (SortedSetTestsSubSetType s
}
-GType sorted_set_tests_sub_set_type_get_type (void) {
- static volatile gsize sorted_set_tests_sub_set_type_type_id__volatile = 0;
- if (g_once_init_enter (&sorted_set_tests_sub_set_type_type_id__volatile)) {
- static const GEnumValue values[] = {{SORTED_SET_TESTS_SUB_SET_TYPE_HEAD, "SORTED_SET_TESTS_SUB_SET_TYPE_HEAD", "head"}, {SORTED_SET_TESTS_SUB_SET_TYPE_TAIL, "SORTED_SET_TESTS_SUB_SET_TYPE_TAIL", "tail"}, {SORTED_SET_TESTS_SUB_SET_TYPE_SUB, "SORTED_SET_TESTS_SUB_SET_TYPE_SUB", "sub"}, {SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY, "SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY", "empty"}, {0, NULL, NULL}};
- GType sorted_set_tests_sub_set_type_type_id;
- sorted_set_tests_sub_set_type_type_id = g_enum_register_static ("SortedSetTestsSubSetType", values);
- g_once_init_leave (&sorted_set_tests_sub_set_type_type_id__volatile, sorted_set_tests_sub_set_type_type_id);
+GType sorted_set_tests_sub_set_tests_type_get_type (void) {
+ static volatile gsize sorted_set_tests_sub_set_tests_type_type_id__volatile = 0;
+ if (g_once_init_enter (&sorted_set_tests_sub_set_tests_type_type_id__volatile)) {
+ static const GEnumValue values[] = {{SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD, "SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD", "head"}, {SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL, "SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL", "tail"}, {SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB, "SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB", "sub"}, {SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY, "SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY", "empty"}, {0, NULL, NULL}};
+ GType sorted_set_tests_sub_set_tests_type_type_id;
+ sorted_set_tests_sub_set_tests_type_type_id = g_enum_register_static ("SortedSetTestsSubSetTestsType", values);
+ g_once_init_leave (&sorted_set_tests_sub_set_tests_type_type_id__volatile, sorted_set_tests_sub_set_tests_type_type_id);
}
- return sorted_set_tests_sub_set_type_type_id__volatile;
+ return sorted_set_tests_sub_set_tests_type_type_id__volatile;
}
-static void _sorted_set_tests_sub_set_test_size_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_size (self);
+static void _sorted_set_tests_sub_set_tests_test_size_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_size (self);
}
-static void _sorted_set_tests_sub_set_test_contains_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_contains (self);
+static void _sorted_set_tests_sub_set_tests_test_contains_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_contains (self);
}
-static void _sorted_set_tests_sub_set_test_add_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_add (self);
+static void _sorted_set_tests_sub_set_tests_test_add_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_add (self);
}
-static void _sorted_set_tests_sub_set_test_remove_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_remove (self);
+static void _sorted_set_tests_sub_set_tests_test_remove_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_remove (self);
}
-static void _sorted_set_tests_sub_set_test_iterator_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_iterator (self);
+static void _sorted_set_tests_sub_set_tests_test_iterator_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_iterator (self);
}
-static void _sorted_set_tests_sub_set_test_clear_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_clear (self);
+static void _sorted_set_tests_sub_set_tests_test_clear_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_clear (self);
}
-static void _sorted_set_tests_sub_set_test_iterator_at_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_iterator_at (self);
+static void _sorted_set_tests_sub_set_tests_test_iterator_at_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_iterator_at (self);
}
-static void _sorted_set_tests_sub_set_test_lower_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_lower (self);
+static void _sorted_set_tests_sub_set_tests_test_lower_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_lower (self);
}
-static void _sorted_set_tests_sub_set_test_higher_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_higher (self);
+static void _sorted_set_tests_sub_set_tests_test_higher_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_higher (self);
}
-static void _sorted_set_tests_sub_set_test_ceil_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_ceil (self);
+static void _sorted_set_tests_sub_set_tests_test_ceil_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_ceil (self);
}
-static void _sorted_set_tests_sub_set_test_floor_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_floor (self);
+static void _sorted_set_tests_sub_set_tests_test_floor_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_floor (self);
}
-static void _sorted_set_tests_sub_set_test_subsets_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_subsets (self);
+static void _sorted_set_tests_sub_set_tests_test_subsets_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_subsets (self);
}
-static void _sorted_set_tests_sub_set_test_boundaries_gee_test_case_test_method (gpointer self) {
- sorted_set_tests_sub_set_test_boundaries (self);
+static void _sorted_set_tests_sub_set_tests_test_boundaries_gee_test_case_test_method (gpointer self) {
+ sorted_set_tests_sub_set_tests_test_boundaries (self);
}
-SortedSetTestsSubSet* sorted_set_tests_sub_set_construct (GType object_type, SortedSetTests* test, SortedSetTestsSubSetType type) {
- SortedSetTestsSubSet * self = NULL;
- SortedSetTestsSubSetType _tmp0_;
+SortedSetTestsSubSetTests* sorted_set_tests_sub_set_tests_construct (GType object_type, SortedSetTests* test, SortedSetTestsSubSetTestsType type, gboolean strict) {
+ SortedSetTestsSubSetTests * self = NULL;
+ SortedSetTestsSubSetTestsType _tmp0_;
const gchar* _tmp1_ = NULL;
gchar* _tmp2_ = NULL;
gchar* _tmp3_;
SortedSetTests* _tmp4_;
SortedSetTests* _tmp5_;
- SortedSetTestsSubSetType _tmp6_;
+ SortedSetTestsSubSetTestsType _tmp6_;
+ gboolean _tmp7_;
g_return_val_if_fail (test != NULL, NULL);
_tmp0_ = type;
- _tmp1_ = sorted_set_tests_sub_set_type_to_string (_tmp0_);
+ _tmp1_ = sorted_set_tests_sub_set_tests_type_to_string (_tmp0_);
_tmp2_ = g_strdup_printf ("%s Subset", _tmp1_);
_tmp3_ = _tmp2_;
- self = (SortedSetTestsSubSet*) gee_test_case_construct (object_type, _tmp3_);
+ self = (SortedSetTestsSubSetTests*) gee_test_case_construct (object_type, _tmp3_);
_g_free0 (_tmp3_);
_tmp4_ = test;
_tmp5_ = _g_object_ref0 (_tmp4_);
@@ -1678,36 +1215,38 @@ SortedSetTestsSubSet* sorted_set_tests_sub_set_construct (GType object_type, Sor
self->priv->test = _tmp5_;
_tmp6_ = type;
self->priv->type = _tmp6_;
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] size", _sorted_set_tests_sub_set_test_size_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] contains", _sorted_set_tests_sub_set_test_contains_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] add", _sorted_set_tests_sub_set_test_add_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] remove", _sorted_set_tests_sub_set_test_remove_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] iterator", _sorted_set_tests_sub_set_test_iterator_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[Collection] clear", _sorted_set_tests_sub_set_test_clear_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] iterator at", _sorted_set_tests_sub_set_test_iterator_at_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] lower", _sorted_set_tests_sub_set_test_lower_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] higher", _sorted_set_tests_sub_set_test_higher_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] ceil", _sorted_set_tests_sub_set_test_ceil_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] floor", _sorted_set_tests_sub_set_test_floor_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] subsets", _sorted_set_tests_sub_set_test_subsets_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] boundaries", _sorted_set_tests_sub_set_test_boundaries_gee_test_case_test_method, self);
+ _tmp7_ = strict;
+ self->priv->strict = _tmp7_;
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] size", _sorted_set_tests_sub_set_tests_test_size_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] contains", _sorted_set_tests_sub_set_tests_test_contains_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] add", _sorted_set_tests_sub_set_tests_test_add_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] remove", _sorted_set_tests_sub_set_tests_test_remove_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] iterator", _sorted_set_tests_sub_set_tests_test_iterator_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[Collection] clear", _sorted_set_tests_sub_set_tests_test_clear_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] iterator at", _sorted_set_tests_sub_set_tests_test_iterator_at_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] lower", _sorted_set_tests_sub_set_tests_test_lower_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] higher", _sorted_set_tests_sub_set_tests_test_higher_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] ceil", _sorted_set_tests_sub_set_tests_test_ceil_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] floor", _sorted_set_tests_sub_set_tests_test_floor_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] subsets", _sorted_set_tests_sub_set_tests_test_subsets_gee_test_case_test_method, g_object_ref (self), g_object_unref);
+ gee_test_case_add_test ((GeeTestCase*) self, "[SortedSet] boundaries", _sorted_set_tests_sub_set_tests_test_boundaries_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
-SortedSetTestsSubSet* sorted_set_tests_sub_set_new (SortedSetTests* test, SortedSetTestsSubSetType type) {
- return sorted_set_tests_sub_set_construct (SORTED_SET_TESTS_TYPE_SUB_SET, test, type);
+SortedSetTestsSubSetTests* sorted_set_tests_sub_set_tests_new (SortedSetTests* test, SortedSetTestsSubSetTestsType type, gboolean strict) {
+ return sorted_set_tests_sub_set_tests_construct (SORTED_SET_TESTS_TYPE_SUB_SET_TESTS, test, type, strict);
}
-static void sorted_set_tests_sub_set_real_set_up (GeeTestCase* base) {
- SortedSetTestsSubSet * self;
+static void sorted_set_tests_sub_set_tests_real_set_up (GeeTestCase* base) {
+ SortedSetTestsSubSetTests * self;
SortedSetTests* _tmp0_;
SortedSetTests* _tmp1_;
GeeCollection* _tmp2_;
GeeSortedSet* _tmp3_;
- SortedSetTestsSubSetType _tmp4_;
- self = (SortedSetTestsSubSet*) base;
+ SortedSetTestsSubSetTestsType _tmp4_;
+ self = (SortedSetTestsSubSetTests*) base;
_tmp0_ = self->priv->test;
gee_test_case_set_up ((GeeTestCase*) _tmp0_);
_tmp1_ = self->priv->test;
@@ -1717,7 +1256,7 @@ static void sorted_set_tests_sub_set_real_set_up (GeeTestCase* base) {
self->priv->master = _tmp3_;
_tmp4_ = self->priv->type;
switch (_tmp4_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
GeeSortedSet* _tmp5_;
GeeSortedSet* _tmp6_ = NULL;
@@ -1727,7 +1266,7 @@ static void sorted_set_tests_sub_set_real_set_up (GeeTestCase* base) {
self->priv->subset = _tmp6_;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
GeeSortedSet* _tmp7_;
GeeSortedSet* _tmp8_ = NULL;
@@ -1737,7 +1276,7 @@ static void sorted_set_tests_sub_set_real_set_up (GeeTestCase* base) {
self->priv->subset = _tmp8_;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
GeeSortedSet* _tmp9_;
GeeSortedSet* _tmp10_ = NULL;
@@ -1747,7 +1286,7 @@ static void sorted_set_tests_sub_set_real_set_up (GeeTestCase* base) {
self->priv->subset = _tmp10_;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
GeeSortedSet* _tmp11_;
GeeSortedSet* _tmp12_ = NULL;
@@ -1765,16 +1304,16 @@ static void sorted_set_tests_sub_set_real_set_up (GeeTestCase* base) {
}
-static void sorted_set_tests_sub_set_real_tear_down (GeeTestCase* base) {
- SortedSetTestsSubSet * self;
+static void sorted_set_tests_sub_set_tests_real_tear_down (GeeTestCase* base) {
+ SortedSetTestsSubSetTests * self;
SortedSetTests* _tmp0_;
- self = (SortedSetTestsSubSet*) base;
+ self = (SortedSetTestsSubSetTests*) base;
_tmp0_ = self->priv->test;
gee_test_case_tear_down ((GeeTestCase*) _tmp0_);
}
-void sorted_set_tests_sub_set_test_size (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_size (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_;
gboolean _tmp2_;
@@ -1796,7 +1335,7 @@ void sorted_set_tests_sub_set_test_size (SortedSetTestsSubSet* self) {
GeeSortedSet* _tmp18_;
gint _tmp19_;
gint _tmp20_;
- SortedSetTestsSubSetType _tmp21_;
+ SortedSetTestsSubSetTestsType _tmp21_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->subset;
_tmp1_ = gee_collection_get_is_empty ((GeeCollection*) _tmp0_);
@@ -1830,7 +1369,7 @@ void sorted_set_tests_sub_set_test_size (SortedSetTestsSubSet* self) {
_vala_assert (_tmp20_ == 6, "master.size == 6");
_tmp21_ = self->priv->type;
switch (_tmp21_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
GeeSortedSet* _tmp22_;
gboolean _tmp23_;
@@ -1848,7 +1387,7 @@ void sorted_set_tests_sub_set_test_size (SortedSetTestsSubSet* self) {
_vala_assert (_tmp27_ == 2, "subset.size == 2");
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
GeeSortedSet* _tmp28_;
gboolean _tmp29_;
@@ -1866,7 +1405,7 @@ void sorted_set_tests_sub_set_test_size (SortedSetTestsSubSet* self) {
_vala_assert (_tmp33_ == 3, "subset.size == 3");
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
GeeSortedSet* _tmp34_;
gboolean _tmp35_;
@@ -1884,7 +1423,7 @@ void sorted_set_tests_sub_set_test_size (SortedSetTestsSubSet* self) {
_vala_assert (_tmp39_ == 3, "subset.size == 3");
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
GeeSortedSet* _tmp40_;
gboolean _tmp41_;
@@ -1910,7 +1449,7 @@ void sorted_set_tests_sub_set_test_size (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_contains (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_contains (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -1932,7 +1471,7 @@ void sorted_set_tests_sub_set_test_contains (SortedSetTestsSubSet* self) {
gchar** not_contains = NULL;
gint not_contains_length1 = 0;
gint _not_contains_size_ = 0;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
gchar** _tmp48_;
gint _tmp48__length1;
gchar** _tmp53_;
@@ -1962,7 +1501,7 @@ void sorted_set_tests_sub_set_test_contains (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
gchar* _tmp16_;
gchar* _tmp17_;
@@ -1996,7 +1535,7 @@ void sorted_set_tests_sub_set_test_contains (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
gchar* _tmp24_;
gchar* _tmp25_;
@@ -2030,7 +1569,7 @@ void sorted_set_tests_sub_set_test_contains (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
gchar* _tmp32_;
gchar* _tmp33_;
@@ -2064,7 +1603,7 @@ void sorted_set_tests_sub_set_test_contains (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
gchar** _tmp40_ = NULL;
gchar* _tmp41_;
@@ -2160,7 +1699,7 @@ void sorted_set_tests_sub_set_test_contains (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_add (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_add (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -2182,7 +1721,7 @@ void sorted_set_tests_sub_set_test_add (SortedSetTestsSubSet* self) {
gchar** fail = NULL;
gint fail_length1 = 0;
gint _fail_size_ = 0;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
gchar** _tmp40_;
gint _tmp40__length1;
gchar** _tmp51_;
@@ -2217,7 +1756,7 @@ void sorted_set_tests_sub_set_test_add (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
gchar* _tmp16_;
gchar* _tmp17_;
@@ -2245,7 +1784,7 @@ void sorted_set_tests_sub_set_test_add (SortedSetTestsSubSet* self) {
_fail_size_ = fail_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
gchar* _tmp22_;
gchar* _tmp23_;
@@ -2273,7 +1812,7 @@ void sorted_set_tests_sub_set_test_add (SortedSetTestsSubSet* self) {
_fail_size_ = fail_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
gchar* _tmp28_;
gchar* _tmp29_;
@@ -2301,7 +1840,7 @@ void sorted_set_tests_sub_set_test_add (SortedSetTestsSubSet* self) {
_fail_size_ = fail_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
gchar** _tmp34_ = NULL;
gchar* _tmp35_;
@@ -2425,7 +1964,7 @@ void sorted_set_tests_sub_set_test_add (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_remove (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_remove (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -2447,7 +1986,7 @@ void sorted_set_tests_sub_set_test_remove (SortedSetTestsSubSet* self) {
gchar** not_contains = NULL;
gint not_contains_length1 = 0;
gint _not_contains_size_ = 0;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
gchar** _tmp48_;
gint _tmp48__length1;
gchar** _tmp56_;
@@ -2482,7 +2021,7 @@ void sorted_set_tests_sub_set_test_remove (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
gchar* _tmp16_;
gchar* _tmp17_;
@@ -2516,7 +2055,7 @@ void sorted_set_tests_sub_set_test_remove (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
gchar* _tmp24_;
gchar* _tmp25_;
@@ -2550,7 +2089,7 @@ void sorted_set_tests_sub_set_test_remove (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
gchar* _tmp32_;
gchar* _tmp33_;
@@ -2584,7 +2123,7 @@ void sorted_set_tests_sub_set_test_remove (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
gchar** _tmp40_ = NULL;
gchar* _tmp41_;
@@ -2700,7 +2239,7 @@ void sorted_set_tests_sub_set_test_remove (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_iterator (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -2719,15 +2258,15 @@ void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self) {
gchar** contains = NULL;
gint contains_length1 = 0;
gint _contains_size_ = 0;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
guint i;
guint _tmp38_;
gchar** _tmp39_;
gint _tmp39__length1;
GeeSortedSet* _tmp40_;
- GeeBidirIterator* _tmp41_ = NULL;
- GeeBidirIterator* iter;
- SortedSetTestsSubSetType _tmp42_;
+ GeeIterator* _tmp41_ = NULL;
+ GeeIterator* iter;
+ SortedSetTestsSubSetTestsType _tmp42_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->master;
_tmp1_ = gee_collection_add ((GeeCollection*) _tmp0_, "one");
@@ -2753,7 +2292,7 @@ void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
gchar* _tmp16_;
gchar* _tmp17_;
@@ -2769,7 +2308,7 @@ void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self) {
_contains_size_ = contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
gchar* _tmp19_;
gchar* _tmp20_;
@@ -2788,7 +2327,7 @@ void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self) {
_contains_size_ = contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
gchar* _tmp23_;
gchar* _tmp24_;
@@ -2807,7 +2346,7 @@ void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self) {
_contains_size_ = contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
gchar** _tmp27_ = NULL;
_tmp27_ = g_new0 (gchar*, 0 + 1);
@@ -2865,135 +2404,65 @@ void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self) {
_tmp39__length1 = contains_length1;
_vala_assert (_tmp38_ == ((guint) _tmp39__length1), "i == contains.length");
_tmp40_ = self->priv->subset;
- _tmp41_ = gee_sorted_set_bidir_iterator (_tmp40_);
+ _tmp41_ = gee_iterable_iterator ((GeeIterable*) _tmp40_);
iter = _tmp41_;
_tmp42_ = self->priv->type;
- if (_tmp42_ != SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY) {
- GeeBidirIterator* _tmp43_;
+ if (_tmp42_ != SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY) {
+ GeeIterator* _tmp43_;
gboolean _tmp44_ = FALSE;
- GeeBidirIterator* _tmp45_;
- gpointer _tmp46_ = NULL;
- gchar* _tmp47_;
- gchar** _tmp48_;
- gint _tmp48__length1;
- gchar** _tmp49_;
- gint _tmp49__length1;
- const gchar* _tmp50_;
- GeeBidirIterator* _tmp51_;
- gboolean _tmp52_ = FALSE;
- GeeBidirIterator* _tmp53_;
- gpointer _tmp54_ = NULL;
- gchar* _tmp55_;
- gchar** _tmp56_;
- gint _tmp56__length1;
- const gchar* _tmp57_;
- GeeBidirIterator* _tmp58_;
- gboolean _tmp59_ = FALSE;
- GeeBidirIterator* _tmp60_;
- gboolean _tmp61_ = FALSE;
- GeeBidirIterator* _tmp62_;
- gpointer _tmp63_ = NULL;
- gchar* _tmp64_;
- gchar** _tmp65_;
- gint _tmp65__length1;
- const gchar* _tmp66_;
- GeeBidirIterator* _tmp67_;
- gboolean _tmp68_ = FALSE;
- GeeBidirIterator* _tmp69_;
- GeeBidirIterator* _tmp70_;
- gboolean _tmp71_ = FALSE;
- SortedSetTestsSubSetType _tmp72_;
- GeeBidirIterator* _tmp77_;
- gboolean _tmp78_ = FALSE;
- GeeBidirIterator* _tmp79_;
- gpointer _tmp80_ = NULL;
- gchar* _tmp81_;
- gchar** _tmp82_;
- gint _tmp82__length1;
- const gchar* _tmp83_;
+ GeeIterator* _tmp45_;
+ gboolean _tmp46_ = FALSE;
+ GeeIterator* _tmp47_;
+ gpointer _tmp48_ = NULL;
+ gchar* _tmp49_;
+ gchar** _tmp50_;
+ gint _tmp50__length1;
+ const gchar* _tmp51_;
+ GeeIterator* _tmp52_;
+ gboolean _tmp53_ = FALSE;
+ GeeIterator* _tmp54_;
+ gboolean _tmp55_ = FALSE;
+ GeeIterator* _tmp56_;
+ gpointer _tmp57_ = NULL;
+ gchar* _tmp58_;
+ gchar** _tmp59_;
+ gint _tmp59__length1;
+ const gchar* _tmp60_;
_tmp43_ = iter;
- _tmp44_ = gee_bidir_iterator_last (_tmp43_);
- _vala_assert (_tmp44_, "iter.last ()");
+ _tmp44_ = gee_iterator_has_next (_tmp43_);
+ _vala_assert (_tmp44_, "iter.has_next ()");
_tmp45_ = iter;
- _tmp46_ = gee_iterator_get ((GeeIterator*) _tmp45_);
- _tmp47_ = (gchar*) _tmp46_;
- _tmp48_ = contains;
- _tmp48__length1 = contains_length1;
- _tmp49_ = contains;
- _tmp49__length1 = contains_length1;
- _tmp50_ = _tmp48_[_tmp49__length1 - 1];
- _vala_assert (g_strcmp0 (_tmp47_, _tmp50_) == 0, "iter.get () == contains[contains.length - 1]");
- _g_free0 (_tmp47_);
- _tmp51_ = iter;
- _tmp52_ = gee_iterator_first ((GeeIterator*) _tmp51_);
- _vala_assert (_tmp52_, "iter.first ()");
- _tmp53_ = iter;
- _tmp54_ = gee_iterator_get ((GeeIterator*) _tmp53_);
- _tmp55_ = (gchar*) _tmp54_;
- _tmp56_ = contains;
- _tmp56__length1 = contains_length1;
- _tmp57_ = _tmp56_[0];
- _vala_assert (g_strcmp0 (_tmp55_, _tmp57_) == 0, "iter.get () == contains[0]");
- _g_free0 (_tmp55_);
- _tmp58_ = iter;
- _tmp59_ = gee_iterator_has_next ((GeeIterator*) _tmp58_);
- _vala_assert (_tmp59_, "iter.has_next ()");
- _tmp60_ = iter;
- _tmp61_ = gee_iterator_next ((GeeIterator*) _tmp60_);
- _vala_assert (_tmp61_, "iter.next ()");
- _tmp62_ = iter;
- _tmp63_ = gee_iterator_get ((GeeIterator*) _tmp62_);
- _tmp64_ = (gchar*) _tmp63_;
- _tmp65_ = contains;
- _tmp65__length1 = contains_length1;
- _tmp66_ = _tmp65_[1];
- _vala_assert (g_strcmp0 (_tmp64_, _tmp66_) == 0, "iter.get () == contains[1]");
- _g_free0 (_tmp64_);
- _tmp67_ = iter;
- _tmp68_ = gee_bidir_iterator_has_previous (_tmp67_);
- _vala_assert (_tmp68_, "iter.has_previous ()");
- _tmp69_ = iter;
- gee_iterator_remove ((GeeIterator*) _tmp69_);
- _tmp70_ = iter;
- _tmp71_ = gee_bidir_iterator_has_previous (_tmp70_);
- _vala_assert (_tmp71_, "iter.has_previous ()");
- _tmp72_ = self->priv->type;
- if (_tmp72_ != SORTED_SET_TESTS_SUB_SET_TYPE_HEAD) {
- GeeBidirIterator* _tmp73_;
- gboolean _tmp74_ = FALSE;
- _tmp73_ = iter;
- _tmp74_ = gee_iterator_has_next ((GeeIterator*) _tmp73_);
- _vala_assert (_tmp74_, "iter.has_next ()");
- } else {
- GeeBidirIterator* _tmp75_;
- gboolean _tmp76_ = FALSE;
- _tmp75_ = iter;
- _tmp76_ = gee_iterator_has_next ((GeeIterator*) _tmp75_);
- _vala_assert (!_tmp76_, "!iter.has_next ()");
- }
- _tmp77_ = iter;
- _tmp78_ = gee_bidir_iterator_previous (_tmp77_);
- _vala_assert (_tmp78_, "iter.previous ()");
- _tmp79_ = iter;
- _tmp80_ = gee_iterator_get ((GeeIterator*) _tmp79_);
- _tmp81_ = (gchar*) _tmp80_;
- _tmp82_ = contains;
- _tmp82__length1 = contains_length1;
- _tmp83_ = _tmp82_[0];
- _vala_assert (g_strcmp0 (_tmp81_, _tmp83_) == 0, "iter.get () == contains[0]");
- _g_free0 (_tmp81_);
+ _tmp46_ = gee_iterator_next (_tmp45_);
+ _vala_assert (_tmp46_, "iter.next ()");
+ _tmp47_ = iter;
+ _tmp48_ = gee_iterator_get (_tmp47_);
+ _tmp49_ = (gchar*) _tmp48_;
+ _tmp50_ = contains;
+ _tmp50__length1 = contains_length1;
+ _tmp51_ = _tmp50_[0];
+ _vala_assert (g_strcmp0 (_tmp49_, _tmp51_) == 0, "iter.get () == contains[0]");
+ _g_free0 (_tmp49_);
+ _tmp52_ = iter;
+ _tmp53_ = gee_iterator_has_next (_tmp52_);
+ _vala_assert (_tmp53_, "iter.has_next ()");
+ _tmp54_ = iter;
+ _tmp55_ = gee_iterator_next (_tmp54_);
+ _vala_assert (_tmp55_, "iter.next ()");
+ _tmp56_ = iter;
+ _tmp57_ = gee_iterator_get (_tmp56_);
+ _tmp58_ = (gchar*) _tmp57_;
+ _tmp59_ = contains;
+ _tmp59__length1 = contains_length1;
+ _tmp60_ = _tmp59_[1];
+ _vala_assert (g_strcmp0 (_tmp58_, _tmp60_) == 0, "iter.get () == contains[1]");
+ _g_free0 (_tmp58_);
} else {
- GeeBidirIterator* _tmp84_;
- gboolean _tmp85_ = FALSE;
- gboolean _tmp86_ = FALSE;
- _tmp84_ = iter;
- _tmp85_ = gee_iterator_first ((GeeIterator*) _tmp84_);
- _vala_assert (!_tmp85_, "!iter.first ()");
- _tmp86_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp86_) {
- GeeBidirIterator* _tmp87_;
- _tmp87_ = iter;
- gee_iterator_remove ((GeeIterator*) _tmp87_);
+ gboolean _tmp61_ = FALSE;
+ _tmp61_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp61_) {
+ GeeIterator* _tmp62_;
+ _tmp62_ = iter;
+ gee_iterator_remove (_tmp62_);
exit (0);
}
g_test_trap_assert_failed ();
@@ -3003,7 +2472,7 @@ void sorted_set_tests_sub_set_test_iterator (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_clear (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_clear (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -3025,7 +2494,7 @@ void sorted_set_tests_sub_set_test_clear (SortedSetTestsSubSet* self) {
gchar** not_contains = NULL;
gint not_contains_length1 = 0;
gint _not_contains_size_ = 0;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
GeeSortedSet* _tmp48_;
gchar** _tmp49_;
gint _tmp49__length1;
@@ -3056,7 +2525,7 @@ void sorted_set_tests_sub_set_test_clear (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
gchar* _tmp16_;
gchar* _tmp17_;
@@ -3090,7 +2559,7 @@ void sorted_set_tests_sub_set_test_clear (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
gchar* _tmp24_;
gchar* _tmp25_;
@@ -3124,7 +2593,7 @@ void sorted_set_tests_sub_set_test_clear (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
gchar* _tmp32_;
gchar* _tmp33_;
@@ -3158,7 +2627,7 @@ void sorted_set_tests_sub_set_test_clear (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
gchar** _tmp40_ = NULL;
gchar* _tmp41_;
@@ -3256,7 +2725,7 @@ void sorted_set_tests_sub_set_test_clear (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_boundaries (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_boundaries (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -3272,7 +2741,7 @@ void sorted_set_tests_sub_set_test_boundaries (SortedSetTestsSubSet* self) {
GeeSortedSet* _tmp12_;
gint _tmp13_;
gint _tmp14_;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->master;
_tmp1_ = gee_collection_add ((GeeCollection*) _tmp0_, "one");
@@ -3298,7 +2767,7 @@ void sorted_set_tests_sub_set_test_boundaries (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
GeeSortedSet* _tmp16_;
gpointer _tmp17_ = NULL;
@@ -3318,7 +2787,7 @@ void sorted_set_tests_sub_set_test_boundaries (SortedSetTestsSubSet* self) {
_g_free0 (_tmp21_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
GeeSortedSet* _tmp22_;
gpointer _tmp23_ = NULL;
@@ -3338,7 +2807,7 @@ void sorted_set_tests_sub_set_test_boundaries (SortedSetTestsSubSet* self) {
_g_free0 (_tmp27_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
GeeSortedSet* _tmp28_;
gpointer _tmp29_ = NULL;
@@ -3358,34 +2827,38 @@ void sorted_set_tests_sub_set_test_boundaries (SortedSetTestsSubSet* self) {
_g_free0 (_tmp33_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
- gboolean _tmp34_ = FALSE;
- gboolean _tmp38_ = FALSE;
- _tmp34_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ gboolean _tmp34_;
+ _tmp34_ = self->priv->strict;
if (_tmp34_) {
- GeeSortedSet* _tmp35_;
- gpointer _tmp36_ = NULL;
- gchar* _tmp37_;
- _tmp35_ = self->priv->subset;
- _tmp36_ = gee_sorted_set_first (_tmp35_);
- _tmp37_ = (gchar*) _tmp36_;
- _g_free0 (_tmp37_);
- exit (0);
- }
- g_test_trap_assert_failed ();
- _tmp38_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
- if (_tmp38_) {
- GeeSortedSet* _tmp39_;
- gpointer _tmp40_ = NULL;
- gchar* _tmp41_;
- _tmp39_ = self->priv->subset;
- _tmp40_ = gee_sorted_set_last (_tmp39_);
- _tmp41_ = (gchar*) _tmp40_;
- _g_free0 (_tmp41_);
- exit (0);
+ gboolean _tmp35_ = FALSE;
+ gboolean _tmp39_ = FALSE;
+ _tmp35_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp35_) {
+ GeeSortedSet* _tmp36_;
+ gpointer _tmp37_ = NULL;
+ gchar* _tmp38_;
+ _tmp36_ = self->priv->subset;
+ _tmp37_ = gee_sorted_set_first (_tmp36_);
+ _tmp38_ = (gchar*) _tmp37_;
+ _g_free0 (_tmp38_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
+ _tmp39_ = g_test_trap_fork ((guint64) 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (_tmp39_) {
+ GeeSortedSet* _tmp40_;
+ gpointer _tmp41_ = NULL;
+ gchar* _tmp42_;
+ _tmp40_ = self->priv->subset;
+ _tmp41_ = gee_sorted_set_last (_tmp40_);
+ _tmp42_ = (gchar*) _tmp41_;
+ _g_free0 (_tmp42_);
+ exit (0);
+ }
+ g_test_trap_assert_failed ();
}
- g_test_trap_assert_failed ();
break;
}
default:
@@ -3396,7 +2869,7 @@ void sorted_set_tests_sub_set_test_boundaries (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_iterator_at (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -3418,7 +2891,7 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
gchar** not_contains = NULL;
gint not_contains_length1 = 0;
gint _not_contains_size_ = 0;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
gchar** _tmp48_;
gint _tmp48__length1;
gchar** _tmp58_;
@@ -3448,7 +2921,7 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
gchar* _tmp16_;
gchar* _tmp17_;
@@ -3482,7 +2955,7 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
gchar* _tmp24_;
gchar* _tmp25_;
@@ -3516,7 +2989,7 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
gchar* _tmp32_;
gchar* _tmp33_;
@@ -3550,7 +3023,7 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
_not_contains_size_ = not_contains_length1;
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
gchar** _tmp40_ = NULL;
gchar* _tmp41_;
@@ -3606,10 +3079,10 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
{
GeeSortedSet* _tmp50_;
const gchar* _tmp51_;
- GeeBidirIterator* _tmp52_ = NULL;
- GeeBidirIterator* iter;
- GeeBidirIterator* _tmp53_;
- GeeBidirIterator* _tmp54_;
+ GeeIterator* _tmp52_ = NULL;
+ GeeIterator* iter;
+ GeeIterator* _tmp53_;
+ GeeIterator* _tmp54_;
gpointer _tmp55_ = NULL;
gchar* _tmp56_;
const gchar* _tmp57_;
@@ -3620,7 +3093,7 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
_tmp53_ = iter;
_vala_assert (_tmp53_ != NULL, "iter != null");
_tmp54_ = iter;
- _tmp55_ = gee_iterator_get ((GeeIterator*) _tmp54_);
+ _tmp55_ = gee_iterator_get (_tmp54_);
_tmp56_ = (gchar*) _tmp55_;
_tmp57_ = s;
_vala_assert (g_strcmp0 (_tmp56_, _tmp57_) == 0, "iter.get () == s");
@@ -3647,9 +3120,9 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
{
GeeSortedSet* _tmp60_;
const gchar* _tmp61_;
- GeeBidirIterator* _tmp62_ = NULL;
- GeeBidirIterator* iter;
- GeeBidirIterator* _tmp63_;
+ GeeIterator* _tmp62_ = NULL;
+ GeeIterator* iter;
+ GeeIterator* _tmp63_;
_tmp60_ = self->priv->subset;
_tmp61_ = s;
_tmp62_ = gee_sorted_set_iterator_at (_tmp60_, _tmp61_);
@@ -3666,7 +3139,7 @@ void sorted_set_tests_sub_set_test_iterator_at (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_lower (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_lower (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -3682,7 +3155,7 @@ void sorted_set_tests_sub_set_test_lower (SortedSetTestsSubSet* self) {
GeeSortedSet* _tmp12_;
gint _tmp13_;
gint _tmp14_;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->master;
_tmp1_ = gee_collection_add ((GeeCollection*) _tmp0_, "one");
@@ -3708,7 +3181,7 @@ void sorted_set_tests_sub_set_test_lower (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
GeeSortedSet* _tmp16_;
gpointer _tmp17_ = NULL;
@@ -3744,7 +3217,7 @@ void sorted_set_tests_sub_set_test_lower (SortedSetTestsSubSet* self) {
_g_free0 (_tmp27_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
GeeSortedSet* _tmp28_;
gpointer _tmp29_ = NULL;
@@ -3788,7 +3261,7 @@ void sorted_set_tests_sub_set_test_lower (SortedSetTestsSubSet* self) {
_g_free0 (_tmp42_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
GeeSortedSet* _tmp43_;
gpointer _tmp44_ = NULL;
@@ -3832,7 +3305,7 @@ void sorted_set_tests_sub_set_test_lower (SortedSetTestsSubSet* self) {
_g_free0 (_tmp57_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
GeeSortedSet* _tmp58_;
gpointer _tmp59_ = NULL;
@@ -3852,7 +3325,7 @@ void sorted_set_tests_sub_set_test_lower (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_higher (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_higher (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -3868,7 +3341,7 @@ void sorted_set_tests_sub_set_test_higher (SortedSetTestsSubSet* self) {
GeeSortedSet* _tmp12_;
gint _tmp13_;
gint _tmp14_;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->master;
_tmp1_ = gee_collection_add ((GeeCollection*) _tmp0_, "one");
@@ -3894,7 +3367,7 @@ void sorted_set_tests_sub_set_test_higher (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
GeeSortedSet* _tmp16_;
gpointer _tmp17_ = NULL;
@@ -3930,7 +3403,7 @@ void sorted_set_tests_sub_set_test_higher (SortedSetTestsSubSet* self) {
_g_free0 (_tmp27_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
GeeSortedSet* _tmp28_;
gpointer _tmp29_ = NULL;
@@ -3974,7 +3447,7 @@ void sorted_set_tests_sub_set_test_higher (SortedSetTestsSubSet* self) {
_g_free0 (_tmp42_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
GeeSortedSet* _tmp43_;
gpointer _tmp44_ = NULL;
@@ -4018,7 +3491,7 @@ void sorted_set_tests_sub_set_test_higher (SortedSetTestsSubSet* self) {
_g_free0 (_tmp57_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
GeeSortedSet* _tmp58_;
gpointer _tmp59_ = NULL;
@@ -4038,7 +3511,7 @@ void sorted_set_tests_sub_set_test_higher (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_floor (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_floor (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -4054,7 +3527,7 @@ void sorted_set_tests_sub_set_test_floor (SortedSetTestsSubSet* self) {
GeeSortedSet* _tmp12_;
gint _tmp13_;
gint _tmp14_;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->master;
_tmp1_ = gee_collection_add ((GeeCollection*) _tmp0_, "one");
@@ -4080,7 +3553,7 @@ void sorted_set_tests_sub_set_test_floor (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
GeeSortedSet* _tmp16_;
gpointer _tmp17_ = NULL;
@@ -4116,7 +3589,7 @@ void sorted_set_tests_sub_set_test_floor (SortedSetTestsSubSet* self) {
_g_free0 (_tmp27_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
GeeSortedSet* _tmp28_;
gpointer _tmp29_ = NULL;
@@ -4160,7 +3633,7 @@ void sorted_set_tests_sub_set_test_floor (SortedSetTestsSubSet* self) {
_g_free0 (_tmp42_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
GeeSortedSet* _tmp43_;
gpointer _tmp44_ = NULL;
@@ -4204,7 +3677,7 @@ void sorted_set_tests_sub_set_test_floor (SortedSetTestsSubSet* self) {
_g_free0 (_tmp57_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
GeeSortedSet* _tmp58_;
gpointer _tmp59_ = NULL;
@@ -4224,7 +3697,7 @@ void sorted_set_tests_sub_set_test_floor (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_ceil (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_ceil (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -4240,7 +3713,7 @@ void sorted_set_tests_sub_set_test_ceil (SortedSetTestsSubSet* self) {
GeeSortedSet* _tmp12_;
gint _tmp13_;
gint _tmp14_;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->master;
_tmp1_ = gee_collection_add ((GeeCollection*) _tmp0_, "one");
@@ -4266,7 +3739,7 @@ void sorted_set_tests_sub_set_test_ceil (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
GeeSortedSet* _tmp16_;
gpointer _tmp17_ = NULL;
@@ -4302,7 +3775,7 @@ void sorted_set_tests_sub_set_test_ceil (SortedSetTestsSubSet* self) {
_g_free0 (_tmp27_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
GeeSortedSet* _tmp28_;
gpointer _tmp29_ = NULL;
@@ -4346,7 +3819,7 @@ void sorted_set_tests_sub_set_test_ceil (SortedSetTestsSubSet* self) {
_g_free0 (_tmp42_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
GeeSortedSet* _tmp43_;
gpointer _tmp44_ = NULL;
@@ -4390,7 +3863,7 @@ void sorted_set_tests_sub_set_test_ceil (SortedSetTestsSubSet* self) {
_g_free0 (_tmp57_);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
GeeSortedSet* _tmp58_;
gpointer _tmp59_ = NULL;
@@ -4410,7 +3883,7 @@ void sorted_set_tests_sub_set_test_ceil (SortedSetTestsSubSet* self) {
}
-void sorted_set_tests_sub_set_test_subsets (SortedSetTestsSubSet* self) {
+void sorted_set_tests_sub_set_tests_test_subsets (SortedSetTestsSubSetTests* self) {
GeeSortedSet* _tmp0_;
gboolean _tmp1_ = FALSE;
GeeSortedSet* _tmp2_;
@@ -4426,7 +3899,7 @@ void sorted_set_tests_sub_set_test_subsets (SortedSetTestsSubSet* self) {
GeeSortedSet* _tmp12_;
gint _tmp13_;
gint _tmp14_;
- SortedSetTestsSubSetType _tmp15_;
+ SortedSetTestsSubSetTestsType _tmp15_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->master;
_tmp1_ = gee_collection_add ((GeeCollection*) _tmp0_, "one");
@@ -4452,7 +3925,7 @@ void sorted_set_tests_sub_set_test_subsets (SortedSetTestsSubSet* self) {
_vala_assert (_tmp14_ == 6, "master.size == 6");
_tmp15_ = self->priv->type;
switch (_tmp15_) {
- case SORTED_SET_TESTS_SUB_SET_TYPE_HEAD:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_HEAD:
{
GeeSortedSet* _tmp16_;
GeeSortedSet* _tmp17_ = NULL;
@@ -4509,7 +3982,7 @@ void sorted_set_tests_sub_set_test_subsets (SortedSetTestsSubSet* self) {
_g_object_unref0 (subsubset);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_TAIL:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_TAIL:
{
GeeSortedSet* _tmp36_;
GeeSortedSet* _tmp37_ = NULL;
@@ -4553,7 +4026,7 @@ void sorted_set_tests_sub_set_test_subsets (SortedSetTestsSubSet* self) {
_g_object_unref0 (subsubset);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_SUB:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_SUB:
{
GeeSortedSet* _tmp51_;
GeeSortedSet* _tmp52_ = NULL;
@@ -4610,7 +4083,7 @@ void sorted_set_tests_sub_set_test_subsets (SortedSetTestsSubSet* self) {
_g_object_unref0 (subsubset);
break;
}
- case SORTED_SET_TESTS_SUB_SET_TYPE_EMPTY:
+ case SORTED_SET_TESTS_SUB_SET_TESTS_TYPE_EMPTY:
{
GeeSortedSet* _tmp71_;
GeeSortedSet* _tmp72_ = NULL;
@@ -4662,48 +4135,58 @@ void sorted_set_tests_sub_set_test_subsets (SortedSetTestsSubSet* self) {
}
-static void sorted_set_tests_sub_set_class_init (SortedSetTestsSubSetClass * klass) {
- sorted_set_tests_sub_set_parent_class = g_type_class_peek_parent (klass);
- g_type_class_add_private (klass, sizeof (SortedSetTestsSubSetPrivate));
- GEE_TEST_CASE_CLASS (klass)->set_up = sorted_set_tests_sub_set_real_set_up;
- GEE_TEST_CASE_CLASS (klass)->tear_down = sorted_set_tests_sub_set_real_tear_down;
- G_OBJECT_CLASS (klass)->finalize = sorted_set_tests_sub_set_finalize;
+static void sorted_set_tests_sub_set_tests_class_init (SortedSetTestsSubSetTestsClass * klass) {
+ sorted_set_tests_sub_set_tests_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (SortedSetTestsSubSetTestsPrivate));
+ GEE_TEST_CASE_CLASS (klass)->set_up = sorted_set_tests_sub_set_tests_real_set_up;
+ GEE_TEST_CASE_CLASS (klass)->tear_down = sorted_set_tests_sub_set_tests_real_tear_down;
+ G_OBJECT_CLASS (klass)->finalize = sorted_set_tests_sub_set_tests_finalize;
}
-static void sorted_set_tests_sub_set_instance_init (SortedSetTestsSubSet * self) {
- self->priv = SORTED_SET_TESTS_SUB_SET_GET_PRIVATE (self);
+static void sorted_set_tests_sub_set_tests_instance_init (SortedSetTestsSubSetTests * self) {
+ self->priv = SORTED_SET_TESTS_SUB_SET_TESTS_GET_PRIVATE (self);
}
-static void sorted_set_tests_sub_set_finalize (GObject* obj) {
- SortedSetTestsSubSet * self;
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, SORTED_SET_TESTS_TYPE_SUB_SET, SortedSetTestsSubSet);
+static void sorted_set_tests_sub_set_tests_finalize (GObject* obj) {
+ SortedSetTestsSubSetTests * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, SORTED_SET_TESTS_TYPE_SUB_SET_TESTS, SortedSetTestsSubSetTests);
_g_object_unref0 (self->priv->master);
_g_object_unref0 (self->priv->subset);
_g_object_unref0 (self->priv->test);
- G_OBJECT_CLASS (sorted_set_tests_sub_set_parent_class)->finalize (obj);
+ G_OBJECT_CLASS (sorted_set_tests_sub_set_tests_parent_class)->finalize (obj);
}
-GType sorted_set_tests_sub_set_get_type (void) {
- static volatile gsize sorted_set_tests_sub_set_type_id__volatile = 0;
- if (g_once_init_enter (&sorted_set_tests_sub_set_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (SortedSetTestsSubSetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sorted_set_tests_sub_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SortedSetTestsSubSet), 0, (GInstanceInitFunc) sorted_set_tests_sub_set_instance_init, NULL };
- GType sorted_set_tests_sub_set_type_id;
- sorted_set_tests_sub_set_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "SortedSetTestsSubSet", &g_define_type_info, 0);
- g_once_init_leave (&sorted_set_tests_sub_set_type_id__volatile, sorted_set_tests_sub_set_type_id);
+GType sorted_set_tests_sub_set_tests_get_type (void) {
+ static volatile gsize sorted_set_tests_sub_set_tests_type_id__volatile = 0;
+ if (g_once_init_enter (&sorted_set_tests_sub_set_tests_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (SortedSetTestsSubSetTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sorted_set_tests_sub_set_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SortedSetTestsSubSetTests), 0, (GInstanceInitFunc) sorted_set_tests_sub_set_tests_instance_init, NULL };
+ GType sorted_set_tests_sub_set_tests_type_id;
+ sorted_set_tests_sub_set_tests_type_id = g_type_register_static (GEE_TYPE_TEST_CASE, "SortedSetTestsSubSetTests", &g_define_type_info, 0);
+ g_once_init_leave (&sorted_set_tests_sub_set_tests_type_id__volatile, sorted_set_tests_sub_set_tests_type_id);
}
- return sorted_set_tests_sub_set_type_id__volatile;
+ return sorted_set_tests_sub_set_tests_type_id__volatile;
}
static void sorted_set_tests_class_init (SortedSetTestsClass * klass) {
sorted_set_tests_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_add_private (klass, sizeof (SortedSetTestsPrivate));
+ G_OBJECT_CLASS (klass)->finalize = sorted_set_tests_finalize;
}
static void sorted_set_tests_instance_init (SortedSetTests * self) {
+ self->priv = SORTED_SET_TESTS_GET_PRIVATE (self);
+}
+
+
+static void sorted_set_tests_finalize (GObject* obj) {
+ SortedSetTests * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SORTED_SET_TESTS, SortedSetTests);
+ G_OBJECT_CLASS (sorted_set_tests_parent_class)->finalize (obj);
}
diff --git a/tests/testsortedset.vala b/tests/testsortedset.vala
index a5172b4..00c9bd2 100644
--- a/tests/testsortedset.vala
+++ b/tests/testsortedset.vala
@@ -24,9 +24,9 @@ using GLib;
using Gee;
public abstract class SortedSetTests : SetTests {
-
- public SortedSetTests (string name) {
+ public SortedSetTests (string name, bool strict = true) {
base (name);
+ this.strict = strict;
add_test ("[SortedSet] first", test_first);
add_test ("[SortedSet] last", test_last);
add_test ("[SortedSet] ordering", test_ordering);
@@ -35,16 +35,10 @@ public abstract class SortedSetTests : SetTests {
add_test ("[SortedSet] higher", test_higher);
add_test ("[SortedSet] floor", test_floor);
add_test ("[SortedSet] ceil", test_ceil);
- add_test ("[SortedSet] bi-directional iterators can go backward",
- test_bidir_iterator_can_go_backward);
- add_test ("[SortedSet] bi-directional iterators are mutable",
- test_mutable_bidir_iterator);
- add_test ("[SortedSet] bi-directional iterators can to end",
- test_bidir_iterator_last);
- get_suite ().add_suite (new SubSet (this, SubSet.Type.HEAD).get_suite ());
- get_suite ().add_suite (new SubSet (this, SubSet.Type.TAIL).get_suite ());
- get_suite ().add_suite (new SubSet (this, SubSet.Type.SUB).get_suite ());
- get_suite ().add_suite (new SubSet (this, SubSet.Type.EMPTY).get_suite ());
+ get_suite ().add_suite (new SubSetTests (this, SubSetTests.Type.HEAD, strict).get_suite ());
+ get_suite ().add_suite (new SubSetTests (this, SubSetTests.Type.TAIL, strict).get_suite ());
+ get_suite ().add_suite (new SubSetTests (this, SubSetTests.Type.SUB, strict).get_suite ());
+ get_suite ().add_suite (new SubSetTests (this, SubSetTests.Type.EMPTY, strict).get_suite ());
}
public void test_ordering () {
@@ -97,12 +91,14 @@ public abstract class SortedSetTests : SetTests {
public void test_first () {
var test_set = test_collection as SortedSet<string>;
- if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
- TestTrapFlags.SILENCE_STDERR)) {
- test_set.first ();
- Posix.exit (0);
+ if (strict) {
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ test_set.first ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
}
- Test.trap_assert_failed ();
assert (test_set.add ("one"));
assert (test_set.add ("two"));
@@ -117,12 +113,14 @@ public abstract class SortedSetTests : SetTests {
public void test_last () {
var test_set = test_collection as SortedSet<string>;
- if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
- TestTrapFlags.SILENCE_STDERR)) {
- test_set.last ();
- Posix.exit (0);
+ if (strict) {
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ test_set.last ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
}
- Test.trap_assert_failed ();
assert (test_set.add ("one"));
assert (test_set.add ("two"));
@@ -253,120 +251,7 @@ public abstract class SortedSetTests : SetTests {
assert (test_set.ceil ("s") == "six");
}
- public void test_bidir_iterator_can_go_backward () {
- var test_set = test_collection as SortedSet<string>;
-
- var iterator = test_set.bidir_iterator ();
- assert (!iterator.has_previous ());
-
- assert (test_set.add ("one"));
- assert (test_set.add ("two"));
- assert (test_set.add ("three"));
- assert (test_set.add ("four"));
- assert (test_set.add ("five"));
- assert (test_set.add ("six"));
-
- iterator = test_set.bidir_iterator ();
- assert (iterator.next ());
- assert (iterator.get () == "five");
- assert (!iterator.has_previous ());
- assert (iterator.next ());
- assert (iterator.get () == "four");
- assert (iterator.has_previous ());
- assert (iterator.next ());
- assert (iterator.get () == "one");
- assert (iterator.has_previous ());
- assert (iterator.next ());
- assert (iterator.get () == "six");
- assert (iterator.has_previous ());
- assert (iterator.next ());
- assert (iterator.get () == "three");
- assert (iterator.has_previous ());
- assert (iterator.next ());
- assert (iterator.get () == "two");
- assert (iterator.has_previous ());
- assert (!iterator.next ());
- assert (iterator.previous ());
- assert (iterator.get () == "three");
- assert (iterator.previous ());
- assert (iterator.get () == "six");
- assert (iterator.previous ());
- assert (iterator.get () == "one");
- assert (iterator.previous ());
- assert (iterator.get () == "four");
- assert (iterator.previous ());
- assert (iterator.get () == "five");
- assert (!iterator.previous ());
- assert (iterator.get () == "five");
- }
-
- public void test_bidir_iterator_last () {
- var test_set = test_collection as SortedSet<string>;
-
- var iterator = test_set.bidir_iterator ();
-
- assert (!iterator.last ());
-
- assert (test_set.add ("one"));
- assert (test_set.add ("two"));
- assert (test_set.add ("three"));
- assert (test_set.add ("four"));
- assert (test_set.add ("five"));
- assert (test_set.add ("six"));
-
- iterator = test_set.bidir_iterator ();
- assert (iterator.last ());
- assert (iterator.get () == "two");
- }
-
- public void test_mutable_bidir_iterator () {
- var test_set = test_collection as SortedSet<string>;
-
- var iterator = test_set.bidir_iterator ();
- assert (!iterator.has_previous ());
-
- assert (test_set.add ("one"));
- assert (test_set.add ("two"));
- assert (test_set.add ("three"));
- assert (test_set.add ("four"));
- assert (test_set.add ("five"));
- assert (test_set.add ("six"));
-
- iterator = test_set.bidir_iterator ();
-
- if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
- TestTrapFlags.SILENCE_STDERR)) {
- iterator.remove ();
- Posix.exit (0);
- }
- Test.trap_assert_failed ();
-
- assert (iterator.next ());
- assert (iterator.get () == "five");
- iterator.remove ();
- assert (!test_set.contains ("five"));
- assert (iterator.has_next ());
- assert (!iterator.has_previous ());
- if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
- TestTrapFlags.SILENCE_STDERR)) {
- iterator.get ();
- Posix.exit (0);
- }
- assert (!iterator.previous ());
-
- assert (iterator.next ());
- assert (iterator.get () == "four");
- assert (iterator.next ());
- assert (iterator.get () == "one");
- iterator.remove ();
- assert (!test_set.contains ("one"));
- assert (iterator.has_next ());
- assert (iterator.has_previous ());
- assert (iterator.previous ());
- assert (iterator.get () == "four");
- }
-
- public class SubSet : Gee.TestCase {
+ protected class SubSetTests : Gee.TestCase {
private SortedSet<string> master;
private SortedSet<string> subset;
private SortedSetTests test;
@@ -387,10 +272,11 @@ public abstract class SortedSetTests : SetTests {
}
private Type type;
- public SubSet (SortedSetTests test, Type type) {
+ public SubSetTests (SortedSetTests test, Type type, bool strict) {
base ("%s Subset".printf (type.to_string ()));
this.test = test;
this.type = type;
+ this.strict = strict;
add_test ("[Collection] size", test_size);
add_test ("[Collection] contains", test_contains);
add_test ("[Collection] add", test_add);
@@ -621,27 +507,15 @@ public abstract class SortedSetTests : SetTests {
assert (i == contains.length);
- var iter = subset.bidir_iterator ();
+ var iter = subset.iterator ();
if (type != Type.EMPTY) {
- assert (iter.last ());
- assert (iter.get () == contains[contains.length - 1]);
- assert (iter.first ());
-
+ assert (iter.has_next ());
+ assert (iter.next ());
assert (iter.get () == contains[0]);
assert (iter.has_next ());
assert (iter.next ());
assert (iter.get () == contains[1]);
- assert (iter.has_previous ());
- iter.remove ();
- assert (iter.has_previous ());
- if (type != Type.HEAD)
- assert (iter.has_next ());
- else
- assert (!iter.has_next ());
- assert (iter.previous ());
- assert (iter.get () == contains[0]);
} else {
- assert (!iter.first ());
if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
TestTrapFlags.SILENCE_STDERR)) {
iter.remove ();
@@ -712,18 +586,20 @@ public abstract class SortedSetTests : SetTests {
assert (subset.last () == "six");
break;
case Type.EMPTY:
- if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
- TestTrapFlags.SILENCE_STDERR)) {
- subset.first ();
- Posix.exit (0);
- }
- Test.trap_assert_failed ();
- if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
- TestTrapFlags.SILENCE_STDERR)) {
- subset.last ();
- Posix.exit (0);
+ if (strict) {
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ subset.first ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
+ if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT |
+ TestTrapFlags.SILENCE_STDERR)) {
+ subset.last ();
+ Posix.exit (0);
+ }
+ Test.trap_assert_failed ();
}
- Test.trap_assert_failed ();
break;
default:
assert_not_reached ();
@@ -974,6 +850,10 @@ public abstract class SortedSetTests : SetTests {
assert_not_reached ();
}
}
+
+ private bool strict;
}
+
+ private bool strict;
}
diff --git a/tests/testtreemap.c b/tests/testtreemap.c
index 6e5b107..534d6ca 100644
--- a/tests/testtreemap.c
+++ b/tests/testtreemap.c
@@ -53,6 +53,28 @@ typedef struct _MapTests MapTests;
typedef struct _MapTestsClass MapTestsClass;
typedef struct _MapTestsPrivate MapTestsPrivate;
+#define GEE_TYPE_SORTED_MAP_TESTS (gee_sorted_map_tests_get_type ())
+#define GEE_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTests))
+#define GEE_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTestsClass))
+#define GEE_IS_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SORTED_MAP_TESTS))
+#define GEE_IS_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_SORTED_MAP_TESTS))
+#define GEE_SORTED_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_SORTED_MAP_TESTS, GeeSortedMapTestsClass))
+
+typedef struct _GeeSortedMapTests GeeSortedMapTests;
+typedef struct _GeeSortedMapTestsClass GeeSortedMapTestsClass;
+typedef struct _GeeSortedMapTestsPrivate GeeSortedMapTestsPrivate;
+
+#define TYPE_BIDIR_SORTED_MAP_TESTS (bidir_sorted_map_tests_get_type ())
+#define BIDIR_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTests))
+#define BIDIR_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTestsClass))
+#define IS_BIDIR_SORTED_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_SORTED_MAP_TESTS))
+#define IS_BIDIR_SORTED_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_SORTED_MAP_TESTS))
+#define BIDIR_SORTED_MAP_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_SORTED_MAP_TESTS, BidirSortedMapTestsClass))
+
+typedef struct _BidirSortedMapTests BidirSortedMapTests;
+typedef struct _BidirSortedMapTestsClass BidirSortedMapTestsClass;
+typedef struct _BidirSortedMapTestsPrivate BidirSortedMapTestsPrivate;
+
#define TYPE_TREE_MAP_TESTS (tree_map_tests_get_type ())
#define TREE_MAP_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TREE_MAP_TESTS, TreeMapTests))
#define TREE_MAP_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TREE_MAP_TESTS, TreeMapTestsClass))
@@ -64,8 +86,6 @@ typedef struct _TreeMapTests TreeMapTests;
typedef struct _TreeMapTestsClass TreeMapTestsClass;
typedef struct _TreeMapTestsPrivate TreeMapTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define _g_free0(var) (var = (g_free (var), NULL))
-#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _GeeTestCase {
GObject parent_instance;
@@ -88,60 +108,54 @@ struct _MapTestsClass {
GeeTestCaseClass parent_class;
};
-struct _TreeMapTests {
+struct _GeeSortedMapTests {
MapTests parent_instance;
+ GeeSortedMapTestsPrivate * priv;
+};
+
+struct _GeeSortedMapTestsClass {
+ MapTestsClass parent_class;
+};
+
+struct _BidirSortedMapTests {
+ GeeSortedMapTests parent_instance;
+ BidirSortedMapTestsPrivate * priv;
+};
+
+struct _BidirSortedMapTestsClass {
+ GeeSortedMapTestsClass parent_class;
+};
+
+struct _TreeMapTests {
+ BidirSortedMapTests parent_instance;
TreeMapTestsPrivate * priv;
};
struct _TreeMapTestsClass {
- MapTestsClass parent_class;
+ BidirSortedMapTestsClass parent_class;
};
-typedef void (*GeeTestCaseTestMethod) (void* user_data);
static gpointer tree_map_tests_parent_class = NULL;
GType gee_test_case_get_type (void) G_GNUC_CONST;
GType map_tests_get_type (void) G_GNUC_CONST;
+GType gee_sorted_map_tests_get_type (void) G_GNUC_CONST;
+GType bidir_sorted_map_tests_get_type (void) G_GNUC_CONST;
GType tree_map_tests_get_type (void) G_GNUC_CONST;
enum {
TREE_MAP_TESTS_DUMMY_PROPERTY
};
TreeMapTests* tree_map_tests_new (void);
TreeMapTests* tree_map_tests_construct (GType object_type);
-MapTests* map_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-void tree_map_tests_test_selected_functions (TreeMapTests* self);
-static void _tree_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
-void tree_map_tests_test_gobject_properties (TreeMapTests* self);
-static void _tree_map_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
-void tree_map_tests_test_key_ordering (TreeMapTests* self);
-static void _tree_map_tests_test_key_ordering_gee_test_case_test_method (gpointer self);
+BidirSortedMapTests* bidir_sorted_map_tests_construct (GType object_type, const gchar* name);
static void tree_map_tests_real_set_up (GeeTestCase* base);
static void tree_map_tests_real_tear_down (GeeTestCase* base);
-static void _tree_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- tree_map_tests_test_selected_functions (self);
-}
-
-
-static void _tree_map_tests_test_gobject_properties_gee_test_case_test_method (gpointer self) {
- tree_map_tests_test_gobject_properties (self);
-}
-
-
-static void _tree_map_tests_test_key_ordering_gee_test_case_test_method (gpointer self) {
- tree_map_tests_test_key_ordering (self);
-}
-
-
TreeMapTests* tree_map_tests_construct (GType object_type) {
TreeMapTests * self = NULL;
- self = (TreeMapTests*) map_tests_construct (object_type, "TreeMap");
- gee_test_case_add_test ((GeeTestCase*) self, "[TreeMap] selected functions", _tree_map_tests_test_selected_functions_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[TreeMap] GObject properties", _tree_map_tests_test_gobject_properties_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[TreeMap] key ordering", _tree_map_tests_test_key_ordering_gee_test_case_test_method, self);
+ self = (TreeMapTests*) bidir_sorted_map_tests_construct (object_type, "TreeMap");
return self;
}
@@ -155,7 +169,7 @@ static void tree_map_tests_real_set_up (GeeTestCase* base) {
TreeMapTests * self;
GeeTreeMap* _tmp0_;
self = (TreeMapTests*) base;
- _tmp0_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ _tmp0_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
_g_object_unref0 (((MapTests*) self)->test_map);
((MapTests*) self)->test_map = (GeeMap*) _tmp0_;
}
@@ -169,233 +183,6 @@ static void tree_map_tests_real_tear_down (GeeTestCase* base) {
}
-static gpointer _g_object_ref0 (gpointer self) {
- return self ? g_object_ref (self) : NULL;
-}
-
-
-void tree_map_tests_test_selected_functions (TreeMapTests* self) {
- GeeMap* _tmp0_;
- GeeTreeMap* _tmp1_;
- GeeTreeMap* test_tree_map;
- GCompareFunc _tmp2_;
- GCompareFunc _tmp3_;
- GCompareFunc _tmp4_;
- GEqualFunc _tmp5_;
- GEqualFunc _tmp6_;
- GEqualFunc _tmp7_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((MapTests*) self)->test_map;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_TREE_MAP) ? ((GeeTreeMap*) _tmp0_) : NULL);
- test_tree_map = _tmp1_;
- _vala_assert (test_tree_map != NULL, "test_tree_map != null");
- _tmp2_ = gee_tree_map_get_key_compare_func (test_tree_map);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_strcmp0;
- _vala_assert (_tmp3_ == ((GCompareFunc) _tmp4_), "test_tree_map.key_compare_func == (CompareFunc) strcmp");
- _tmp5_ = gee_tree_map_get_value_equal_func (test_tree_map);
- _tmp6_ = _tmp5_;
- _tmp7_ = g_str_equal;
- _vala_assert (_tmp6_ == _tmp7_, "test_tree_map.value_equal_func == str_equal");
- _g_object_unref0 (test_tree_map);
-}
-
-
-void tree_map_tests_test_gobject_properties (TreeMapTests* self) {
- GeeMap* _tmp0_;
- GeeTreeMap* _tmp1_;
- GeeTreeMap* test_tree_map;
- GValue value = {0};
- GValue _tmp2_ = {0};
- GValue _tmp3_;
- void* _tmp4_ = NULL;
- GCompareFunc _tmp5_;
- GCompareFunc _tmp6_;
- GValue _tmp7_ = {0};
- GValue _tmp8_;
- void* _tmp9_ = NULL;
- GEqualFunc _tmp10_;
- GEqualFunc _tmp11_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((MapTests*) self)->test_map;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_TREE_MAP) ? ((GeeTreeMap*) _tmp0_) : NULL);
- test_tree_map = _tmp1_;
- _vala_assert (test_tree_map != NULL, "test_tree_map != null");
- g_value_init (&_tmp2_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp2_;
- _tmp3_ = value;
- g_object_get_property ((GObject*) test_tree_map, "key-compare-func", &value);
- _tmp4_ = g_value_get_pointer (&value);
- _tmp5_ = gee_tree_map_get_key_compare_func (test_tree_map);
- _tmp6_ = _tmp5_;
- _vala_assert (_tmp4_ == ((void*) _tmp6_), "value.get_pointer () == (void*) test_tree_map.key_compare_func");
- g_value_unset (&value);
- g_value_init (&_tmp7_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp7_;
- _tmp8_ = value;
- g_object_get_property ((GObject*) test_tree_map, "value-equal-func", &value);
- _tmp9_ = g_value_get_pointer (&value);
- _tmp10_ = gee_tree_map_get_value_equal_func (test_tree_map);
- _tmp11_ = _tmp10_;
- _vala_assert (_tmp9_ == ((void*) _tmp11_), "value.get_pointer () == (void*) test_tree_map.value_equal_func");
- g_value_unset (&value);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- _g_object_unref0 (test_tree_map);
-}
-
-
-void tree_map_tests_test_key_ordering (TreeMapTests* self) {
- GeeMap* _tmp0_;
- GeeTreeMap* _tmp1_;
- GeeTreeMap* test_tree_map;
- GeeSet* _tmp2_;
- GeeSet* _tmp3_;
- GeeSet* _tmp4_;
- GeeIterator* _tmp5_ = NULL;
- GeeIterator* _tmp6_;
- GeeIterator* iterator;
- gboolean _tmp7_ = FALSE;
- gpointer _tmp8_ = NULL;
- gchar* _tmp9_;
- gboolean _tmp10_ = FALSE;
- gpointer _tmp11_ = NULL;
- gchar* _tmp12_;
- gboolean _tmp13_ = FALSE;
- gpointer _tmp14_ = NULL;
- gchar* _tmp15_;
- gboolean _tmp16_ = FALSE;
- gpointer _tmp17_ = NULL;
- gchar* _tmp18_;
- gboolean _tmp19_ = FALSE;
- gpointer _tmp20_ = NULL;
- gchar* _tmp21_;
- gboolean _tmp22_ = FALSE;
- gpointer _tmp23_ = NULL;
- gchar* _tmp24_;
- gboolean _tmp25_ = FALSE;
- gpointer _tmp26_ = NULL;
- gchar* _tmp27_;
- gboolean _tmp28_ = FALSE;
- gpointer _tmp29_ = NULL;
- gchar* _tmp30_;
- gboolean _tmp31_ = FALSE;
- gpointer _tmp32_ = NULL;
- gchar* _tmp33_;
- gboolean _tmp34_ = FALSE;
- gpointer _tmp35_ = NULL;
- gchar* _tmp36_;
- gboolean _tmp37_ = FALSE;
- gpointer _tmp38_ = NULL;
- gchar* _tmp39_;
- gboolean _tmp40_ = FALSE;
- gpointer _tmp41_ = NULL;
- gchar* _tmp42_;
- gboolean _tmp43_ = FALSE;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((MapTests*) self)->test_map;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_TREE_MAP) ? ((GeeTreeMap*) _tmp0_) : NULL);
- test_tree_map = _tmp1_;
- _vala_assert (test_tree_map != NULL, "test_tree_map != null");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "one", "one");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "two", "two");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "three", "three");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "four", "four");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "five", "five");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "six", "six");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "seven", "seven");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "eight", "eight");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "nine", "nine");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "ten", "ten");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "eleven", "eleven");
- gee_abstract_map_set ((GeeAbstractMap*) test_tree_map, "twelve", "twelve");
- _tmp2_ = gee_abstract_map_get_keys ((GeeMap*) test_tree_map);
- _tmp3_ = _tmp2_;
- _tmp4_ = _tmp3_;
- _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
- _tmp6_ = _tmp5_;
- _g_object_unref0 (_tmp4_);
- iterator = _tmp6_;
- _tmp7_ = gee_iterator_next (iterator);
- _vala_assert (_tmp7_, "iterator.next ()");
- _tmp8_ = gee_iterator_get (iterator);
- _tmp9_ = (gchar*) _tmp8_;
- _vala_assert (g_strcmp0 (_tmp9_, "eight") == 0, "iterator.get () == \"eight\"");
- _g_free0 (_tmp9_);
- _tmp10_ = gee_iterator_next (iterator);
- _vala_assert (_tmp10_, "iterator.next ()");
- _tmp11_ = gee_iterator_get (iterator);
- _tmp12_ = (gchar*) _tmp11_;
- _vala_assert (g_strcmp0 (_tmp12_, "eleven") == 0, "iterator.get () == \"eleven\"");
- _g_free0 (_tmp12_);
- _tmp13_ = gee_iterator_next (iterator);
- _vala_assert (_tmp13_, "iterator.next ()");
- _tmp14_ = gee_iterator_get (iterator);
- _tmp15_ = (gchar*) _tmp14_;
- _vala_assert (g_strcmp0 (_tmp15_, "five") == 0, "iterator.get () == \"five\"");
- _g_free0 (_tmp15_);
- _tmp16_ = gee_iterator_next (iterator);
- _vala_assert (_tmp16_, "iterator.next ()");
- _tmp17_ = gee_iterator_get (iterator);
- _tmp18_ = (gchar*) _tmp17_;
- _vala_assert (g_strcmp0 (_tmp18_, "four") == 0, "iterator.get () == \"four\"");
- _g_free0 (_tmp18_);
- _tmp19_ = gee_iterator_next (iterator);
- _vala_assert (_tmp19_, "iterator.next ()");
- _tmp20_ = gee_iterator_get (iterator);
- _tmp21_ = (gchar*) _tmp20_;
- _vala_assert (g_strcmp0 (_tmp21_, "nine") == 0, "iterator.get () == \"nine\"");
- _g_free0 (_tmp21_);
- _tmp22_ = gee_iterator_next (iterator);
- _vala_assert (_tmp22_, "iterator.next ()");
- _tmp23_ = gee_iterator_get (iterator);
- _tmp24_ = (gchar*) _tmp23_;
- _vala_assert (g_strcmp0 (_tmp24_, "one") == 0, "iterator.get () == \"one\"");
- _g_free0 (_tmp24_);
- _tmp25_ = gee_iterator_next (iterator);
- _vala_assert (_tmp25_, "iterator.next ()");
- _tmp26_ = gee_iterator_get (iterator);
- _tmp27_ = (gchar*) _tmp26_;
- _vala_assert (g_strcmp0 (_tmp27_, "seven") == 0, "iterator.get () == \"seven\"");
- _g_free0 (_tmp27_);
- _tmp28_ = gee_iterator_next (iterator);
- _vala_assert (_tmp28_, "iterator.next ()");
- _tmp29_ = gee_iterator_get (iterator);
- _tmp30_ = (gchar*) _tmp29_;
- _vala_assert (g_strcmp0 (_tmp30_, "six") == 0, "iterator.get () == \"six\"");
- _g_free0 (_tmp30_);
- _tmp31_ = gee_iterator_next (iterator);
- _vala_assert (_tmp31_, "iterator.next ()");
- _tmp32_ = gee_iterator_get (iterator);
- _tmp33_ = (gchar*) _tmp32_;
- _vala_assert (g_strcmp0 (_tmp33_, "ten") == 0, "iterator.get () == \"ten\"");
- _g_free0 (_tmp33_);
- _tmp34_ = gee_iterator_next (iterator);
- _vala_assert (_tmp34_, "iterator.next ()");
- _tmp35_ = gee_iterator_get (iterator);
- _tmp36_ = (gchar*) _tmp35_;
- _vala_assert (g_strcmp0 (_tmp36_, "three") == 0, "iterator.get () == \"three\"");
- _g_free0 (_tmp36_);
- _tmp37_ = gee_iterator_next (iterator);
- _vala_assert (_tmp37_, "iterator.next ()");
- _tmp38_ = gee_iterator_get (iterator);
- _tmp39_ = (gchar*) _tmp38_;
- _vala_assert (g_strcmp0 (_tmp39_, "twelve") == 0, "iterator.get () == \"twelve\"");
- _g_free0 (_tmp39_);
- _tmp40_ = gee_iterator_next (iterator);
- _vala_assert (_tmp40_, "iterator.next ()");
- _tmp41_ = gee_iterator_get (iterator);
- _tmp42_ = (gchar*) _tmp41_;
- _vala_assert (g_strcmp0 (_tmp42_, "two") == 0, "iterator.get () == \"two\"");
- _g_free0 (_tmp42_);
- _tmp43_ = gee_iterator_next (iterator);
- _vala_assert (_tmp43_ == FALSE, "iterator.next () == false");
- _g_object_unref0 (iterator);
- _g_object_unref0 (test_tree_map);
-}
-
-
static void tree_map_tests_class_init (TreeMapTestsClass * klass) {
tree_map_tests_parent_class = g_type_class_peek_parent (klass);
GEE_TEST_CASE_CLASS (klass)->set_up = tree_map_tests_real_set_up;
@@ -412,7 +199,7 @@ GType tree_map_tests_get_type (void) {
if (g_once_init_enter (&tree_map_tests_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (TreeMapTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tree_map_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TreeMapTests), 0, (GInstanceInitFunc) tree_map_tests_instance_init, NULL };
GType tree_map_tests_type_id;
- tree_map_tests_type_id = g_type_register_static (TYPE_MAP_TESTS, "TreeMapTests", &g_define_type_info, 0);
+ tree_map_tests_type_id = g_type_register_static (TYPE_BIDIR_SORTED_MAP_TESTS, "TreeMapTests", &g_define_type_info, 0);
g_once_init_leave (&tree_map_tests_type_id__volatile, tree_map_tests_type_id);
}
return tree_map_tests_type_id__volatile;
diff --git a/tests/testtreemap.vala b/tests/testtreemap.vala
index 993c67e..6babece 100644
--- a/tests/testtreemap.vala
+++ b/tests/testtreemap.vala
@@ -23,13 +23,10 @@
using Gee;
-public class TreeMapTests : MapTests {
+public class TreeMapTests : BidirSortedMapTests {
public TreeMapTests () {
base ("TreeMap");
- add_test ("[TreeMap] selected functions", test_selected_functions);
- add_test ("[TreeMap] GObject properties", test_gobject_properties);
- add_test ("[TreeMap] key ordering", test_key_ordering);
}
public override void set_up () {
@@ -39,80 +36,4 @@ public class TreeMapTests : MapTests {
public override void tear_down () {
test_map = null;
}
-
- public void test_selected_functions () {
- var test_tree_map = test_map as TreeMap<string,string>;
-
- // Check the map exists
- assert (test_tree_map != null);
-
- // Check the selected compare and equal functions
- assert (test_tree_map.key_compare_func == (CompareFunc) strcmp);
- assert (test_tree_map.value_equal_func == str_equal);
- }
-
- public new void test_gobject_properties () {
- var test_tree_map = test_map as TreeMap<string,string>;
-
- // Check the list exists
- assert (test_tree_map != null);
- Value value;
-
- value = Value (typeof (CompareFunc));
- test_tree_map.get_property ("key-compare-func", ref value);
- assert (value.get_pointer () == (void*) test_tree_map.key_compare_func);
- value.unset ();
-
- value = Value (typeof (EqualFunc));
- test_tree_map.get_property ("value-equal-func", ref value);
- assert (value.get_pointer () == (void*) test_tree_map.value_equal_func);
- value.unset ();
- }
-
- public void test_key_ordering () {
- var test_tree_map = test_map as TreeMap<string,string>;
-
- // Check the map exists
- assert (test_tree_map != null);
-
- test_tree_map.set ("one", "one");
- test_tree_map.set ("two", "two");
- test_tree_map.set ("three", "three");
- test_tree_map.set ("four", "four");
- test_tree_map.set ("five", "five");
- test_tree_map.set ("six", "six");
- test_tree_map.set ("seven", "seven");
- test_tree_map.set ("eight", "eight");
- test_tree_map.set ("nine", "nine");
- test_tree_map.set ("ten", "ten");
- test_tree_map.set ("eleven", "eleven");
- test_tree_map.set ("twelve", "twelve");
-
- Iterator<string> iterator = test_tree_map.keys.iterator ();
- assert (iterator.next ());
- assert (iterator.get () == "eight");
- assert (iterator.next ());
- assert (iterator.get () == "eleven");
- assert (iterator.next ());
- assert (iterator.get () == "five");
- assert (iterator.next ());
- assert (iterator.get () == "four");
- assert (iterator.next ());
- assert (iterator.get () == "nine");
- assert (iterator.next ());
- assert (iterator.get () == "one");
- assert (iterator.next ());
- assert (iterator.get () == "seven");
- assert (iterator.next ());
- assert (iterator.get () == "six");
- assert (iterator.next ());
- assert (iterator.get () == "ten");
- assert (iterator.next ());
- assert (iterator.get () == "three");
- assert (iterator.next ());
- assert (iterator.get () == "twelve");
- assert (iterator.next ());
- assert (iterator.get () == "two");
- assert (iterator.next () == false);
- }
}
diff --git a/tests/testtreemultimap.c b/tests/testtreemultimap.c
index 6959a1a..d283b18 100644
--- a/tests/testtreemultimap.c
+++ b/tests/testtreemultimap.c
@@ -66,7 +66,6 @@ typedef struct _TreeMultiMapTests TreeMultiMapTests;
typedef struct _TreeMultiMapTestsClass TreeMultiMapTestsClass;
typedef struct _TreeMultiMapTestsPrivate TreeMultiMapTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _GeeTestCase {
GObject parent_instance;
@@ -98,7 +97,6 @@ struct _TreeMultiMapTestsClass {
MultiMapTestsClass parent_class;
};
-typedef void (*GeeTestCaseTestMethod) (void* user_data);
static gpointer tree_multi_map_tests_parent_class = NULL;
@@ -111,22 +109,13 @@ enum {
TreeMultiMapTests* tree_multi_map_tests_new (void);
TreeMultiMapTests* tree_multi_map_tests_construct (GType object_type);
MultiMapTests* multi_map_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-static void tree_multi_map_tests_test_selected_functions (TreeMultiMapTests* self);
-static void _tree_multi_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
static void tree_multi_map_tests_real_set_up (GeeTestCase* base);
static void tree_multi_map_tests_real_tear_down (GeeTestCase* base);
-static void _tree_multi_map_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- tree_multi_map_tests_test_selected_functions (self);
-}
-
-
TreeMultiMapTests* tree_multi_map_tests_construct (GType object_type) {
TreeMultiMapTests * self = NULL;
self = (TreeMultiMapTests*) multi_map_tests_construct (object_type, "TreeMultiMap");
- gee_test_case_add_test ((GeeTestCase*) self, "[TreeMultiMap] selected functions", _tree_multi_map_tests_test_selected_functions_gee_test_case_test_method, self);
return self;
}
@@ -140,7 +129,7 @@ static void tree_multi_map_tests_real_set_up (GeeTestCase* base) {
TreeMultiMapTests * self;
GeeTreeMultiMap* _tmp0_;
self = (TreeMultiMapTests*) base;
- _tmp0_ = gee_tree_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL);
+ _tmp0_ = gee_tree_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
_g_object_unref0 (((MultiMapTests*) self)->test_multi_map);
((MultiMapTests*) self)->test_multi_map = (GeeMultiMap*) _tmp0_;
}
@@ -154,38 +143,6 @@ static void tree_multi_map_tests_real_tear_down (GeeTestCase* base) {
}
-static gpointer _g_object_ref0 (gpointer self) {
- return self ? g_object_ref (self) : NULL;
-}
-
-
-static void tree_multi_map_tests_test_selected_functions (TreeMultiMapTests* self) {
- GeeMultiMap* _tmp0_;
- GeeTreeMultiMap* _tmp1_;
- GeeTreeMultiMap* test_tree_multi_map;
- GCompareFunc _tmp2_;
- GCompareFunc _tmp3_;
- GCompareFunc _tmp4_;
- GCompareFunc _tmp5_;
- GCompareFunc _tmp6_;
- GCompareFunc _tmp7_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((MultiMapTests*) self)->test_multi_map;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_TREE_MULTI_MAP) ? ((GeeTreeMultiMap*) _tmp0_) : NULL);
- test_tree_multi_map = _tmp1_;
- _vala_assert (test_tree_multi_map != NULL, "test_tree_multi_map != null");
- _tmp2_ = gee_tree_multi_map_get_key_compare_func (test_tree_multi_map);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_strcmp0;
- _vala_assert (_tmp3_ == ((GCompareFunc) _tmp4_), "test_tree_multi_map.key_compare_func == (CompareFunc) strcmp");
- _tmp5_ = gee_tree_multi_map_get_value_compare_func (test_tree_multi_map);
- _tmp6_ = _tmp5_;
- _tmp7_ = g_strcmp0;
- _vala_assert (_tmp6_ == ((GCompareFunc) _tmp7_), "test_tree_multi_map.value_compare_func == (CompareFunc) strcmp");
- _g_object_unref0 (test_tree_multi_map);
-}
-
-
static void tree_multi_map_tests_class_init (TreeMultiMapTestsClass * klass) {
tree_multi_map_tests_parent_class = g_type_class_peek_parent (klass);
GEE_TEST_CASE_CLASS (klass)->set_up = tree_multi_map_tests_real_set_up;
diff --git a/tests/testtreemultimap.vala b/tests/testtreemultimap.vala
index 34374a9..773eef9 100644
--- a/tests/testtreemultimap.vala
+++ b/tests/testtreemultimap.vala
@@ -29,7 +29,6 @@ public class TreeMultiMapTests : MultiMapTests {
public TreeMultiMapTests () {
base ("TreeMultiMap");
- add_test ("[TreeMultiMap] selected functions", test_selected_functions);
}
public override void set_up () {
@@ -39,15 +38,4 @@ public class TreeMultiMapTests : MultiMapTests {
public override void tear_down () {
test_multi_map = null;
}
-
- private void test_selected_functions () {
- var test_tree_multi_map = test_multi_map as TreeMultiMap<string,string>;
-
- // Check the map exists
- assert (test_tree_multi_map != null);
-
- // Check the selected compare functions
- assert (test_tree_multi_map.key_compare_func == (CompareFunc) strcmp);
- assert (test_tree_multi_map.value_compare_func == (CompareFunc) strcmp);
- }
}
diff --git a/tests/testtreemultiset.c b/tests/testtreemultiset.c
index 212111f..333ca84 100644
--- a/tests/testtreemultiset.c
+++ b/tests/testtreemultiset.c
@@ -74,7 +74,6 @@ typedef struct _TreeMultiSetTests TreeMultiSetTests;
typedef struct _TreeMultiSetTestsClass TreeMultiSetTestsClass;
typedef struct _TreeMultiSetTestsPrivate TreeMultiSetTestsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _GeeTestCase {
GObject parent_instance;
@@ -115,7 +114,6 @@ struct _TreeMultiSetTestsClass {
MultiSetTestsClass parent_class;
};
-typedef void (*GeeTestCaseTestMethod) (void* user_data);
static gpointer tree_multi_set_tests_parent_class = NULL;
@@ -129,22 +127,13 @@ enum {
TreeMultiSetTests* tree_multi_set_tests_new (void);
TreeMultiSetTests* tree_multi_set_tests_construct (GType object_type);
MultiSetTests* multi_set_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-static void tree_multi_set_tests_test_selected_functions (TreeMultiSetTests* self);
-static void _tree_multi_set_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
static void tree_multi_set_tests_real_set_up (GeeTestCase* base);
static void tree_multi_set_tests_real_tear_down (GeeTestCase* base);
-static void _tree_multi_set_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- tree_multi_set_tests_test_selected_functions (self);
-}
-
-
TreeMultiSetTests* tree_multi_set_tests_construct (GType object_type) {
TreeMultiSetTests * self = NULL;
self = (TreeMultiSetTests*) multi_set_tests_construct (object_type, "TreeMultiSet");
- gee_test_case_add_test ((GeeTestCase*) self, "[TreeMultiSet] selected functions", _tree_multi_set_tests_test_selected_functions_gee_test_case_test_method, self);
return self;
}
@@ -158,7 +147,7 @@ static void tree_multi_set_tests_real_set_up (GeeTestCase* base) {
TreeMultiSetTests * self;
GeeTreeMultiSet* _tmp0_;
self = (TreeMultiSetTests*) base;
- _tmp0_ = gee_tree_multi_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp0_ = gee_tree_multi_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
_g_object_unref0 (((CollectionTests*) self)->test_collection);
((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}
@@ -172,31 +161,6 @@ static void tree_multi_set_tests_real_tear_down (GeeTestCase* base) {
}
-static gpointer _g_object_ref0 (gpointer self) {
- return self ? g_object_ref (self) : NULL;
-}
-
-
-static void tree_multi_set_tests_test_selected_functions (TreeMultiSetTests* self) {
- GeeCollection* _tmp0_;
- GeeTreeMultiSet* _tmp1_;
- GeeTreeMultiSet* test_multi_set;
- GCompareFunc _tmp2_;
- GCompareFunc _tmp3_;
- GCompareFunc _tmp4_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_TREE_MULTI_SET) ? ((GeeTreeMultiSet*) _tmp0_) : NULL);
- test_multi_set = _tmp1_;
- _vala_assert (test_multi_set != NULL, "test_multi_set != null");
- _tmp2_ = gee_tree_multi_set_get_compare_func (test_multi_set);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_strcmp0;
- _vala_assert (_tmp3_ == ((GCompareFunc) _tmp4_), "test_multi_set.compare_func == (CompareFunc) strcmp");
- _g_object_unref0 (test_multi_set);
-}
-
-
static void tree_multi_set_tests_class_init (TreeMultiSetTestsClass * klass) {
tree_multi_set_tests_parent_class = g_type_class_peek_parent (klass);
GEE_TEST_CASE_CLASS (klass)->set_up = tree_multi_set_tests_real_set_up;
diff --git a/tests/testtreemultiset.vala b/tests/testtreemultiset.vala
index da86ca2..711c110 100644
--- a/tests/testtreemultiset.vala
+++ b/tests/testtreemultiset.vala
@@ -26,7 +26,6 @@ public class TreeMultiSetTests : MultiSetTests {
public TreeMultiSetTests () {
base ("TreeMultiSet");
- add_test ("[TreeMultiSet] selected functions", test_selected_functions);
}
public override void set_up () {
@@ -36,14 +35,4 @@ public class TreeMultiSetTests : MultiSetTests {
public override void tear_down () {
test_collection = null;
}
-
- private void test_selected_functions () {
- var test_multi_set = test_collection as TreeMultiSet<string>;
-
- // Check the collection exists
- assert (test_multi_set != null);
-
- // Check the selected compare functions
- assert (test_multi_set.compare_func == (CompareFunc) strcmp);
- }
}
diff --git a/tests/testtreeset.c b/tests/testtreeset.c
index 81d757b..b9f9e90 100644
--- a/tests/testtreeset.c
+++ b/tests/testtreeset.c
@@ -75,6 +75,17 @@ typedef struct _SortedSetTests SortedSetTests;
typedef struct _SortedSetTestsClass SortedSetTestsClass;
typedef struct _SortedSetTestsPrivate SortedSetTestsPrivate;
+#define TYPE_BIDIR_SORTED_SET_TESTS (bidir_sorted_set_tests_get_type ())
+#define BIDIR_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTests))
+#define BIDIR_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTestsClass))
+#define IS_BIDIR_SORTED_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BIDIR_SORTED_SET_TESTS))
+#define IS_BIDIR_SORTED_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BIDIR_SORTED_SET_TESTS))
+#define BIDIR_SORTED_SET_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTestsClass))
+
+typedef struct _BidirSortedSetTests BidirSortedSetTests;
+typedef struct _BidirSortedSetTestsClass BidirSortedSetTestsClass;
+typedef struct _BidirSortedSetTestsPrivate BidirSortedSetTestsPrivate;
+
#define TYPE_TREE_SET_TESTS (tree_set_tests_get_type ())
#define TREE_SET_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TREE_SET_TESTS, TreeSetTests))
#define TREE_SET_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TREE_SET_TESTS, TreeSetTestsClass))
@@ -129,13 +140,22 @@ struct _SortedSetTestsClass {
SetTestsClass parent_class;
};
-struct _TreeSetTests {
+struct _BidirSortedSetTests {
SortedSetTests parent_instance;
+ BidirSortedSetTestsPrivate * priv;
+};
+
+struct _BidirSortedSetTestsClass {
+ SortedSetTestsClass parent_class;
+};
+
+struct _TreeSetTests {
+ BidirSortedSetTests parent_instance;
TreeSetTestsPrivate * priv;
};
struct _TreeSetTestsClass {
- SortedSetTestsClass parent_class;
+ BidirSortedSetTestsClass parent_class;
};
typedef void (*GeeTestCaseTestMethod) (void* user_data);
@@ -146,18 +166,15 @@ GType gee_test_case_get_type (void) G_GNUC_CONST;
GType collection_tests_get_type (void) G_GNUC_CONST;
GType set_tests_get_type (void) G_GNUC_CONST;
GType sorted_set_tests_get_type (void) G_GNUC_CONST;
+GType bidir_sorted_set_tests_get_type (void) G_GNUC_CONST;
GType tree_set_tests_get_type (void) G_GNUC_CONST;
enum {
TREE_SET_TESTS_DUMMY_PROPERTY
};
TreeSetTests* tree_set_tests_new (void);
TreeSetTests* tree_set_tests_construct (GType object_type);
-SortedSetTests* sorted_set_tests_construct (GType object_type, const gchar* name);
-void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target);
-void tree_set_tests_test_selected_functions (TreeSetTests* self);
-static void _tree_set_tests_test_selected_functions_gee_test_case_test_method (gpointer self);
-void tree_set_tests_test_gobject_properties (TreeSetTests* self);
-static void _tree_set_tests_test_gobject_properties_gee_test_case_test_method (gpointer self);
+BidirSortedSetTests* bidir_sorted_set_tests_construct (GType object_type, const gchar* name);
+void gee_test_case_add_test (GeeTestCase* self, const gchar* name, GeeTestCaseTestMethod test, void* test_target, GDestroyNotify test_target_destroy_notify);
void tree_set_tests_test_add_remove (TreeSetTests* self);
static void _tree_set_tests_test_add_remove_gee_test_case_test_method (gpointer self);
static void tree_set_tests_real_set_up (GeeTestCase* base);
@@ -167,16 +184,6 @@ static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNoti
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
-static void _tree_set_tests_test_selected_functions_gee_test_case_test_method (gpointer self) {
- tree_set_tests_test_selected_functions (self);
-}
-
-
-static void _tree_set_tests_test_gobject_properties_gee_test_case_test_method (gpointer self) {
- tree_set_tests_test_gobject_properties (self);
-}
-
-
static void _tree_set_tests_test_add_remove_gee_test_case_test_method (gpointer self) {
tree_set_tests_test_add_remove (self);
}
@@ -184,10 +191,8 @@ static void _tree_set_tests_test_add_remove_gee_test_case_test_method (gpointer
TreeSetTests* tree_set_tests_construct (GType object_type) {
TreeSetTests * self = NULL;
- self = (TreeSetTests*) sorted_set_tests_construct (object_type, "TreeSet");
- gee_test_case_add_test ((GeeTestCase*) self, "[TreeSet] selected functions", _tree_set_tests_test_selected_functions_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[TreeSet] GObject properties", _tree_set_tests_test_gobject_properties_gee_test_case_test_method, self);
- gee_test_case_add_test ((GeeTestCase*) self, "[TreeSet] add and remove", _tree_set_tests_test_add_remove_gee_test_case_test_method, self);
+ self = (TreeSetTests*) bidir_sorted_set_tests_construct (object_type, "TreeSet");
+ gee_test_case_add_test ((GeeTestCase*) self, "[TreeSet] add and remove", _tree_set_tests_test_add_remove_gee_test_case_test_method, g_object_ref (self), g_object_unref);
return self;
}
@@ -201,7 +206,7 @@ static void tree_set_tests_real_set_up (GeeTestCase* base) {
TreeSetTests * self;
GeeTreeSet* _tmp0_;
self = (TreeSetTests*) base;
- _tmp0_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
+ _tmp0_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
_g_object_unref0 (((CollectionTests*) self)->test_collection);
((CollectionTests*) self)->test_collection = (GeeCollection*) _tmp0_;
}
@@ -220,56 +225,6 @@ static gpointer _g_object_ref0 (gpointer self) {
}
-void tree_set_tests_test_selected_functions (TreeSetTests* self) {
- GeeCollection* _tmp0_;
- GeeTreeSet* _tmp1_;
- GeeTreeSet* test_set;
- GCompareFunc _tmp2_;
- GCompareFunc _tmp3_;
- GCompareFunc _tmp4_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_TREE_SET) ? ((GeeTreeSet*) _tmp0_) : NULL);
- test_set = _tmp1_;
- _vala_assert (test_set != NULL, "test_set != null");
- _tmp2_ = gee_tree_set_get_compare_func (test_set);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_strcmp0;
- _vala_assert (_tmp3_ == ((GCompareFunc) _tmp4_), "test_set.compare_func == (CompareFunc) strcmp");
- _g_object_unref0 (test_set);
-}
-
-
-void tree_set_tests_test_gobject_properties (TreeSetTests* self) {
- GeeCollection* _tmp0_;
- GeeTreeSet* _tmp1_;
- GeeTreeSet* test_set;
- GValue value = {0};
- GValue _tmp2_ = {0};
- GValue _tmp3_;
- void* _tmp4_ = NULL;
- GCompareFunc _tmp5_;
- GCompareFunc _tmp6_;
- g_return_if_fail (self != NULL);
- _tmp0_ = ((CollectionTests*) self)->test_collection;
- _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GEE_TYPE_TREE_SET) ? ((GeeTreeSet*) _tmp0_) : NULL);
- test_set = _tmp1_;
- _vala_assert (test_set != NULL, "test_set != null");
- g_value_init (&_tmp2_, G_TYPE_POINTER);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- value = _tmp2_;
- _tmp3_ = value;
- g_object_get_property ((GObject*) test_set, "compare-func", &value);
- _tmp4_ = g_value_get_pointer (&value);
- _tmp5_ = gee_tree_set_get_compare_func (test_set);
- _tmp6_ = _tmp5_;
- _vala_assert (_tmp4_ == ((void*) _tmp6_), "value.get_pointer () == (void*) test_set.compare_func");
- g_value_unset (&value);
- G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
- _g_object_unref0 (test_set);
-}
-
-
void tree_set_tests_test_add_remove (TreeSetTests* self) {
GeeCollection* _tmp0_;
GeeTreeSet* _tmp1_;
@@ -363,7 +318,7 @@ void tree_set_tests_test_add_remove (TreeSetTests* self) {
test_set = _tmp1_;
_tmp2_ = test_set;
_vala_assert (_tmp2_ != NULL, "test_set != null");
- collection_tests_test_remove_all ((CollectionTests*) G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SORTED_SET_TESTS, SortedSetTests));
+ collection_tests_test_remove_all ((CollectionTests*) G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BIDIR_SORTED_SET_TESTS, BidirSortedSetTests));
_tmp3_ = g_strdup ("3");
_tmp4_ = g_strdup ("10");
_tmp5_ = g_strdup ("5");
@@ -692,7 +647,7 @@ GType tree_set_tests_get_type (void) {
if (g_once_init_enter (&tree_set_tests_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (TreeSetTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tree_set_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TreeSetTests), 0, (GInstanceInitFunc) tree_set_tests_instance_init, NULL };
GType tree_set_tests_type_id;
- tree_set_tests_type_id = g_type_register_static (TYPE_SORTED_SET_TESTS, "TreeSetTests", &g_define_type_info, 0);
+ tree_set_tests_type_id = g_type_register_static (TYPE_BIDIR_SORTED_SET_TESTS, "TreeSetTests", &g_define_type_info, 0);
g_once_init_leave (&tree_set_tests_type_id__volatile, tree_set_tests_type_id);
}
return tree_set_tests_type_id__volatile;
diff --git a/tests/testtreeset.vala b/tests/testtreeset.vala
index 6d754bc..e407945 100644
--- a/tests/testtreeset.vala
+++ b/tests/testtreeset.vala
@@ -23,12 +23,10 @@
using Gee;
-public class TreeSetTests : SortedSetTests {
+public class TreeSetTests : BidirSortedSetTests {
public TreeSetTests () {
base ("TreeSet");
- add_test ("[TreeSet] selected functions", test_selected_functions);
- add_test ("[TreeSet] GObject properties", test_gobject_properties);
add_test ("[TreeSet] add and remove", test_add_remove);
}
@@ -40,29 +38,6 @@ public class TreeSetTests : SortedSetTests {
test_collection = null;
}
- public void test_selected_functions () {
- var test_set = test_collection as TreeSet<string>;
-
- // Check the set exists
- assert (test_set != null);
-
- // Check the selected compare function
- assert (test_set.compare_func == (CompareFunc) strcmp);
- }
-
- public new void test_gobject_properties () {
- var test_set = test_collection as TreeSet<string>;
-
- // Check the set exists
- assert (test_set != null);
- Value value;
-
- value = Value (typeof (CompareFunc));
- test_set.get_property ("compare-func", ref value);
- assert (value.get_pointer () == (void*) test_set.compare_func);
- value.unset ();
- }
-
public new void test_add_remove () {
var test_set = test_collection as TreeSet<string>;