Skip to content

Commit 221465a

Browse files
Merge remote-tracking branch 'dumganhar/new-labeltest'
2 parents e09de03 + ac41041 commit 221465a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/LabelTest/LabelTest.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,13 @@ var LabelTTFChinese = AtlasDemo.extend({
874874
this._super();
875875
var size = director.getWinSize();
876876
var label = cc.LabelTTF.create("中国", "Microsoft Yahei", 30);
877-
label.setPosition(cc.p(size.width / 2, size.height / 2));
877+
label.setPosition(cc.p(size.width / 2, size.height / 3 * 2));
878878
this.addChild(label);
879+
880+
// Test UTF8 string from native to jsval.
881+
var label2 = cc.LabelTTF.create("string from native:"+label.getString(), "Microsoft Yahei", 30);
882+
label2.setPosition(cc.p(size.width / 2, size.height / 3));
883+
this.addChild(label2);
879884
},
880885
title:function () {
881886
return "Testing cc.LabelTTF with Chinese character";

0 commit comments

Comments
 (0)