[Win32utils-devel] Curious test failure for win32-api with Ruby 2

Daniel Berger djberg96 at gmail.com
Sun Jul 14 11:40:03 UTC 2013


While I was trying to put together a binary for Ruby 2, I noticed this test
failure:

Failure:
  <"wrong number of parameters: expected 2, got 3"> exception message
expected but was
  <"wrong number of parameters: expected true, got 1">.

  diff:
  - wrong number of parameters: expected 2, got 3
  ?                                      ^      ^
  + wrong number of parameters: expected true, got 1
  ?                                      ^^^^      ^
test: call method returns expected error message if too many
parameters(TC_Win32_API)
C:/Users/djberge/Repositories/win32-api/test/test_win32_api.rb:120:in
`block in <class:TC_Win32_API>'
     117:
     118:    test "call method returns expected error message if too many
parameters" do
     119:      msg = "wrong number of parameters: expected 2, got 3"
  => 120:      assert_raise_message(msg){ @str.call('test', 'test', 'test')
}
     121:    end

I don't see that error with 1.9.x.

I also noticed a new warning from gcc:

win32/api.c:691:1: warning: missing braces around initializer
win32/api.c:691:1: warning: (near initialization for 'param.params')
win32/api.c: In function 'CallbackFunction0_1':
win32/api.c:691:1: warning: missing braces around initializer
win32/api.c:691:1: warning: (near initialization for 'param.params')
win32/api.c: In function 'CallbackFunction0_2':
win32/api.c:691:1: warning: missing braces around initializer
win32/api.c:691:1: warning: (near initialization for 'param.params')
...

Is this a real warning or is gcc being annoying? I don't see the problem.

Regards,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20130714/9d62dc3c/attachment.html>


More information about the win32utils-devel mailing list