Sha256: 6b59e9e4c1b021694de137b148db5ba4285d100daa3a02e13deee607ad442504

Contents?: true

Size: 779 Bytes

Versions: 6

Compression:

Stored size: 779 Bytes

Contents

require 'test/unit'
require 'fox12'
require 'fox12/undolist'

include Fox

class DummyCommand < FXCommand
  def undo ; end
  def redo ; end
  def undoName
    "My Undo Name"
  end
  def redoName
    "My Redo Name"
  end
end

class TC_FXUndoList < Test::Unit::TestCase
  def test_cut_with_nil_marker
    undoList = FXUndoList.new
    assert_nothing_raised {
      undoList.cut
    }
  end

  def test_undoName
    undoList = FXUndoList.new
    assert_nil(undoList.undoName)
    c = DummyCommand.new
    undoList.add(c)
    assert_equal(c.undoName, undoList.undoName)
  end

  def test_redoName
    undoList = FXUndoList.new
    assert_nil(undoList.redoName)
    c = DummyCommand.new
    undoList.add(c)
    undoList.undo
    assert_equal(c.redoName, undoList.redoName)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fxruby-1.2.3 tests/TC_FXUndoList.rb
fxruby-1.2.2 tests/TC_FXUndoList.rb
fxruby-1.2.4 tests/TC_FXUndoList.rb
fxruby-1.2.5 tests/TC_FXUndoList.rb
fxruby-1.4.0 tests/TC_FXUndoList.rb
fxruby-1.2.6 tests/TC_FXUndoList.rb