incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Omar Gonzalez <omarg.develo...@gmail.com>
Subject Re: Spark StringValidator
Date Wed, 18 Jan 2012 01:22:11 GMT
Do you have any unit tests set up that replicate the issue?

I set up some really basic tests to see if I could get a failed test but
perhaps I'm not understanding the bug correctly, below are the tests I ran
(just a few quickies) but none of them failed.

package flexUnitTests

{

import org.flexunit.asserts.assertEquals;

import org.flexunit.asserts.fail;


 public class StringTests

{


 [Test]

 public function length_arabicString_lengthShouldReturnEight():void

 {

 var arabic:String = "الأربعاء";


  assertEquals(8, arabic.length);

 }


 [Test]

 public function length_chineseString_lengthShouldReturnTwentyNine():void

 {

 var chinese:String = "Here is some arabic: الأربعاء";


  assertEquals(29, chinese.length);

 }


 [Test]

 public function length_japaneseString_lengthShouldReturnTen():void

 {

 var japanese:String = "一二三四五六七八九〇";


  assertEquals(10, japanese.length);

 }


 [Test]

 public function length_spanishString_lengthShouldReturnSeventeen():void

 {

 var spanish:String = "la niña usa una ñ";


  assertEquals(17, spanish.length);

 }


 [Test]

 public function length_chineseString_lengthShouldReturnThree():void

 {

 var chinese:String = "假借字";


  assertEquals(3, chinese.length);

 }


 [Test]

 public function length_chineseString_lengthShouldReturnNine():void

 {

 var chinese:String = "假借字形声字形聲字";


  assertEquals(9, chinese.length);

 }


 [Test]

 public function length_chineseString_lengthShouldReturnThirteen():void

 {

 var chinese:String = "假借字 形声字 / 形聲字";


  assertEquals(13, chinese.length);

 }


 [Test]

 public function length_chineseString_lengthShouldReturnThirtyFive():void

 {

 var chinese:String = "Here is some chinese: 假借字 形声字 / 形聲字";


  assertEquals(35, chinese.length);

 }

}

}



-omar

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message