Commit Graph
34 Commits
Author SHA1 Message Date
Carlos Alberto Cortez 61a51b524e 2010-07-07 Carlos Alberto Cortez <[email protected]>
* ResourceWriterTest.cs: In our new AddResource_Stream_Default test
	store the resource file under Test/resources/, instead of the base
	dir, so we avoid filling the dir with not needed files.


svn path=/trunk/mcs/; revision=159992
2010-07-07 11:12:34 +00:00
Carlos Alberto Cortez 7e8bee4848 2010-07-05 Carlos Alberto Cortez <[email protected]>
* ResourceWriterTest.cs: New tests for our new 4.0 AddResource
	overloads.


svn path=/trunk/mcs/; revision=159931
2010-07-06 01:12:10 +00:00
Gonzalo Paniagua Javier 643661a1fe 2008-10-27 Gonzalo Paniagua Javier <[email protected]>
* ResourceReaderTest.cs: use the current directory to locate the
	resources.


svn path=/trunk/mcs/; revision=117205
2008-10-27 21:23:17 +00:00
Gert Driesen 9c2eeebe7e * ResourceManager.cs: Default to RuntimeResourceSet for all ctors.
* ResourceSet.cs: Avoid duplicate argument checks. On 2.0 profile,
throw ObjectDisposedException when ResourceSet is disposed.
* RuntimeResourceSet.cs: On 2.0 profile, throw ObjectDisposedException
when ResourceSet is disposed.
* ResourceManagerTest.cs: Enabled and added ResourceSetType asserts.
Added test for disposed ResourceSet. Avoid using ExpectedException.
* ResourceSetTest.cs: Improved tests for ctor argument checks. Avoid
using ExpectedException.

svn path=/trunk/mcs/; revision=98387
2008-03-15 12:41:37 +00:00
Sebastien Pouliot 8d9c1b77bb 2008-03-04 Sebastien Pouliot <[email protected]>
* ResourceManagerTest.cs: Add test case for ResourceSetType which 
	shows that an internal type, not the basic ResourceSet, is being used
	* ResourceSetTest.cs: New. Unit tests for ResourceSet


svn path=/trunk/mcs/; revision=97300
2008-03-04 13:47:20 +00:00
Gert Driesen a0400ec347 * ResourceWriter.cs: On 2.0 profile, do not mistakenly identify an
enum as a predefined type. Fixes bug #325223.
* ResourceWriterTest.cs: Enabled test for writing enum value on 2.0
profile.

svn path=/trunk/mcs/; revision=94016
2008-01-26 19:53:48 +00:00
Gert Driesen d5dc02f026 * ResourceWriterTest.cs: Added ctor tests. Added tests for AddResource
overloads. Added test for argument null checks. Added test for bug
#339074. Added test for invoking Generate () multiple times.
* ResourceWriter.cs: On 2.0 profile, use case-insensitive SortedList. 
Changed exception messages and params to match MS. Allow null values 
in AddResource overloads. In Dispose (bool), also generate resources
(header) if no resources were added. Fixes bug #339074. When Generate
is done, reset resources to null to prevent further editing.  This      
also avoids the need for a separate bool to indicate whether generate
was already invoked. Code formatting.

svn path=/trunk/mcs/; revision=89412
2007-11-10 19:10:06 +00:00
Gert Driesen 23d32e135d * ResourceManager.cs: Removed temporary workaround for bug #43567.
Reworked basename to only throw ArgumentException if resource with
name ending on ".resources" does not actually exist. Fixes bug      
#336283. Do not throw exception in GetStream since this is already
done in InternalGetResourceSet. In InternalGetResourceSet, do not
throw MissingManifestResourceException when culture is null. Fixed
MissingManifestResourceException message to match MS. When using
file-based ResourceManager, then also throw an exception when file 
does not exist for neutral culture.
* ResourceManager.cs: Added tests for null argument checks. Added test
for GetStream with resource file that does not exist.

svn path=/trunk/mcs/; revision=88308
2007-10-27 15:32:24 +00:00
Gert Driesen 53fbc5fb1a * ResourceManager.cs: BaseName(Field) should return only the name.
Added resourceSource field to store the actual type, which we need for
the namespace. Added CheckBaseName method to avoid code duplication.
Only check whether basename does not end in '.resources' on 1.0 
profile. Fixed paramname of ArgumentNullExceptions to match MS.
Modified GetManifestResourceStreamNoCase to use resourceSource field
to construct manifest resource name. Modified GetStream to use   
CurrentUICulture when culture is null. Fixed InternalGetResourceSet
to use invariant resources when culture is the neutral culture.
Code formatting.
* ResourceManagerTest.cs: Restore the original UI Culture on TearDown.
Added ctor tests. Added tests for CreateFileBasedResourceManager.
Added tests for GetObject, GetString and GetResourceFileName.
Improved tests for GetStream. Added test for IgnoreCase.

svn path=/trunk/mcs/; revision=85866
2007-09-17 10:38:08 +00:00
Gert Driesen 462b69a5e5 * ResourceManagerTest.cs: Improved existing tests. Ensure all resources
are released. Fixes test failures on Windows.
* ResourceWriterTest.cs: Added test for bug #82566.
* ResourceReaderTest.cs: Improved existing tests. Ensure all resources
are released. Fixed test failures on Windows.

svn path=/trunk/mcs/; revision=84800
2007-08-24 11:25:36 +00:00
Atsushi Eno df8743aab1 2007-08-09 Atsushi Enomoto <[email protected]>
* ResourceReader.cs : implemented GetResourceData(). Resources with
	  unresolvable types could still be parsed, so hold type names
	  instead of types.

	* ResourceReaderTest.cs : added tests for GetResourceData()


svn path=/trunk/mcs/; revision=83761
2007-08-09 15:10:58 +00:00
Rodrigo Kumpera 00bbd829ec 2007-07-16 Rodrigo Kumpera <[email protected]>
* ResourceReaderTest.cs:  new test, related to 2.0 bug of #81757


svn path=/trunk/mcs/; revision=82065
2007-07-16 23:25:00 +00:00
Atsushi Eno 41aa2767b5 2007-05-28 Atsushi Enomoto <[email protected]>
* ResourceWriter.cs : fix for runtime serialization type index.
	  Fixed bug #81759.

	* ResourceWriterTest.cs : new test, contains one for bug #81759.

	* corlib_test.dll.sources : added ResourceWriterTest.cs.


svn path=/trunk/mcs/; revision=78069
2007-05-28 16:02:23 +00:00
Atsushi Eno c98ee48759 2007-05-28 Atsushi Enomoto <[email protected]>
* IResourceWriter.cs NeutralResourcesLanguageAttribute.cs
	  SatelliteContractVersionAttribute.cs ResourceManager.cs
	  IResourceReader.cs ResourceSet.cs ResourceWriter.cs
	  ResourceReader.cs UltimateResourceFallbackLocation.cs
	  MissingManifestResourceException.cs :
	  implemented 2.0 resource support (write, and remaining read bits)
	  and GetStream(). Cosmetic attributes fixes.

	* UnmanagedMemoryStream.cs : added Closed event for sys.Resources use.
	* IntPtrStream.cs : added internal get_BaseAddress(), for the same.

	* ResourceManagerTest.cs : added tests for GetStream() (including
	  2.0 resource format tests).


svn path=/trunk/mcs/; revision=78024
2007-05-28 03:35:21 +00:00
Alexander Olk b760252ba4 2006-12-30 Alexander Olk <[email protected]>
* ResourceManagerTest.cs: add one new test and remove NotWorking.
	  All tests pass now.


svn path=/trunk/mcs/; revision=70272
2006-12-30 21:54:03 +00:00
Gert Driesen 209ed36ee8 * ResourceReader.cs: Support reading byte arrays in v2 resource files.
Patch provided by Red Forks. Fixes bug #79976.
* ResourceReaderTest.cs: Added test for reading byte array.
No longer derive from Assertion class.

svn path=/trunk/mcs/; revision=70246
2006-12-29 23:40:46 +00:00
Chris Toshok 3b605b1184 2006-10-09 Chris Toshok <[email protected]>
* ResourceManagerTest.cs: add some (NotWorking) tests for
	ResurceManager.


svn path=/trunk/mcs/; revision=66484
2006-10-09 22:41:14 +00:00
Robert Jordan 8f501dfb59 2006-03-14 Robert Jordan <[email protected]>
* ResourceManagerTest.cs: Reactivated tests. eol-style.


svn path=/trunk/mcs/; revision=57938
2006-03-14 02:13:36 +00:00
Robert Jordan 91844ccc0d 2006-01-13 Robert Jordan <[email protected]>
* ResourceManagerTest.cs: New. Unit tests for ResourceManager.
	See bug #77242.


svn path=/trunk/mcs/; revision=55572
2006-01-14 10:14:01 +00:00
Sebastien Pouliot bab00bc333 2005-03-31 Sebastien Pouliot <[email protected]>
* ResourceReaderCas.cs: New. CAS unit tests for ResourceReader.
	* ResourceReaderTest.cs: Changed filename to internal so the "normal" 
	tests case can be reused, with partial trust, by the CAS tests. 
	* ResourceSetCas.cs: : New. CAS unit tests for ResourceSet.


svn path=/trunk/mcs/; revision=42423
2005-03-31 13:44:03 +00:00
Nick Drochak efc05fdfee 2005-01-28 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Not sure about a zero-byte length file.

svn path=/trunk/mcs/; revision=39702
2005-01-28 14:26:18 +00:00
Nick Drochak 75e9c31865 2004-08-29 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Make tests pass (correct path to resources)
	on MS.NET 1.1.

svn path=/trunk/mcs/; revision=32978
2004-08-29 04:43:19 +00:00
Sebastien Pouliot 8eef9e5f2a 2004-06-14 Sebastien Pouliot <[email protected]>
* ResourceReaderTest.cs: Un-ignored an old test case (probably fixed a
	long time ago). Converted tests to NUnit 2.x format to be more
	specific when checking exceptions.

svn path=/trunk/mcs/; revision=29530
2004-06-14 17:43:17 +00:00
Jackson Harper 74e543f3fe * ResourceReaderTest.cs: Make work on windows.
svn path=/trunk/mcs/; revision=23463
2004-02-25 19:47:18 +00:00
Jackson Harper e416c58812 * ResourceReaderTest.cs: Add a little logic for finding
resources. This works on MS and with mono and fixes these tests
	for 'make run-test'.

svn path=/trunk/mcs/; revision=23203
2004-02-18 09:34:01 +00:00
Nick Drochak 1fd297c00e 2003-06-23 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Put it back the way it was, doesn't work on
	.NET, and it works fine on both if you cd to the proper dir before
	running these tests.

svn path=/trunk/mcs/; revision=15564
2003-06-23 07:00:57 +00:00
Nick Drochak d30d8f7499 2003-06-16 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Help tests find input files.

svn path=/trunk/mcs/; revision=15435
2003-06-16 14:33:32 +00:00
Nick Drochak 7d3b0290b8 2003-01-28 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Ignore part of a test that hangs mono.

svn path=/trunk/mcs/; revision=10970
2003-01-28 09:43:32 +00:00
Nick Drochak 99a25b98bd 2002-12-21 Nick Drochak <[email protected]>
* all: make tests build and run under nunit2

svn path=/trunk/mcs/; revision=9817
2002-12-21 14:15:43 +00:00
Nick Drochak fbd0afaee0 2002/06/14 Nick Drochak <[email protected]>
* AllTests.cs: Disable ResourceReaderTest for now.  The class is not
	ready yet.

svn path=/trunk/mcs/; revision=5274
2002-06-13 22:05:33 +00:00
Nick Drochak 7f1ba5396a 2002-05-22 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Fix path name to resource files (again).

svn path=/trunk/mcs/; revision=4822
2002-05-21 11:30:08 +00:00
Nick Drochak 41902a9e5d 2002-02-09 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Fix path name to resource files

svn path=/trunk/mcs/; revision=2274
2002-02-08 21:25:31 +00:00
Nick Drochak a21d08a5e5 2002-01-25 Nick Drochak <[email protected]>
* AllTests.cs:
	* Empty.resources:
	* MyResources.resources: Added files
	* ResourceReaderTest.cs: Test the enumerator

svn path=/trunk/mcs/; revision=2160
2002-01-25 10:57:34 +00:00
Nick Drochak 213ad095f6 2002-01-24 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Add new file. This test is not done yet.
        Wanted to save it in cvs for 'disaster recovery' purposes.
        Just in case.

svn path=/trunk/mcs/; revision=2129
2002-01-23 19:31:48 +00:00