DeeModel* model = dee_sequence_model_new();
dee_model_set_schema(model, "s", NULL);
// Add on a null string.
DeeModelIter* iter = dee_model_append(model, NULL);
// Check that the method we call is null.
const gchar* value = dee_model_get_string(model, iter, 0);
ASSERT_THAT(value, IsNull());
This fails, as dee_model_get_string actually returns a valid gchar* pointing to "".
This isn't what I want :(
The actual interesting part of the test is this:
RowAdaptorBase row(model, iter);
ASSERT_THAT(row.GetStringAt(0), Eq(""));
But I want o assert that the actual method call it is using returns a NULL, but it doesn't.
I can use 1 instead of 0, but his gives spewage on std::err as Mikkel says.
I've tried many different ways to get a null char* into the model, but I seem to be failing.
Is it legal?
Michal,
I have the following:
DeeModel* model = dee_sequence_ model_new( ); set_schema( model, "s", NULL); append( model, NULL);
dee_model_
// Add on a null string.
DeeModelIter* iter = dee_model_
// Check that the method we call is null. get_string( model, iter, 0); THAT(value, IsNull());
const gchar* value = dee_model_
ASSERT_
This fails, as dee_model_ get_string actually returns a valid gchar* pointing to "".
This isn't what I want :(
The actual interesting part of the test is this: THAT(row. GetStringAt( 0), Eq(""));
RowAdaptorBase row(model, iter);
ASSERT_
But I want o assert that the actual method call it is using returns a NULL, but it doesn't.
I can use 1 instead of 0, but his gives spewage on std::err as Mikkel says.
I've tried many different ways to get a null char* into the model, but I seem to be failing.
Is it legal?