Skip to content
Commit e7bb2daf authored by Pavel Tvrdík's avatar Pavel Tvrdík
Browse files

Birdtest: improve bt_check macro

Now dat for testing can be defined somelike this:

  struct in_out_data_ {
    char *in;
    u32 out;
  } in_out_data[] = {
      {
	  .in  = "192.168.1.128",
	  .out = build_ip4(192, 168, 1, 128),
      },
      {
	  .in  = "255.255.255.255",
	  .out = build_ip4(255, 255, 255, 255),
      },
      ...
  };

  bt_check(ip4_pton_, in_out_data, "%s", "0x%08X");
parent 1bdf2a54
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment