Skip to content

Commit

Permalink
standard addition
Browse files Browse the repository at this point in the history
  • Loading branch information
erikerlandson committed Feb 19, 2023
1 parent 5cf1502 commit c4e67fd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions runtime/src/test/scala/coulomb/runtimequantity.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,24 @@ abstract class RuntimeQuantitySuite(using CoefficientRuntime)
(RuntimeQuantity(1d, RuntimeUnit.of[Meter])
+ RuntimeQuantity(1d, RuntimeUnit.of[Kilo * Meter]))
.assertR(RuntimeQuantity(1001d, RuntimeUnit.of[Meter]))

(RuntimeQuantity(1d, RuntimeUnit.of[Second])
+ RuntimeQuantity(1d, RuntimeUnit.of[Kilo * Meter])).assertL

assertCE("""
(RuntimeQuantity(1, RuntimeUnit.of[Meter])
+ RuntimeQuantity(1d, RuntimeUnit.of[Kilo * Meter]))
""")
}

test("addition standard") {
import coulomb.policy.standard.given
import coulomb.policy.overlay.runtime.standard.given

(RuntimeQuantity(1, RuntimeUnit.of[Meter])
+ RuntimeQuantity(1d, RuntimeUnit.of[Kilo * Meter]))
.assertR(RuntimeQuantity(1001d, RuntimeUnit.of[Meter]))

(RuntimeQuantity(1, RuntimeUnit.of[Second])
+ RuntimeQuantity(1d, RuntimeUnit.of[Kilo * Meter])).assertL
}

0 comments on commit c4e67fd

Please sign in to comment.