Commit e6881d4f authored by Daiki Ueno's avatar Daiki Ueno

build: Suppress compiler warning if compiled with G_DISABLE_ASSERT

This is similar to 0be63575 but for
test-file-collection.c.

Fixes #36.
parent cf21ad50
Pipeline #143488 passed with stages
in 10 minutes and 9 seconds
#include "config.h"
#undef G_DISABLE_ASSERT
#include "egg/egg-testing.h"
#include "secret-file-collection.h"
#include "secret-retrievable.h"
#include "secret-schema.h"
#include <stdlib.h>
typedef struct {
gchar *directory;
GMainLoop *loop;
......
  • This not a solution. This looks like incorrect using glib assertions. https://developer.gnome.org/glib/stable/glib-Testing.html

  • AFAIK, this is correct:

    Since 2.58, if tests are compiled with G_DISABLE_ASSERT defined, g_test_init() will print an error and exit. This is to prevent no-op tests from being executed, as g_assert() is commonly (erroneously) used in unit tests, and is a no-op when compiled with G_DISABLE_ASSERT. Ensure your tests are compiled without G_DISABLE_ASSERT defined.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment