Ask a Question related to Ruby, Design and Development.
-
Michael Neumann #1
Patch for lib/test/unit/ui/gtk/testrunner.rb
Hi,
In Ruby-1.8.1 and before, lib/test/unit/ui/gtk/testrunner.rb contains
some errors. The set_font resuce-clause is because this font may not be
available on some platforms, in which case the program would abort.
Here's the patch:
--- /tmp/ruby-1.8.1/lib/test/unit/ui/gtk/testrunner.rb Wed Feb 12 05:22:35 2003
+++ testrunner.rb Tue Nov 11 12:50:46 2003
@@ -100,12 +100,12 @@
end
def show_fault(fault) # :nodoc:
- raw_show_fault(fault.longDisplay)
+ raw_show_fault(fault.long_display)
end
def raw_show_fault(string) # :nodoc:
- faultDetailLabel.set_text(string)
- outerDetailSubPanel.queue_resize
+ fault_detail_label.set_text(string)
+ outer_detail_sub_panel.queue_resize
end
def clear_fault # :nodoc:
@@ -328,7 +328,9 @@
@fault_detail_label = EnhancedLabel.new("")
style = Gtk::Style.new
font = Gdk::Font.font_load("-*-Courier New-medium-r-normal--*-120-*-*-*-*-*-*")
- style.set_font(font)
+ begin
+ style.set_font(font)
+ rescue ArgumentError; end
@fault_detail_label.set_style(style)
@fault_detail_label.set_justify(Gtk::JUSTIFY_LEFT)
@fault_detail_label.set_line_wrap(false)
----------------------
Regards,
Michael
Michael Neumann Guest
-
Test::Unit non-auto-run test case?
I'm getting a handle on the Test::Unit library, and the automatically-running test case example was extremely simple to get running, but now I want... -
Test::Unit -- multiple errors in test method ???
Hi ! I have been writing some unit tests with Test::Unit. I've noted that when an assertion fails in a test method, the remaining assertions... -
Method test::unit::TestSuite#<<(test)
Hi, I suggest to change the definition of this method slightly: current: # Adds the test to the suite. def <<(test) @tests << test end -
Test order in Test::Unit
On Sun, Jul 06, 2003 at 02:05:57AM +0900, Nathaniel Talbott wrote: instance_eval is also extremely useful; it lets you get at instance variables... -
Test::Unit GUI
nathaniel@NOSPAMtalbott.ws (nathaniel@NOSPAMtalbott.ws) wrote: Hello Nathaniel! Have you considered to include gtk2 patch for Test::Unit... -
Nathaniel Talbott #2
Re: Patch for lib/test/unit/ui/gtk/testrunner.rb
Michael Neumann [mailto:mneumann@ntecs.de] wrote:
Thankfully Nobu had already fixed the errors. Thanks Nobu!> In Ruby-1.8.1 and before, lib/test/unit/ui/gtk/testrunner.rb
> contains some errors.
OK, I've committed this patch. Can someone with GTK test it out to make sure> The set_font resuce-clause is because
> this font may not be available on some platforms, in which
> case the program would abort.
it works OK?
Thanks,
Nathaniel
<:((><
Nathaniel Talbott Guest
-
Michael Neumann #3
Re: Patch for lib/test/unit/ui/gtk/testrunner.rb
On Tue, Nov 11, 2003 at 11:58:50PM +0900, Nathaniel Talbott wrote:
I've tested it on FreeBSD. It works. But sure, others should test it, too.> Michael Neumann [mailto:mneumann@ntecs.de] wrote:
>>> > In Ruby-1.8.1 and before, lib/test/unit/ui/gtk/testrunner.rb
> > contains some errors.
> Thankfully Nobu had already fixed the errors. Thanks Nobu!
>
>>> > The set_font resuce-clause is because
> > this font may not be available on some platforms, in which
> > case the program would abort.
> OK, I've committed this patch. Can someone with GTK test it out to make sure
> it works OK?
Regards,
Michael
Michael Neumann Guest
-
Nathaniel Talbott #4
Re: Patch for lib/test/unit/ui/gtk/testrunner.rb
Michael Neumann [mailto:mneumann@ntecs.de] wrote:
Sorry, didn't mean to imply you hadn't tested it... I just like verification>> > OK, I've committed this patch. Can someone with GTK test it out to
> > make sure it works OK?
> I've tested it on FreeBSD. It works. But sure, others should
> test it, too.
that it works as I've applied it in the Ruby CVS tree, as I could have
goofed something up when adding it. Can you grab the latest CVS and check to
make sure everything's hunky-dory?
Thanks,
Nathaniel
<:((><
Nathaniel Talbott Guest
-
Michael Neumann #5
Re: Patch for lib/test/unit/ui/gtk/testrunner.rb
On Wed, Nov 12, 2003 at 12:27:01AM +0900, Nathaniel Talbott wrote:
Done. It works with Ruby 1.8 (not tested under 1.8.1).> Michael Neumann [mailto:mneumann@ntecs.de] wrote:
>>> >> > > OK, I've committed this patch. Can someone with GTK test it out to
> > > make sure it works OK?
> > I've tested it on FreeBSD. It works. But sure, others should
> > test it, too.
> Sorry, didn't mean to imply you hadn't tested it... I just like verification
> that it works as I've applied it in the Ruby CVS tree, as I could have
> goofed something up when adding it. Can you grab the latest CVS and check to
> make sure everything's hunky-dory?
Regards,
Michael
Michael Neumann Guest



Reply With Quote

