X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dbus%2Fdbus-marshal-validate-util.c;h=d52cb6d84c21a338464e0bc7c4757a5caf705340;hb=1200c464b6c9051340960e07f0d61a51dad71286;hp=afaf5262de6e5c1de411448ba64b8bce4c52ed0b;hpb=0e53d4eed36f378e99802e516fbb0d1355641902;p=platform%2Fupstream%2Fdbus.git diff --git a/dbus/dbus-marshal-validate-util.c b/dbus/dbus-marshal-validate-util.c index afaf526..d52cb6d 100644 --- a/dbus/dbus-marshal-validate-util.c +++ b/dbus/dbus-marshal-validate-util.c @@ -1,4 +1,4 @@ -/* -*- mode: C; c-file-style: "gnu" -*- */ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* dbus-marshal-validate-util.c Would be in dbus-marshal-validate.c, but only used by tests/bus * * Copyright (C) 2005 Red Hat, Inc. @@ -17,12 +17,15 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #include -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + #include "dbus-internals.h" #include "dbus-marshal-validate.h" #include "dbus-marshal-recursive.h" @@ -92,7 +95,8 @@ static const ValidityTest signature_tests[] = { { "()i", DBUS_INVALID_STRUCT_HAS_NO_FIELDS }, { "(a)", DBUS_INVALID_MISSING_ARRAY_ELEMENT_TYPE }, { "a{ia}", DBUS_INVALID_MISSING_ARRAY_ELEMENT_TYPE }, - { "a{}", DBUS_INVALID_DICT_ENTRY_HAS_NO_FIELDS } + { "a{}", DBUS_INVALID_DICT_ENTRY_HAS_NO_FIELDS }, + { "a{aii}", DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE }, /* { "a{i}", DBUS_INVALID_DICT_ENTRY_HAS_ONLY_ONE_FIELD }, */ /* { "{is}", DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY }, */ /* { "a{isi}", DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS }, */ @@ -175,9 +179,9 @@ _dbus_marshal_validate_test (void) ":abce.freedesktop.blah" }; const char *invalid_unique_names[] = { - ":-", + //":-", ":!", - ":0-10", + //":0-10", ":blah.", ":blah.", ":blah..org", @@ -223,7 +227,8 @@ _dbus_marshal_validate_test (void) "not a valid signature", "123", ".", - "(" + "(", + "a{(ii)i}" /* https://bugs.freedesktop.org/show_bug.cgi?id=17803 */ }; /* Signature with reason */ @@ -578,4 +583,6 @@ _dbus_marshal_validate_test (void) return TRUE; } -#endif /* DBUS_BUILD_TESTS */ +#endif /* !DOXYGEN_SHOULD_SKIP_THIS */ + +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */