quantities v0.8.0 (2018-01-04T08:41:50Z)
Home
Dub
Repo
CommonTests
tests
common_tests
Undocumented in source.
mixin template
CommonTests (
TestVariant
v
) {
import
std
.
math
:
approxEqual
;
;
static if
(
v == TestVariant.quantity
)
enum
meter
;
static if
(
v == TestVariant.quantity
)
enum
second
;
static if
(
v == TestVariant.quantity
)
enum
radian
;
static if
(!(
v == TestVariant.quantity
))
static if
(
v == TestVariant.qVariant
)
enum
meter
;
static if
(!(
v == TestVariant.quantity
))
static if
(
v == TestVariant.qVariant
)
enum
second
;
static if
(!(
v == TestVariant.quantity
))
static if
(
v == TestVariant.qVariant
)
enum
radian
;
static if
(!(
v == TestVariant.quantity
))
static if
(
v == TestVariant.qVariant
)
void
checkIncompatibleDimensions
(E expression, QVariant!double lhs, QVariant!double rhs);
static if
(!(
v == TestVariant.quantity
))
static if
(
v == TestVariant.qVariant
)
void
checkNotDimensionless
(E expression, QVariant!double operand);
alias
Length
=
typeof
(
meter
)
;
alias
Time
=
typeof
(
second
)
;
alias
Angle
=
typeof
(
radian
)
;
}
Members
Aliases
Angle
alias
Angle
=
typeof
(
radian
)
Undocumented in source.
Length
alias
Length
=
typeof
(
meter
)
Undocumented in source.
Time
alias
Time
=
typeof
(
second
)
Undocumented in source.
Functions
checkIncompatibleDimensions
void
checkIncompatibleDimensions
(E expression, QVariant!double lhs, QVariant!double rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
checkNotDimensionless
void
checkNotDimensionless
(E expression, QVariant!double operand)
Undocumented in source. Be warned that the author may not have intended to support it.
Manifest constants
meter
enum
meter
;
Undocumented in source.
meter
enum
meter
;
Undocumented in source.
radian
enum
radian
;
Undocumented in source.
radian
enum
radian
;
Undocumented in source.
second
enum
second
;
Undocumented in source.
second
enum
second
;
Undocumented in source.
Meta
Source
See Implementation
tests
common_tests
enums
TestVariant
mixins
__anonymous
mixin templates
CommonTests