>ceedling gcov:all
でエラーが出た。Ruby2.6以降で ERB.newの引数仕様が変わっているのでエラーになる。
C:\Ruby31-x64\lib\ruby\gems\3.1.0\gems\ceedling-0.31.1\lib\ceedling\plugin_reportinator_helper.rb 47行目を変更すると解消できる。
47 - output = ERB.new(template, 0, "%<>") 47 + output = ERB.new(template, trim_mode:"%<>");
パラメータは名称指定で与えるようだ。
変更後には safe_level が無いが、別で管理するから指定するなと言うことらしい。
前の記事と同様に下記のようにすれば両対応できるものと思われ。
if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ output = ERB.new(template, trim_mode:"%<>"); else output = ERB.new(template, 0, "%<>") end
Rubyでgemのバージョンを知る
引数に list をつけて、grepで抽出する。
$ gem list | grep ceed
ceedling (0.31.1)
Ruby2.6でERB.newの仕様が変更されたのでワーニングがでるケースがある。
例えば generate_test_runner.rb:344 からを下記のようにすれば両対応可能。
if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ template = ERB.new(File.read(File.join(__dir__, 'run_test.erb')), trim_mode:'<>') else template = ERB.new(File.read(File.join(__dir__, 'run_test.erb')), nil, '<>') end
ceedlingの付属スクリプトでも同様。
Unityを使うときは数値計算用ライブラリもリンクする必要がある。もし無いとリンク時に __FDClassが見つからないとエラーが出る。
ルネサスCCRXでe2Studioの場合は、下記のようにLibrary Generatorでmath.hを選択する。