spec/spec_helper.rb in optimus-ep-0.5 vs spec/spec_helper.rb in optimus-ep-0.5.5
- old
+ new
@@ -35,11 +35,13 @@
:mul => ["2*4", lambda { 2*4 }],
:add_neg => ["4 + -5", lambda { 4 + -5 }],
:add_mul_group => ["4*(3+2)", lambda { 4*(3+2) }],
:fdiv => ["9/2.0", lambda { 9/2.0 }],
:fmul => ["0.44*10", lambda { 0.44*10 }],
- :mod => ["10 % 4", lambda { 10 % 4}]
+ :mod => ["10 % 4", lambda { 10 % 4}],
+ :str_const => ["foo", lambda { "foo" }],
+ :str_cat => ["a + a", lambda { "aa" }]
}
COMP_EXPRS = {
'stim_offset' => '{stim_time} - {run_start}',
'stim_offset_s' => '{stim_offset}/1000'
@@ -65,26 +67,32 @@
def mock_edata
data = Eprime::Data.new()
row = data.add_row
row['stim_time'] = '3188'
row['run_start'] = '2400'
+ row['fix_time'] = '2803'
row = data.add_row
row['stim_time'] = '4515'
row['run_start'] = '2400'
+ row['fix_time'] = '3910'
row['sparse'] = '20'
row = data.add_row
row['stim_time'] = '6515'
row['run_start'] = '2400'
+ row['fix_time'] = '6096'
row = data.add_row
row['stim_time'] = '8115'
row['run_start'] = '2400'
+ row['fix_time'] = '7777'
row['sparse'] = '50'
row = data.add_row
row['stim_time'] = '9815'
row['run_start'] = '2400'
+ row['fix_time'] = '9414'
row = data.add_row
row['stim_time'] = '12515'
row['run_start'] = '2800'
+ row['fix_time'] = '12014'
return data
end
def es(sym)
CONST_EXPRS[sym][0]
\ No newline at end of file