File: test_utils.rb

package info (click to toggle)
ruby-mpi 0.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 408 kB
  • sloc: ansic: 1,500; ruby: 808; makefile: 8
file content (21 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "test/unit"

$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
require "mpi/utils"

class TestMPIUtils < Test::Unit::TestCase

  def setup
  end

  def teardown
  end

  def test_task_divide
    [[4,1], [6,3], [7,3], [15,4], [3, 7]].each do |m, size|
      ary = MPI.task_divide(m, size)
      assert ary.max-ary.min <= 1
    end
  end

end