test_schema.c (275223) | test_schema.c (279549) |
---|---|
1/* Copyright (c) 2014, Vsevolod Stakhov 2 * All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * * Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 8 * * Redistributions in binary form must reproduce the above copyright --- 65 unchanged lines hidden (view full) --- 74 } 75 76 match = ucl_object_validate (schema, data, err); 77 if (match != ucl_object_toboolean (valid)) { 78 fprintf (stdout, "Test case '%s' failed (expected %s): '%s'\n", 79 ucl_object_tostring (description), 80 ucl_object_toboolean (valid) ? "valid" : "invalid", 81 err->msg); | 1/* Copyright (c) 2014, Vsevolod Stakhov 2 * All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * * Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 8 * * Redistributions in binary form must reproduce the above copyright --- 65 unchanged lines hidden (view full) --- 74 } 75 76 match = ucl_object_validate (schema, data, err); 77 if (match != ucl_object_toboolean (valid)) { 78 fprintf (stdout, "Test case '%s' failed (expected %s): '%s'\n", 79 ucl_object_tostring (description), 80 ucl_object_toboolean (valid) ? "valid" : "invalid", 81 err->msg); |
82 fprintf (stdout, "%s\n", ucl_object_emit (data, UCL_EMIT_CONFIG)); 83 fprintf (stdout, "%s\n", ucl_object_emit (schema, UCL_EMIT_CONFIG)); |
|
82 return false; 83 } 84 85 return true; 86} 87 88static int 89perform_tests (const ucl_object_t *obj) --- 69 unchanged lines hidden --- | 84 return false; 85 } 86 87 return true; 88} 89 90static int 91perform_tests (const ucl_object_t *obj) --- 69 unchanged lines hidden --- |