remove unit evaluation test
We provide no implementation
This commit is contained in:
parent
08c73ac22f
commit
a386eee570
|
@ -217,8 +217,4 @@ describe("Peggy to Expression", () => {
|
|||
(),
|
||||
)
|
||||
})
|
||||
|
||||
describe("unit", () => {
|
||||
testToExpression("1m", "(:$$_block_$$ (:multiply 1 (:$valueOfUnit 'm')))", ~v="1", ())
|
||||
})
|
||||
})
|
||||
|
|
|
@ -129,23 +129,6 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce
|
|||
)
|
||||
}
|
||||
|
||||
let doValueOfUnit = (aUnit: string) =>
|
||||
switch aUnit {
|
||||
| "nm" => 0.000000001->EvNumber->Ok
|
||||
| "um" => 0.000001->EvNumber->Ok
|
||||
| "mm" => 0.001->EvNumber->Ok
|
||||
| "cm" => 0.01->EvNumber->Ok
|
||||
| "dm" => 0.1->EvNumber->Ok
|
||||
| "m" => 1.->EvNumber->Ok
|
||||
| "dam" => 10.->EvNumber->Ok
|
||||
| "hm" => 100.->EvNumber->Ok
|
||||
| "km" => 1000.->EvNumber->Ok
|
||||
| "Mm" => 1000000.->EvNumber->Ok
|
||||
| "Gm" => 1000000000.->EvNumber->Ok
|
||||
| "Tm" => 1000000000000.->EvNumber->Ok
|
||||
| _ => REUnitNotFound(aUnit)->Error
|
||||
}
|
||||
|
||||
switch call {
|
||||
| ("$_atIndex_$", [EvArray(aValueArray), EvNumber(fIndex)]) => arrayAtIndex(aValueArray, fIndex)
|
||||
| ("$_atIndex_$", [EvRecord(dict), EvString(sIndex)]) => recordAtIndex(dict, sIndex)
|
||||
|
@ -154,7 +137,6 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce
|
|||
| ("$_exportBindings_$", [EvRecord(externalBindings)]) => doExportBindings(externalBindings)
|
||||
| ("$_setBindings_$", [EvRecord(externalBindings), EvSymbol(symbol), value]) =>
|
||||
doSetBindings(externalBindings, symbol, value)
|
||||
| ("$valueOfUnit", [EvString(aUnit)]) => doValueOfUnit(aUnit)
|
||||
| ("inspect", [value, EvString(label)]) => inspectLabel(value, label)
|
||||
| ("inspect", [value]) => inspect(value)
|
||||
| ("keep", [EvArray(aValueArray), EvLambda(aLambdaValue)]) =>
|
||||
|
|
Loading…
Reference in New Issue
Block a user