idlize
1import {strict as assert} from 'assert';2
3import {toArray, toInt32} from "../unit_utils"4import {RuntimeType, Tags} from "@arkoala/arkui/SerializerBase"5import {Serializer} from "@arkoala/arkui/Serializer"6
7
8it('Should write LabelStyle undefined', function () {9let serializer = new Serializer(1)10serializer.writeLabelStyle(undefined)11assert.deepEqual(toArray(serializer), [Tags.UNDEFINED])12});13
14it('Should write LabelStyle maxLines: 10', function () {15let serializer = new Serializer(7)16let labelStyle: LabelStyle = {maxLines: 10}17serializer.writeLabelStyle(labelStyle)18assert.deepEqual(toArray(serializer), [Tags.OBJECT, RuntimeType.NUMBER, Tags.INT32, ...toInt32(10)])19});