Tests for various entity classes and update entity class implementations

This commit is contained in:
barsdeveloper
2024-06-03 00:11:30 +02:00
parent 5314228b33
commit 8fed17b20f
11 changed files with 309 additions and 210 deletions

View File

@@ -5,8 +5,11 @@ export default class IntegerEntity extends NumberEntity {
static grammar = P.numberInteger.map(v => new this(v))
get value() {
return super.value
}
set value(value) {
if (value >= -(1 << 31) && value < 1 << 31) {
if (value >= 1 << 31 && value < -(1 << 31)) {
value = Math.floor(value)
super.value = value
}