Skip to content

Add g_assert_cmp*() to glib-2.0.vapi (#395)

Chris White requested to merge cxw42/vala:issue395c into master
  • Expose the existing GLib detailed-assertion comparisons to Vala code.
  • Add a GLib.Cmp namespace with constants representing the operators used with those functions, e.g., Glib.Cmp.LT === <.

Fixes #395 (closed).

I wasn't sure which directory to put the test code in, so I picked the one that seemed closest. The tests are in tests/basic-types/issue395.vala. Let me know if that file should be somewhere else.

I do not currently have tests for assert_cmpfloat_with_epsilon() or assert_cmpvariant() since I'm not sure of the right way to handle those in a platform-independent fashion. Ideas welcome!

Thanks for considering this MR!

Edited by Chris White

Merge request reports