summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add a test checking whether floating variants are always sunk.Krzesimir Nowak2012-07-281-0/+73
| | | | * tests/glibmm_variant/main.cc: New test.
* Avoid use of deprecated API in tests and examples.Murray Cumming2011-10-261-1/+2
| | | | | | | | | | | * tests/Makefile.am: * examples/Makefile.am: Disable deprecated API. * examples/network/socket-client.cc: * examples/network/socket-server.cc: * examples/thread/dispatcher.cc: * examples/thread/dispatcher2.cc: * examples/thread/thread.cc: Remove calls to Glib::thread_init(), instead calling Glib::init() where that side-effect was also intended.
* Fix the make check build by always linking to gthread-2.0.Murray Cumming2011-10-251-1/+1
| | | | | | | | | | | | | * configure.ac: Always use gthread-2.0 because there is now no advantage to not doing that, because threading is now always enabled in glib. Remove the separate GTHREAD* variables. * glib/glibmm/Makefile.am: * gio/giomm/Makefile.am: * tests/Makefile.am: * tools/Makefile.am: * examples/Makefile.am: Remove use of the GTHREAD* variables.. * examples/network/resolver.cc: Remove the non-threading option and code that uses it.
* Missing parts of the last commitMurray Cumming2011-09-061-0/+10
|
* Add reftpr_sigc_bind test case.Murray Cumming2011-07-192-1/+71
| | | | | | * tests/glibmm_refptr_sigc_bind/main.cc: * tests/Makefile.am: Add a new test case from Kjell Ahlstedt, to test a fix in libsigc++. See bug #564005#c14.
* Fix the build with --enable-warnings=fatal.Murray Cumming2011-06-041-2/+2
| | | | | * tests/glibmm_nodetree/main.cc: Comment out a set-but-not-used variable.
* Variant: Rename get(index) to get_child(index).Murray Cumming2011-03-291-2/+2
| | | | | | | | | | | * glib/src/variant.[hg|ccg]: Rename all get() methods that return children to get_child() to make the API clearer and to avoid ambiguity with get() methods that return the underlying type instead. * examples/dbus/peer.cc: * examples/dbus/userbus.cc: * tests/glibmm_variant/main.cc: Adapted. https://bugzilla.gnome.org/show_bug.cgi?id=644207#c7 (Yannick Guesnet)
* Variant: Really declare the cast_dyamic() specialization for ustring.Murray Cumming2011-03-291-1/+99
| | | | | | | | * glib/src/variant.[hg|ccg]: Mention the specialization in the .h file instead of just in the .ccg file. Also write a custom Variant<std::string>::get() implementation because this can be used for types other than just bytestring. * tests/glibmm_variant/main.cc: Add tests for the new casts.
* Whitespace changesMurray Cumming2011-03-291-12/+12
|
* Vectorutils, ArrayHandle: Check for NULL pointers.Krzesimir Nowak2011-03-214-18/+108
| | | | | | | | | | | | | | | * glib/glibmm/vectorutils.[h|cc]: Don't crash in compute_array_size2, when NULL is passed - in that case just return 0. Also, array_to_vector method return empty vector in such case. * glib/glibmm/arrayhandle.[h|cc]: Set array_size to zero if passed array is NULL. * tests/glibmm_null_vectorutils/main.cc: New test for NULL arrays and lists for vectorutils. * tests/glibmm_null_containerhandle/main.cc: New test for NULL arrays and lists for containerhandles. * tests/Makefile.am: Added new tests to build. Spotted by Kalev Lember. Bug #645245.
* Variant: Added Variant<VariantBase>::get().Yannick Guesnet2011-03-161-0/+37
| | | | | | | | | * glib/src/variant.[ccg|hg]: Added Variant<VariantBase>::get(). * tests/glibmm_variant/main.cc: Add some tests. This is useful because Variant<VariantBase> can be manipulate as other variants of type Variant<T>. This allow, for example, to define variants of type Variant<std::map<ustring, VariantBase> >.
* Variant: Add a cast operator.Yannick Guesnet2011-03-161-0/+49
| | | | | | | | | | | | * gio/src/glib/src/variant.[ccg|hg]: Add a VariantBase::cast_dynamic() static method. * tests/glibmm_variant/main.cc: Add some tests. This is useful because VariantBase can and will be passed by value sometimes and DBus may have actual Variant types whose underlying type will not be known at compile time (this note was by Murray). Bug #644146
* tests: Remove remaining use of std::cout.Murray Cumming2011-02-242-2/+16
| | | | | | * tests/giomm_ioerror/main.cc: * tests/giomm_simple/main.cc: Hid some use of std::cout that I missed in my previous commit.
* tests: Use EXIT_* for clarity.Murray Cumming2011-02-2414-16/+16
| | | | * tests/*.cc: Use EXIT_SUCCESS rather than 0 because I think that is clearer.
* Actually run all tests, and check some failures.Murray Cumming2011-02-2412-93/+182
| | | | | | | | | | | | | | | | | | | * tests/Makefile.am: Add all tests to TESTS so they are really run during make check, instead of just built. * tests/giomm_asyncresult_sourceobject/main.cc: * tests/giomm_ioerror/main.cc: * tests/giomm_simple/main.cc: * tests/glibmm_bool_arrayhandle/main.cc: * tests/glibmm_bool_vector/main.cc: * tests/glibmm_buildfilename/main.cc: * tests/glibmm_date/main.cc: * tests/glibmm_ustring_compose/main.cc: * tests/glibmm_valuearray/main.cc: * tests/glibmm_variant/main.cc: * tests/glibmm_vector/main.cc: Remove all use of std::cout by default, allowing it to be renabled by changing a line. Return (or) exit with EXIT_FAILURE after any use of std::cerr, so that make check can report it.
* Rename Gio::DBus::DBusError to Gio::DBus::Error.Murray Cumming2011-02-242-0/+82
| | | | | | | | | | | * gio/src/dbuserror.hg: Rename the class to Error. * examples/dbus/busserver.cc: Adapated. * tests/giomm_ioerror_and_iodbuserror/main.cc: Added a test to check that both Gio::Error and Gio::DBus::Error are working. * tests/Makefile.am: Set TESTS, so that the test is actually run. We should add others to this too. This current fails, so I need to fix the problem in a subsequent commit.
* Added missing files.Krzesimir Nowak2011-02-212-2/+91
|
* Extended build_filename() utility functionFabrício Godoy2011-02-212-0/+39
| | | | | Extended build_filename() to accept up to nine parameters. Added a new testcase in tests/glibmm_buildfilename.
* Added bool specialization for Glib::ArrayHandle.Krzesimir Nowak2011-02-211-25/+27
| | | | | | | | | | | * glib/glibmm/arrayhandle.h: Added specialization for bool ArrayHandle. This is needed because std::vector<bool> is a specialization for which iterators does not return a reference to actual value it holds. * glib/glibmm/arrayhandle.cc: New file implementing destructor of bool ArrayHandle - the only method that is not inlined. * tests/glibmm_bool_arrayhandle/main.cc: New file implementing test checking if bool ArrayHandle actually works. * tests/Makefile.am: Added new test to build.
* Fixed code style.Murray Cumming2011-01-272-197/+199
|
* Added vectorutils.h.Krzesimir Nowak2011-01-273-2/+669
| | | | | | | | | | | * glib/glibmm/vectorutils.[h|cc]: New files implementing an array, list, slist <-> std::vector convertions. It implements also a specialization for bool types. * glib/glibmm.h: Include vectorutils.h. * glib/glibmm/filelist.am: Added vectorutils to build. * tests/glibmm_vector/main.cc: New test for general vectorutils check. * tests/glibmm_bool_vector/main.cc: New test checking bool specializations. * tests/Makefile.am: Added above tests to build system.
* Variant test: Use the dictionary variant classes in the test.José Alburquerque2010-12-281-1/+65
| | | | | | | | | | | | | | | | * glib/src/variant.{ccg,hg} (get_iter): Make all the get_iter() methods in the variant container classes const. (Variant< std::pair<K, V> >::get): (Variant< std::map<K, V> >::lookup): (std::map<K, V> Variant< std::map<K, V> >::get): Correct the getting of a std::pair<> from the Variant<> and the getting of children from the parent VariantContainerBase class. (Variant< std::map<K, V> >::create): Create the dictionary entries as Variants and then use g_variant_builder_add_value() to add them instead of g_variant_add() which is easier. * tests/glibmm_variant/main.cc: Use the updated dictionary classes in the test.
* Add a valuearray test to build.Krzesimir Nowak2010-12-241-2/+1
| | | | | * tests/Makefile.am: Added a valuearray test to build instead of value test thrice.
* Add Variant< std::vector<[Glib::ustring|std::string]> specializations.José Alburquerque2010-12-211-7/+7
| | | | | | | | | | | | | * glib/src/variant.{ccg,hg}: Add two Variant specializations to deal specifically with arrays of UTF8 and non-UTF8 strings both reflecting the API of the specialization that deals with regular arrays. (docs, typos): Minor corrections. (Variant<std::vector<T>>::get): Have the method that gets the vector return the vector instead of setting an output parameter because returning the vector on the call stack should not be costly and it's probably more intuitive for the programmer. * tests/glibmm_variant/main.cc: Adapt test according to the above change. Correct minor typos.
* Variant: Add a VariantStringBase and a VariantContainerBase class.José Alburquerque2010-12-202-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * glib/src/variant.{ccg,hg} (VariantStringBase): Implement a new class from which the Glib::Variant<> string class (like Glib::Variant<Glib::ustring>) now derive. The new class has methods for determining/creating object paths and signatures. The new instances are created by setting output parameters. (VaraintContainerBase): Implement this new class from which variant containers should derive. (VariantContainerBase::get_n_children, get, get_maybe): Moved from Variant<VariantBase> (castitem constructors): Corrected all GVariant* castitem constructors to accept a 'take_a_reference' bool parameter. (Variant< std::vector<T> >::create, get, get_iter): Re-wrote these methods to use the Glib::VariantType class to get variant types instead of using strings. Also Re-wrote to work specifically with fixed arrays (see g_variant_get_fixed_array). This means that this class will not work with vectors of strings because g_variant_get_strv() and g_variant_get_bytestring_array() need to be used in those cases. (std::vector<T> get): Re-wrote to use an output parameter. * glib/src/variant_basictypes.h.m4: Corrected the castitem constructors as above. * tests/Makefile.am: * tests/glibmm_variant/main.cc: Added a small test for the Variant< std::vector<T> > methods. * gio/src/dbuserror.hg: * gio/src/error.hg: Wrap the GDBusError enum as a GError, moving its declaration to error.hg.
* Remove the reduced API options and code, as discussed on mailing list.Murray Cumming2010-05-312-63/+0
| | | | | | | | | * configure.ac: Removed the --enable-api-exceptions, --enable-api-properties, --enable-api-vfuncs and --enable-api-default-signal-handlers options. * build/reduced.m4: Removed. * tools/m4/*.m4: * tools/pm/Output.pm: Remove any use of ifdefs and auto_ptr for reduced API. * *.[hg|ccg|h|cc]: Remove the idefed code.
* 2.23.42.23.4Murray Cumming2010-03-261-2/+4
|
* Add regression test for Bug #613250.Murray Cumming2010-03-262-1/+31
| | | | | | * tests/Makefile.am * tests/glibmm_ustring_format/main.cc: Added a regression test for the previously-commited fix, based on code in bug #613250 from Debarshi Ray.
* Revert accidentally pushed commits.José Alburquerque2010-03-151-2/+2
| | | | | | | | * ChangeLog-ValueArrayTest: * ChangeLog.local: * tests/glibmm_valuearray/main.cc: * tools/docextract_to_xml.pl: Revert accidentally pushed commits which should be pushed with bugs that were filed.
* ValueArray Example: Get values as references in loops.José Alburquerque2010-03-111-2/+2
| | | | | * tests/glibmm_valuearray/main.cc (main): Get values as references instead of copying them in both for loops.
* Reorder assignment to LDADD and giomm_ldadd in tests/Makefile.amDavid King2010-03-101-3/+3
| | | | | | * tests/Makefile.am: Reorder values assigned to LDADD and giomm_ldadd to place built libraries before system libraries. Fixes GNOME bug #610854.
* AsyncResult: Add get_source_object_base(), deprecating get_source_object().Murray Cumming2010-03-082-1/+36
| | | | | | | | | | * gio/asyncresult.[hg|ccg]: Deprecate get_source_object(), replacing it with get_source_object_base(), because in giomm, the C++ wrapper object might be a Glib::Interface, but not a Glib::Object (though the underlying C instance must be a GObject). This happens if giomm does not know about the GType of the underlying C Object, which is a legitimate situation. * tests/giomm_asyncresult_sourceobject/main.cc: Added this test case from Michael Hasselmann, from bug #608269.
* Implement GTree wrapperSzilárd Pfeiffer2010-01-053-0/+239
| | | | Also add some tests for the new class
* Convert tests/ sub-tree to non-recursive buildDaniel Elstner2009-08-099-56/+50
| | | | | | | | | | * tests/Makefile.am: Rewrite to a non-recursive build of all test programs with a single control file. Hook the the build of the test programs to the make check target. * tests/Makefile.am_fragment: Delete obsolete file. * tests/*/Makefile.am: Delete obsolete files. * configure.ac (AC_CONFIG_FILES): Remove tests/*/Makefile output files from the list.
* Use references to store casts in glibmm_valuearray test.José Alburquerque2009-07-031-2/+2
|
* Omit unused parameter names to avoid warningDaniel Elstner2009-06-241-1/+1
| | | | | | | | * tools/extra_defs_gen/generate_defs_gio.cc (main): Omit names of unused function parameters, to fix the build with fatal warnings enabled. * examples/properties/properties_example.cc (main): ditto, * tests/giomm_ioerror/main.cc (main): ditto.
* Use a const instead of a #define in the value array example.José Alburquerque2009-06-231-2/+2
|
* Add Glib::ValueArray with usage test.José Alburquerque2009-06-223-1/+83
|
* Use DK_ARG_ENABLE_WARNINGS() to replace custom M4 macroDaniel Elstner2009-03-261-1/+1
| | | | | | | | | | | | | | * scripts/dk-warn.m4: New file defining DK_ARG_ENABLE_WARNINGS(). * scripts/macros.m4: Remove the old GTKMM_ARG_ENABLE_WARNINGS(). * configure.in: Use new macro DK_ARG_ENABLE_WARNINGS() to set the Makefile variable $(GLIBMM_WXXFLAGS). * build_shared/Makefile_build.am_fragment (all_includes): Prepend $(GLIBMM_WXXFLAGS). * tools/extra_defs_gen/Makefile.am (INCLUDES): ditto, * examples/Makefile.am_fragment (all_includes): ditto, * tests/Makefile.am_fragment (INCLUDES): ditto. svn path=/trunk/; revision=809
* Fix --disable-api-exceptions buildDaniel Elstner2009-03-232-9/+68
| | | | | | | | | | | | | | | * glib/src/keyfile.{ccg,hg}: Conditionalize all exception-handling code in order to fix the build with --disable-api-exceptions. * glib/src/regex.hg: ditto, * gio/src/appinfo.ccg: ditto, * gio/src/file.{ccg,hg}: ditto, * gio/src/outputstream.ccg: ditto, * examples/keyfile/main.cc: ditto, * examples/regex/main.cc: ditto, * tests/giomm_ioerror/main.cc: ditto, * tests/giomm_simple/main.cc: ditto. svn path=/trunk/; revision=803
* Fix tests to use standard filenamesJonathon Jongsma2008-12-132-2/+2
| | | | svn path=/trunk/; revision=761
* Fixed the const char* specialization for Stringify<> by making the string_Armin Burgmeier2008-10-201-1/+1
| | | | | | | | | | | | | | | 2008-10-16 Armin Burgmeier <armin@openismus.com> * glib/glibmm/ustring.h: Fixed the const char* specialization for Stringify<> by making the string_ member a const Glib::ustring instead of a const Glib::ustring&. Also enabled the char[N] specialization for string literals. * tests/glibmm_ustring_compose/main.cc: Enabled the test for the specialization for string literals. Bug #506410 (Szilárd Pfeiffer) svn path=/trunk/; revision=741
* Add a workaround for the HOST_NOT_FOUND symbol conflictsJonathon Jongsma2008-10-051-0/+12
| | | | | | | As suggested by Szilárd Pfeiffer in Bug #529496 * tests/giomm_ioerror/main.cc: add a test for this svn path=/trunk/; revision=735
* Implemented clone function to merge the constructors into that and fixedSzilárd Pfeiffer2008-09-031-30/+18
| | | | | | | | | | | | 2008-08-26 Szilárd Pfeiffer <szilard.pfeiffer@gmail.com> * glib/src/nodetree.hg: Implemented clone function to merge the constructors into that and fixed clear function the operator= function. * tests/glibmm_nodetree/main.cc: Simplified the test case. Bug #547901. svn path=/trunk/; revision=724
* Actually use the copy constructor (or operator=), instead of just copyingMurray Cumming2008-08-261-1/+1
| | | | | | | | | 2008-08-26 Murray Cumming <murrayc@murrayc.com> * tests/glibmm_nodetree/main.cc: Actually use the copy constructor (or operator=), instead of just copying the pointer. svn path=/trunk/; revision=720
* Added a copy constructor. Therefore, take store the data by value insteadSzilárd Pfeiffer2008-08-261-3/+3
| | | | | | | | | | | 2008-08-26 Szilárd Pfeiffer <szilard.pfeiffer@gmail.com> * glib/src/nodetree.hg: Added a copy constructor. Therefore, take store the data by value instead of reference, taking it by const reference. * tests/glibmm_nodetree/main.cc: Test the copy constructor. Bug #547909. svn path=/trunk/; revision=718
* Implement the C++ version of GNode test case. Bug #547889Szilárd Pfeiffer2008-08-181-98/+136
| | | | | | | | | | 2008-08-15 Szilárd Pfeiffer <szilard.pfeiffer@gmail.com> * tests/glibmm_nodetree/main.cc: Implement the C++ version of GNode test case. Bug #547889 svn path=/trunk/; revision=716
* Added a test case. Added a ustring::Stringify<> template specialization soMurray Cumming2008-08-063-1/+36
| | | | | | | | | | | | | | | 2008-08-06 Murray Cumming <murrayc@murrayc.com> * configure.in: * tests/Makefile.am: * tests/glibmm_ustring_compose/main.cc: Added a test case. * glib/glibmm/ustring.h: Added a ustring::Stringify<> template specialization so that ustring::compose() works with const char* arguments, though it still needs to be fixed to work for string literals. Bug #506410 (Szilárd Pfeiffer). svn path=/trunk/; revision=711
* Hand-code the TraverseType enum, to add a prefix to the values. Adapted.Murray Cumming2008-07-291-7/+7
| | | | | | | | | | 2008-07-29 Murray Cumming <murrayc@murrayc.com> * glib/src/nodetree.hg: Hand-code the TraverseType enum, to add a prefix to the values. * tests/glibmm_nodetree/main.cc: Adapted. svn path=/trunk/; revision=703
* find(), find_child(), traverse(), foreach(): Rearrange the parameters soMurray Cumming2008-07-291-13/+11
| | | | | | | | | | 2008-07-29 Murray Cumming <murrayc@murrayc.com> * glib/src/nodetree.hg: find(), find_child(), traverse(), foreach(): Rearrange the parameters so we can have default values. * tests/glibmm_nodetree/main.cc: Adapted. svn path=/trunk/; revision=702