LoginSignup
0
1

More than 5 years have passed since last update.

Rantly(property based testing tool)でテストデータ生成 - choose

Posted at

Rantly#choose で複数のデータからランダムに値を選択します

関連記事

tbpgr の rantly 関連記事

サンプル

Rantly(5){choose integer(5), string}
# => [-2, 5, "Jgc`sH", "AC}!~z", "y}Di53"]
Rantly(5){choose integer(5), string}
# => [1, "c(mHbo", 4, "6%KHBN", "f_]|tA"]
Rantly(5){choose 1, 'a', ('c'..'f')}
# => ["a", 1, "c".."f", 1, 1]
Rantly(5){choose 1, 'a', ('c'..'f')}
# => [1, "c".."f", "c".."f", "c".."f", "c".."f"]

外部資料

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1