forked from GNOME/glib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing this in a normal testcaes is a bit tricky, since triggering a non-fatal assertion has the side-effect of marking the test as failed. So just don't run any testcases here, but check the side-effect manually. Since we don't produce TAP output when not using g_test_run(), tell meson that we're using the exitcode protocol.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* Copyright (C) 2024 Red Hat, Inc. | ||
* | ||
* SPDX-License-Identifier: LGPL-2.1-or-later | ||
* | ||
* 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, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include <glib.h> | ||
|
||
int | ||
main (int argc, char *argv[]) | ||
{ | ||
g_test_init (&argc, &argv, G_TEST_OPTION_NONFATAL_ASSERTIONS, NULL); | ||
|
||
g_assert_cmpstr ("We can survive this!", ==, "Or maybe not?"); | ||
|
||
if (!g_test_failed ()) | ||
return 1; | ||
|
||
return 0; | ||
} |