Commit Graph

9 Commits

Author SHA1 Message Date
Matthias Clasen
8c156e6b80 testsuite: Reduce the use of g_assert
Stop using g_assert() in the gtk tests.
2021-04-12 21:22:46 -04:00
Matthias Clasen
26150d8489 testsuite: Improve coverage for GtkExpression 2020-10-30 22:27:40 -04:00
Matthias Clasen
dfabe74c59 Make filter constructors return exact types
Make functions like gtk_custom_filter_new() return
the actual type they construct.

Update all callers.
2020-09-05 21:43:42 -04:00
Matthias Clasen
706d464ae6 filterlistmodel: Make constructor transfer full
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.

Update all callers.
2020-07-26 18:04:40 -04:00
Benjamin Otte
e518c1f2f3 stringfilter: Make the constructor take an expression
An expression is critically important for a string filter and people
should be made aware of it when constructing the filter.
2020-07-16 20:43:16 +02:00
Benjamin Otte
5080730728 listmodels: Stop respecting item-type
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.

It turns out nobody uses item-type anyway.

So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.

All the models need to be able to deal with any type of object going
through anyway.
2020-07-05 02:59:21 +02:00
Matthias Clasen
542829ee81 Add some tests for expression binding
In particular, test that expressios can deal with object == this.
2020-05-30 19:26:46 -04:00
Matthias Clasen
115923b2d9 More expression tests
Test type mismatches, and the this pointer
during evaluation.
2020-05-30 17:48:44 -04:00
Benjamin Otte
92c359ca09 testsuite: Add expression tests 2020-05-30 17:48:44 -04:00