1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/-test-/printf/printf.c, test/-ext-/test_printf.rb: remove

test for snprintf(3).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-11-04 05:03:50 +00:00
parent a9f3eb75de
commit 7b011fd11e
2 changed files with 0 additions and 13 deletions

View file

@ -1,14 +1,6 @@
#include <ruby.h>
#include <ruby/encoding.h>
static VALUE
printf_test_i(VALUE self, VALUE obj)
{
char buf[256];
snprintf(buf, sizeof(buf), "<%"PRIsVALUE">", obj);
return rb_usascii_str_new2(buf);
}
static VALUE
printf_test_s(VALUE self, VALUE obj)
{
@ -102,7 +94,6 @@ void
Init_printf(void)
{
VALUE m = rb_define_module_under(rb_define_module("Bug"), "Printf");
rb_define_singleton_method(m, "i", printf_test_i, 1);
rb_define_singleton_method(m, "s", printf_test_s, 1);
rb_define_singleton_method(m, "v", printf_test_v, 1);
rb_define_singleton_method(m, "q", printf_test_q, 1);

View file

@ -11,10 +11,6 @@ class Test_SPrintf < Test::Unit::TestCase
"<#{self.class}:#{object_id}>"
end
def test_int
assert_match(/\A<-?\d+>\z/, Bug::Printf.i(self))
end
def test_to_str
assert_equal("<#{self.class}:#{object_id}>", Bug::Printf.s(self))
end