[前][次][番号順一覧][スレッド一覧]

ruby-changes:48975

From: nobu <ko1@a...>
Date: Sat, 9 Dec 2017 20:58:29 +0900 (JST)
Subject: [ruby-changes:48975] nobu:r61094 (trunk): test_process.rb (test_maxgroups): add assertions

nobu	2017-12-09 20:58:25 +0900 (Sat, 09 Dec 2017)

  New Revision: 61094

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61094

  Log:
    test_process.rb (test_maxgroups): add assertions

  Modified files:
    trunk/test/ruby/test_process.rb
Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 61093)
+++ test/ruby/test_process.rb	(revision 61094)
@@ -1512,8 +1512,13 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1512
   end
 
   def test_maxgroups
-    assert_kind_of(Integer, Process.maxgroups)
+    max = Process.maxgroups
   rescue NotImplementedError
+  else
+    assert_kind_of(Integer, max)
+    gs = Process.groups
+    assert_operator(gs.size, :<=, max)
+    assert_raise(ArgumentError) {Process.groups = gs * (max / gs.size + 1)}
   end
 
   def test_geteuid

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]