Sha256: 3124f06744ae44b89b8c5ce5bb6f8e02af82fbd5eb5fcf382f4b771b035a1d69
Contents?: true
Size: 577 Bytes
Versions: 3
Compression:
Stored size: 577 Bytes
Contents
require 'test_helper' class ChessTest < Minitest::Test if ENV['BIG_PGN_COLLECTION'] && File.exist?(TestHelper::BIG_PGN_COLLECTION) puts 'Loading tests for a big PGN collection...' 300_000.times do |i| filename = format('%06d.pgn', i + 1) path = File.join(TestHelper::BIG_PGN_COLLECTION, filename) break unless File.exist?(path) define_method "test_big_pgn_#{filename}" do pgn = Chess::Pgn.new(path) game = Chess::Game.new(pgn.moves) assert(game.checkmate?) if pgn.moves.last.match?(/\#$/) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
chess-0.3.4 | test/test_big_pgn_collection.rb |
chess-0.3.3 | test/test_big_pgn_collection.rb |
chess-0.3.2 | test/test_big_pgn_collection.rb |