diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-05-20 14:00:14 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-05-20 21:43:30 +0900 |
commit | 8d242a33af19672977dcdcb8d32e9ad547bc0141 (patch) | |
tree | 3e15a99988ed8b084b6af40c9f94dae33a5082eb /ext/-test-/st | |
parent | 87217f26f120611d009f1b178d3cc5eaf1b8b515 (diff) |
`rb_bug` prints a newline after the message
Diffstat (limited to 'ext/-test-/st')
-rw-r--r-- | ext/-test-/st/foreach/foreach.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/-test-/st/foreach/foreach.c b/ext/-test-/st/foreach/foreach.c index cde49fb26d..7fbf064694 100644 --- a/ext/-test-/st/foreach/foreach.c +++ b/ext/-test-/st/foreach/foreach.c @@ -14,20 +14,20 @@ force_unpack_check(struct checker *c, st_data_t key, st_data_t val) if (c->nr == 0) { st_data_t i; - if (c->tbl->bins != NULL) rb_bug("should be packed\n"); + if (c->tbl->bins != NULL) rb_bug("should be packed"); /* force unpacking during iteration: */ for (i = 1; i < expect_size; i++) st_add_direct(c->tbl, i, i); - if (c->tbl->bins == NULL) rb_bug("should be unpacked\n"); + if (c->tbl->bins == NULL) rb_bug("should be unpacked"); } if (key != c->nr) { - rb_bug("unexpected key: %"PRIuVALUE" (expected %"PRIuVALUE")\n", (VALUE)key, (VALUE)c->nr); + rb_bug("unexpected key: %"PRIuVALUE" (expected %"PRIuVALUE")", (VALUE)key, (VALUE)c->nr); } if (val != c->nr) { - rb_bug("unexpected val: %"PRIuVALUE" (expected %"PRIuVALUE")\n", (VALUE)val, (VALUE)c->nr); + rb_bug("unexpected val: %"PRIuVALUE" (expected %"PRIuVALUE")", (VALUE)val, (VALUE)c->nr); } c->nr++; @@ -60,7 +60,7 @@ unp_fec_i(st_data_t key, st_data_t val, st_data_t args, int error) st_data_t v; if (!st_delete(c->tbl, &k, &v)) { - rb_bug("failed to delete\n"); + rb_bug("failed to delete"); } if (v != 0) { rb_bug("unexpected value deleted: %"PRIuVALUE" (expected 0)", (VALUE)v); @@ -84,21 +84,21 @@ unp_fec(VALUE self, VALUE test) st_add_direct(tbl, 0, 0); - if (tbl->bins != NULL) rb_bug("should still be packed\n"); + if (tbl->bins != NULL) rb_bug("should still be packed"); st_foreach_check(tbl, unp_fec_i, (st_data_t)&c, -1); if (c.test == ID2SYM(rb_intern("delete2"))) { if (c.nr != 1) { - rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)\n", (VALUE)c.nr); + rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)", (VALUE)c.nr); } } else if (c.nr != expect_size) { - rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE")\n", + rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE")", (VALUE)c.nr, (VALUE)expect_size); } - if (tbl->bins == NULL) rb_bug("should be unpacked\n"); + if (tbl->bins == NULL) rb_bug("should be unpacked"); st_free_table(tbl); @@ -120,14 +120,14 @@ unp_fe_i(st_data_t key, st_data_t val, st_data_t args) st_data_t v; if (!st_delete(c->tbl, &k, &v)) { - rb_bug("failed to delete\n"); + rb_bug("failed to delete"); } if (v != 0) { rb_bug("unexpected value deleted: %"PRIuVALUE" (expected 0)", (VALUE)v); } return ST_CONTINUE; } - rb_bug("should never get here\n"); + rb_bug("should never get here"); } rb_raise(rb_eArgError, "unexpected arg: %+"PRIsVALUE, c->test); @@ -145,21 +145,21 @@ unp_fe(VALUE self, VALUE test) st_add_direct(tbl, 0, 0); - if (tbl->bins != NULL) rb_bug("should still be packed\n"); + if (tbl->bins != NULL) rb_bug("should still be packed"); st_foreach(tbl, unp_fe_i, (st_data_t)&c); if (c.test == ID2SYM(rb_intern("unpack_delete"))) { if (c.nr != 1) { - rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)\n", (VALUE)c.nr); + rb_bug("mismatched iteration: %"PRIuVALUE" (expected 1)", (VALUE)c.nr); } } else if (c.nr != expect_size) { - rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE"o)\n", + rb_bug("mismatched iteration: %"PRIuVALUE" (expected %"PRIuVALUE"o)", (VALUE)c.nr, (VALUE)expect_size); } - if (tbl->bins == NULL) rb_bug("should be unpacked\n"); + if (tbl->bins == NULL) rb_bug("should be unpacked"); st_free_table(tbl); |