Fixes #4520, added gigapascal to pressure units to fix broken unit (#4522)

* fixed overtriggering in Game2048

* Added two more tests to help fix issue #4473

* Added regex guard in handle function to fix #4473.

* modified regex guard for #4473

* Added a test to t/Game2048.t

* Removed trailing comma.

* Conversions: Added Gigapascal to pressure units #4520

* Update Conversions.t

* Update Conversions.t

* Added test for Gbar for conversions goodie
master
Rohit Upadhyay 2018-01-30 09:05:54 +05:30 committed by Zaahir Moolla
parent 0e25ddf3e5
commit 9c5af71177
2 changed files with 18 additions and 1 deletions

View File

@ -587,7 +587,8 @@ DDH.conversions = DDH.conversions || {};
{ symbol: 'dbar', name: 'Decibar' },
{ symbol: 'kbar', name: 'Kilobar' },
{ symbol: 'Mbar', name: 'Megabar' },
{ symbol: 'Gbar', name: 'Gigabar' }
{ symbol: 'Gbar', name: 'Gigabar' },
{ symbol: 'GPa', name: 'Gigapascal' },
],
defaults: ['Pa', 'psi']
},

View File

@ -536,6 +536,22 @@ ddg_goodie_test(
physical_quantity => 'pressure'
})
),
'1 gpa to megapascal' => test_zci(
'', structured_answer => make_answer({
raw_input => '1',
from_unit => 'GPa',
to_unit => 'MPa',
physical_quantity => 'pressure'
})
),
'1 gpa to gbar' => test_zci(
'', structured_answer => make_answer({
raw_input => '1',
from_unit => 'GPa',
to_unit => 'Gbar',
physical_quantity => 'pressure'
})
),
# DURATION
'36 months to years' => test_zci(
'', structured_answer => make_answer({