summaryrefslogtreecommitdiff
path: root/json-glib/tests/gvariant.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't loose decimal in whole-double -> string conversiondjcb2017-03-131-2/+2
| | | | | | | | | | | | | When converting json to its string representation, whole-doubles (such as 1.0) would be converted into strings without decimals ("1"). That can be inconvenient e.g. when converting from/to GVariants. To avoid this, append '.0' to the string representation for doubles if they lost their decimals in the conversion. Also add / update unit tests for this. https://bugzilla.gnome.org/show_bug.cgi?id=753763
* json-gvariant: Parse json doubles that are whole numbersStef Walter2015-01-261-0/+4
| | | | | | | | | The json gvariant serializer encodes whole number doubles without a dot. The deserializer needs to be able to parse these as well. Fix problem, and add test cases. https://bugzilla.gnome.org/show_bug.cgi?id=724319
* tests/gvariant: Use G_N_ELEMENTSEmmanuele Bassi2013-12-021-5/+5
| | | | Instead of sizeof(array)/sizeof(type).
* Make JSON to GVariant conversion handle some string to number conversions.Joseph Artsimovich2013-12-021-7/+30
| | | | | | | | | Consider the following JSON: ["123"] Trying to convert it to GVariant with signature "(i)" would previously fail, as string-to-number conversions weren't implemented. This patch implements string-to-number and string-to-boolean conversions. https://bugzilla.gnome.org/show_bug.cgi?id=707382
* Remove compile time GLib version checkEmmanuele Bassi2013-08-211-3/+0
| | | | | We depend on a new version of GLib, so we can remove a bunch of old version checks.
* tests: Put g_type_init() under conditional compilationEmmanuele Bassi2012-10-271-0/+2
| | | | | | | | Starting from GLib 2.36, g_type_init() is going to be deprecated (the type system will be initialized as soon as libgobject is paged in, using constructors). As I don't want to bump dependencies just for that, the call to g_type_init() should be placed under a compile-time version check, to keep the noise from compiler warnings down.
* Adapt to the demise of single includes in GLibMatthias Clasen2011-10-121-1/+1
|
* build: Rename test binariesEmmanuele Bassi2011-06-191-0/+233
It's pointless to add the '-test' suffix to files under the tests/ directory.