mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-21 06:05:45 +08:00
Fix invariant text and niagara types
This commit is contained in:
@@ -11,6 +11,7 @@ import GuidEntity from "../js/entity/GuidEntity.js"
|
||||
import IEntity from "../js/entity/IEntity.js"
|
||||
import Integer64Entity from "../js/entity/Integer64Entity.js"
|
||||
import IntegerEntity from "../js/entity/IntegerEntity.js"
|
||||
import InvariantTextEntity from "../js/entity/InvariantTextEntity.js"
|
||||
import KeyBindingEntity from "../js/entity/KeyBindingEntity.js"
|
||||
import LinearColorEntity from "../js/entity/LinearColorEntity.js"
|
||||
import MirroredEntity from "../js/entity/MirroredEntity.js"
|
||||
@@ -457,7 +458,7 @@ test("Integer64Entity", () => {
|
||||
})
|
||||
|
||||
test("IntegerEntity", () => {
|
||||
let grammar = IntegerEntity.grammar
|
||||
const grammar = IntegerEntity.grammar
|
||||
|
||||
let value = grammar.parse("0")
|
||||
expect(value).toBeInstanceOf(IntegerEntity)
|
||||
@@ -515,6 +516,19 @@ test("IntegerEntity", () => {
|
||||
expect(IntegerEntity.flagSerialized().grammar.parse("589").serialize()).toEqual(`"589"`)
|
||||
})
|
||||
|
||||
test("InvariantTextEntity", () => {
|
||||
const grammar = InvariantTextEntity.grammar
|
||||
|
||||
let value = grammar.parse('INVTEXT("NiagaraWildcard")')
|
||||
expect(value).toBeInstanceOf(InvariantTextEntity)
|
||||
expect(value).toEqual(new InvariantTextEntity("NiagaraWildcard"))
|
||||
expect(value.equals(new InvariantTextEntity("NiagaraWildcard"))).toBeTruthy()
|
||||
expect(value.equals(new InvariantTextEntity("Unrelated"))).toBeFalsy()
|
||||
expect(value.equals(new StringEntity("NiagaraWildcard"))).toBeFalsy()
|
||||
expect(value.toString()).toEqual("NiagaraWildcard")
|
||||
expect(value.serialize()).toEqual('INVTEXT("NiagaraWildcard")')
|
||||
})
|
||||
|
||||
test("KeyBindingEntity", () => {
|
||||
let grammar = KeyBindingEntity.grammar
|
||||
|
||||
|
||||
Reference in New Issue
Block a user