macro_rules! assert_label {
    ($widget:expr, $string:expr) => { ... };
}
Expand description

To check if the widget’s label matches the given string.

Example:

extern crate gtk;
#[macro_use]
extern crate gtk_test;

use gtk::{Button, prelude::ButtonExt, prelude::LabelExt};

gtk::init().expect("GTK init failed");
let but = Button::new();
but.set_label("text");
assert_label!(but, "text");