Commit Graph
53 Commits
Author SHA1 Message Date
Alexander Köplinger b0032294da [Test] Cleaned up how a bunch of tests were ignored
Previously, many tests just had a return statement when the test shouldn't
be executed (e.g. Unix-only). This made it look like the test was successful
when in fact it wasn't executed at all.
Assert.Ignore() is now used instead to correctly exclude those tests.
2014-02-23 19:44:21 +01:00
Zoltan Varga 5ac11eeecf Make the sorting done by MSCompatUnicodeTable stable. Fixes #1358. 2012-01-21 02:22:52 +01:00
Zoltan Varga bb218f4cde Ignore some corlib tests which fail on linux 2011-10-11 03:49:52 +02:00
Atsushi Eno 8277f4a527 Fix bug #687444, null-character handling is now closer and as illogical as .NET. 2011-04-14 21:11:10 +09:00
Sebastien Pouliot 3594bcce41 In Test/System.Globalization:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* CompareInfoTest.cs: Add test cases to validate parameters

In System.Globalization:
2009-10-29  Sebastien Pouliot  <[email protected]>

	* CompareInfo.cs: Add/fix CompareOptions validations. Reduce code
	duplication in Compare methods (wrt CompareOptions). Fix 
	calculation bug	in Compare(string,int.string,int,CompareOptions).


svn path=/trunk/mcs/; revision=145023
2009-10-29 14:11:53 +00:00
Zoltan Varga 227b251f89 2009-06-25 Zoltan Varga <[email protected]>
* *.cs: Convert all tests to new-style nunit classes/methods.

svn path=/trunk/mcs/; revision=136880
2009-06-25 20:16:53 +00:00
Atsushi Eno 28ac67adbc 2009-01-07 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : Fixed bug #462957. With empty target string it
	  should always return 0.

	* CompareInfoTest.cs : added test for #462957.


svn path=/trunk/mcs/; revision=122602
2009-01-07 02:43:34 +00:00
Atsushi Eno aa6d604fdd 2007-03-06 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : disable QuickCheckPossible(), which is
	  inaccurate and inefficient. Fixed bug #79714.

	* CompareInfoTest.cs : added test for bug #79714.


svn path=/trunk/mcs/; revision=73785
2007-03-06 06:52:49 +00:00
Miguel de Icaza 1d7f1bfb49 Tests
svn path=/trunk/mcs/; revision=73761
2007-03-05 21:31:28 +00:00
Atsushi Eno 2d8e7be1ee 2007-02-15 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : character filtering is needed for 
	  OrdinalIgnoreCase in 2.0 profile. Fixed bug #80865.

	* CompareInfoTest.cs : added test for bug #80865.


svn path=/trunk/mcs/; revision=72902
2007-02-15 11:44:26 +00:00
Atsushi Eno 17cd7585e6 2007-01-25 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : GetTailContraction() was broken to pick correct
	  contraction/special sortkey out and thus LastIndexOf() failed when 
	  it is involved. Fixed bug #80612.

	* CompareInfoTest.cs : added test for bug #80612.


svn path=/trunk/mcs/; revision=71632
2007-01-24 23:46:05 +00:00
Atsushi Eno 23b5a0661b 2007-01-22 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : for non-StringSort comparison, level5 (- and ')
	  should be still skipped after initial level5 check is done (while
	  they were simply treated as a normal character). Fixed bug #78748.
	* SortKeyBuffer.cs : Fixed NRE in french sort.

	* CompareInfoTest.cs : Added Compare() tests for hyphens.
	  Removed NotWorking from previous new test (its existence wasn't
	  even recognized until today).


svn path=/trunk/mcs/; revision=71436
2007-01-22 09:46:13 +00:00
Gert Driesen 3742294bba * CompareInfoTest.cs: Added test for checking valid CompareOptions for
GetSortKey.

svn path=/trunk/mcs/; revision=70883
2007-01-11 20:16:02 +00:00
Atsushi Eno 3064a0316d 2006-12-25 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : added IndexOf() implementation for Ordinal
	  and OrdinalIgnoreCase, though Ordinal version is not used (since
	  it is slower than icall).

	* CompareInfo.cs : for OrdinalIgnoreCase, IndexOf() and LastIndexOf()
	  will use managed version (icalls for them are case sensitive).
	  Removed MonoTODOs.

	* CompareInfoTest.cs : added tests for OrdinalIgnoreCase versions
	  of IndexOf() and LastIndexOf(). Added Ordinal LastIndexOf() tests.


svn path=/trunk/mcs/; revision=70037
2006-12-25 09:45:38 +00:00
Atsushi Eno 6fe325aede 2006-11-27 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : fixed wrong || with && for OrdinalIgnoreCase.
	  Fixed bug #80056.

	* CompareInfoTest.cs : why there was "return" before OrdinalIgnoreCase
	  tests ...


svn path=/trunk/mcs/; revision=68492
2006-11-27 03:41:18 +00:00
Atsushi Eno b10ca82b9e 2006-04-25 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : seems like Microsoft had introduced several
	  bugs in CompareInfo, so marked many of them as NotDotNet.


svn path=/trunk/mcs/; revision=59839
2006-04-25 09:27:29 +00:00
Atsushi Eno 2f7137543e 2005-12-05 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : split the last case in NullCharacter() out
	  and marked it as NotDotNet (.NET is inconsistent between Compare
	  and IndexOf).


svn path=/trunk/mcs/; revision=53920
2005-12-05 13:18:07 +00:00
Atsushi Eno d84c8c8508 2005-11-14 Atsushi Enomoto <[email protected]>
* MSCompatUnicodeTable.cs : (IsIgnorable) \0 is not ignorable.
          Fixed bug 76702.

        * CompareInfoTest.cs : added NullCharacter() for bug #76702.


svn path=/trunk/mcs/; revision=53034
2005-11-14 22:55:31 +00:00
Atsushi Eno 4a34097273 2005-11-14 Atsushi Enomoto <[email protected]>
* CompareInfo.cs : added support for OrdinalIgnoreCase.

	* CompareInfoTest.cs : added test for Compare() w/ OrdinalIgnoreCase.


svn path=/trunk/mcs/; revision=53004
2005-11-14 09:50:17 +00:00
Atsushi Eno ebe83beef3 2005-11-14 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs :
	  - Added CompareOrdinalIgnoreCase() for NET_2_0 RTM.
	  - Reduced extra parameter from LastIndexOfSortKey().
	  - LastIndexOf() should use GetTailContraction for the source string.
	    And then, target could match in the middle of the possible
	    "replacement contraction" of the source string, so use
	    LastIndexOfSortKey() to catch them.
	  - Fixed GetTailContraction() that caused index out of range.

	* CompareInfoTest.cs : added more tests for some specific cultures
	  (say, Japanese) that have replacement contraction in ASCII range
	  and caused incorrect results for LastIndexOf() and all dependent
	  members.


svn path=/trunk/mcs/; revision=53003
2005-11-14 09:28:29 +00:00
Atsushi Eno cc628222e2 2005-09-27 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : in CompareInternal(), there was a possibility of
	  infinite loop. Fixed bug #76243.

	* CompareInfoTest.cs : added testcase for bug #76243.


svn path=/trunk/mcs/; revision=50837
2005-09-27 10:25:34 +00:00
Atsushi Eno ca701aa247 2005-09-20 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : In IsPrefix/IsSuffix, if target is an empty string,
	  immediately return true.

	* CompareInfoTest.cs : added empty string cases for IsPrefix/IsSuffix.


svn path=/trunk/mcs/; revision=50283
2005-09-20 09:32:41 +00:00
Atsushi Eno 68eb6f2e29 2005-09-09 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : IsSuffix() optimization logic was buggy, so just
	  use pretty simple way with LastIndexOf() (no significant perf.
	  problem).

	* CompareInfoTest.cs : added another test for IsSuffix() that I found.


svn path=/trunk/mcs/; revision=49793
2005-09-09 10:28:18 +00:00
Atsushi Eno 36190bda16 2005-08-11 Atsushi Enomoto <[email protected]>
* CultureInfo.cs : lazy load OptionalCalendars (and always non-null).
	* DateTimeFormatInfo.cs : GetEraNames() should work.

	* CultureInfoTest.cs : added OptionalCalendars().
	* CompareInfoTest.cs : added possible bug test for checkedFlags 
	  optimization.


svn path=/trunk/mcs/; revision=48297
2005-08-11 18:51:01 +00:00
Atsushi Eno e7d856dfe0 2005-07-15 Atsushi Enomoto <[email protected]>
* create-mscompat-collation-table.cs : Fixed some Thai and Arabic
	  level 2 weight.

	* CompareInfoTest.cs : Some GetSortKey That tests got working.


svn path=/trunk/mcs/; revision=47334
2005-07-15 09:48:02 +00:00
Atsushi Eno 1175e17902 2005-07-15 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : rewrote LastIndexOf() to handle source extenders.
	  Some refactoring on IndexOf() code. Removed unused Matches().
	* Collation-notes.txt : some methods needed to be reimplemented, so
	  rewrote the description.

	* CompareInfoTest.cs : Uncommented tests that got working. Added two
	  cornercase notworking LastIndexOf() tests.


svn path=/trunk/mcs/; revision=47327
2005-07-15 05:37:18 +00:00
Atsushi Eno c5b35ab969 2005-07-14 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : rewrote IsSuffix() to use CompareInternal().
	  Thus supported extenders in IsSuffix().

	* CompareInfoTest.cs : IsSuffix() extender tests got working.


svn path=/trunk/mcs/; revision=47320
2005-07-14 18:55:07 +00:00
Atsushi Eno fa8a3fbffe 2005-07-14 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : more IsSuffix() simplification, but it will be
	  stopped here since it cannot handle extenders (implementing new
	  approach one).

	* CompareInfoTest.cs : added tests for IndexOf() and LastIndexOf()
	  with ignorable source character. Added some non-working tests.


svn path=/trunk/mcs/; revision=47319
2005-07-14 18:21:07 +00:00
Atsushi Eno 29d928b152 2005-07-14 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : Fixed IndexOf() and LasIndexOf() to search the
	  entire replacement string if char target was an expansion.
	  IsSuffix() was using a method for IsPrefix() which was incorrect.
	  Removed old IsPrefix() code.

	* CompareInfoTest.cs : added tests for IndexOf() and LastIndexOf()
	  that takes an expansion for target char.


svn path=/trunk/mcs/; revision=47304
2005-07-14 14:33:29 +00:00
Atsushi Eno 7218951c3e 2005-07-14 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : IndexOf() was incorrectly sharing the same
	  byte[] field in different areas of code. Now extenders in both
	  source and target really work in IndexOf().

	* CompareInfoTest.cs : removed some FIXMEs. Added more extender tests.


svn path=/trunk/mcs/; revision=47299
2005-07-14 11:57:19 +00:00
Atsushi Eno f998040757 2005-07-14 Atsushi Enomoto <[email protected]>
* create-mscompat-collation-table.cs : fixed U+FF9F diacritical weight.
	* SimpleCollator.cs : handle U+FF9E and U+FF9F as extenders.

	* CompareInfoTest.cs : some special weight tests got working.
	  Commented on some FIXME tests why they are so.


svn path=/trunk/mcs/; revision=47293
2005-07-14 08:12:53 +00:00
Atsushi Eno 11d558507a 2005-07-14 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : Now FilterExtender() handles all extender
	  support. IndexOf() and LastIndexOf() now supports extenders.
	  IndexOf() and LastIndexOf() did not proceed contraction source
	  length as expected. Tiny refactoring on private IsPrefix() to take
	  stringSort argument.

	* CompareInfoTest.cs : Added extender tests for GetSortKey(),
	  Compare(), IsPrefix(), IndexOf() and LastIndexOf().


svn path=/trunk/mcs/; revision=47292
2005-07-14 07:36:22 +00:00
Atsushi Eno a915b48be7 2005-07-13 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : when restoring from expansion, go back to the
	  top of the loop (to avoid index out of range).
	  Now IsPrefix() is implemented to reuse Compare() and thus it now
	  supports extender as well.
	* Collation-notes.txt : status update. Deleted optimization part in
	  status section (it is duplicate).

	* CompareInfoTest.cs : Added Compare() test that contains expansion.
	  Fixed CompareSpecialWeight() which was not testing what I intended.
	  Added IsPrefix() tests with special weight (copying Compare() tests)


svn path=/trunk/mcs/; revision=47280
2005-07-13 18:40:57 +00:00
Atsushi Eno fbf470258a 2005-07-13 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : Compare() now supports extender (e.g. U+39FC).

	* CompareInfoTest.cs : added CompareSpecialWeight() and moved special 
	  weight comparison there.


svn path=/trunk/mcs/; revision=47271
2005-07-13 16:09:19 +00:00
Atsushi Eno fcd8c18235 2005-07-13 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : In GetSortKey(), don't update previousChar when
	  it is not primary (e.g. don't "extend" diacritical mark).

	* CompareInfoTest.cs : added GetSortKey() testcase that tests a
	  sequence of nonprimary character followed by an extender.



svn path=/trunk/mcs/; revision=47269
2005-07-13 15:16:06 +00:00
Atsushi Eno 2111d415f4 2005-07-13 Atsushi Enomoto <[email protected]>
* managed-collation.patch : CompareInfo.Compare() should consider
	  the possibilities that non-empty string might be actually empty
	  in culture-sensitive context.

	* CompareInfoTest.cs : added more culture-sensitive "empty" test.


svn path=/trunk/mcs/; revision=47267
2005-07-13 14:08:59 +00:00
Atsushi Eno ae90babecc 2005-07-13 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : IndexOf() and LastIndexOf() returns start when
	  target is "empty" (in culture-sensitive context).

	* CompareInfoTest.cs : Test for IndexOf() and LastIndexOf() with
	  "empty" target (in culture-sensitive context).


svn path=/trunk/mcs/; revision=47266
2005-07-13 13:34:27 +00:00
Atsushi Eno 29d480c410 2005-07-13 Atsushi Enomoto <[email protected]>
* SimpleCollator.cs : In IndexOf() and LastIndexOf(), skip ignorable
	  characters in target string.

	* CompareInfoTest.cs : added ignorable character in target for
	  IsPrefix/IsSuffix/IndexOf/LastIndexOf methods.


svn path=/trunk/mcs/; revision=47265
2005-07-13 13:24:03 +00:00
Atsushi Eno 2f70262c0c 2005-07-13 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added more special weight testcases.


svn path=/trunk/mcs/; revision=47262
2005-07-13 12:05:53 +00:00
Atsushi Eno 9862e238f7 2005-07-13 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added Czech and Hungarian sorting tests.


svn path=/trunk/mcs/; revision=47257
2005-07-13 09:09:46 +00:00
Atsushi Eno e04b7a451b 2005-07-13 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added more diacritical tests.


svn path=/trunk/mcs/; revision=47256
2005-07-13 08:47:10 +00:00
Atsushi Eno 2886c7492c 2005-07-13 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added test for CJK mapping customization.


svn path=/trunk/mcs/; revision=47254
2005-07-13 06:52:13 +00:00
Atsushi Eno aa3e8ca88d 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added GetSortKey() test for Thai.


svn path=/trunk/mcs/; revision=47229
2005-07-12 15:52:58 +00:00
Atsushi Eno d4368b5c27 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added special weight GetSortKey() test.


svn path=/trunk/mcs/; revision=47226
2005-07-12 15:21:27 +00:00
Atsushi Eno af19cc4766 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added several GetSortKey() tests.


svn path=/trunk/mcs/; revision=47215
2005-07-12 14:33:35 +00:00
Atsushi Eno 447194a0ea 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added shift weight testcases. Commented one
	  French sort thingy out.


svn path=/trunk/mcs/; revision=47210
2005-07-12 13:59:33 +00:00
Atsushi Eno ca11aff194 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added another French testcase.


svn path=/trunk/mcs/; revision=47206
2005-07-12 12:46:27 +00:00
Atsushi Eno c50eb99731 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added LastIndexOf() contraction cases and more.


svn path=/trunk/mcs/; revision=47203
2005-07-12 12:12:58 +00:00
Atsushi Eno 1d9a12381d 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added tests for IsSuffix(),
	  IndexOf(string,string) and LastIndexOf(string,string).


svn path=/trunk/mcs/; revision=47202
2005-07-12 11:26:09 +00:00
Atsushi Eno 9a44daf4b3 2005-07-12 Atsushi Enomoto <[email protected]>
* CompareInfoTest.cs : added tests for IsPrefix() and optionally
	  Compare() (which is currently used inside IsPrefix() which is
	  however wrong when it comes to managed collation).


svn path=/trunk/mcs/; revision=47199
2005-07-12 10:49:05 +00:00