13 Commits
Author SHA1 Message Date
Alexander Köplinger 746650d1b9 [bcl] Remove more NET_2_0 checks from class libs 2015-01-17 05:45:39 +01:00
Alexander Köplinger d77664ceb0 [System] Add performanceCounters element to System.Diagnostics app.config configuration section
See http://msdn.microsoft.com/en-us/library/ms229387(v=vs.110).aspx for details about the element.
The value that is set by the element isn't currently used in Mono, but applications using it in their app.config crash otherwise (e.g. http://stackoverflow.com/questions/25741651).
2014-09-14 07:45:11 +02:00
Marek Safar f0ad346fb6 Mobile tests update 2013-02-22 21:41:19 +01:00
Gert Driesen d476d382cb * DiagnosticsConfigurationHandlerTest.cs: No longer derive from
deprecated Assertion class. Code formatting. On 2.0 profile, allow
non-integral values for switches.     
* BooleanSwitch.cs: Use base ctor for default value.
* Switch.cs: On 2.0 profile, store default value and use it if no
value is set in config file.
* SourceSwitch.cs: Use null to signal that there's no default value.

svn path=/trunk/mcs/; revision=86220
2007-09-22 17:54:03 +00:00
Atsushi Eno 1428fe4b97 2007-05-14 Atsushi Enomoto <[email protected]>
* EventTypeFilter.cs
	  TraceFilter.cs
	  SourceFilter.cs
	  SwitchLevelAttribute.cs
	  DelimitedListTraceListener.cs
	  SwitchAttribute.cs : new files in 2.0.
	* DiagnosticsConfigurationHandler.cs : partial support for named
	  shared listeners.
	* XmlWriterTraceListener.cs : cosmetic corcompare fixes. Added
	  missing todos.
	* TraceListener.cs : added missing 2.0 stuff. Implemented Filter.
	* DefaultTraceListener.cs : trivial ComVisible fix.

	* DiagnosticsConfigurationHandlerTest.cs : in 2.0 configuration item
	  listeners/add/@type is optional (for named shared listener support).

	* System.dll.sources :
	  Added EventTypeFilter.cs, TraceFilter.cs, SourceFilter.cs, 
	  DelimitedListTraceListener.cs, SwitchAttribute.cs and
	  SwitchLevelAttribute.cs in sys.diagnostics.


svn path=/trunk/mcs/; revision=77331
2007-05-14 08:02:36 +00:00
Jonathan Pryor 998e1fc3c9 Implement the .NET 1.1 requirement that the
/system.diagnostics/switch/add/@value attribute only contain numeric data and 
some other fixes (thread-safety in the Debug- and Trace-related classes).

  * System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
    (DiagnosticsConfiguration): Don't read the .config file from the 
    static ctor (again), as if it fails we'll get a TypeLoadException -- bad!       Instead, lazy-read the .config file.
  * System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
    (DiagnosticsConfigurationHandler): Require that the /switch/add/@value 
    attribute contains only numeric values.
  * System/System.Diagnostics/DiagnosticsConfigurationHandler.cs: 
  * System/System.Diagnostics/TraceImpl.cs: Don't initialize everything in 
    the static ctor, as if it fails (due to an invalid .confg file) we get a 
    TypeLoadException, while .NET generates a ConfigurationException.  
    Instead, initialize everything the first time the Listeners property is 
    accessed, which allows the static ctor to run without chance of failure, 
    avoiding the TypeLoadException.
  * System/System.Diagnostics/TraceListenerCollection.cs: This should be 
    thread-safe, as it's accessible from a static member of TraceImpl 
    (available through the public Debug and Trace classes).
  * System/System.Diagnostics/Switch.cs: Leave the original switch value alone.
    If it isn't valid (i.e. numeric), the DiagnosticsConfigurationHandler 
    will catch it.
  * System/Test/test-config-file: Remove "string-value" switch, as it causes 
    ConfigurationExceptions under .NET 1.1 (the value attribute can't be 
    non-numeric), and Mono now follows this behavior.  Add a "custom-switch" 
    value, which is used in the regression tests.
  * System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs: 
    .NET 1.1 requires that the value attribute be a numeric value; check for 
    that and update the success test so that they'll actually pass.
  * System/Test/System.Diagnostics/SwitchesTest.cs: TestNewSwitch reads 
    "custom-switch" now, and the switches value is now "42", not "0".  
    Remove warning about unused variable.


svn path=/trunk/mcs/; revision=39090
2005-01-18 13:25:34 +00:00
Jonathan Pryor 9af2dd51ca Bring unit tests & mono up-to-date with .NET 1.1. The <system.diagnostics/>
configuration element /switches/add/@value attribute is now *required*, not
optional (as it was under .NET 1.0).

* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs:
  The /switch/add/@value attribute isn't optional under .NET 1.1, so make 
  sure it exists.

* System/Test/test-config-file: Remove <add/> elements lacking a value 
  attribute.  .NET 1.1 doesn't support this anymore, and neither does Mono.

* System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs:
  .NET 1.1 doesn't permit <add/> elements without a value attribute.  
  Assert the same under Mono.


svn path=/trunk/mcs/; revision=39046
2005-01-17 20:42:06 +00:00
Jonathan Pryor a6549c0535 * DiagnosticsConfigurationHandlerTest.cs: Don't ignore tests, instead mark
them as [Category ("NotDotNet")]; Fix the TraceTag_Listeners example (it
    was passing invalid XML in a "valid" test).

svn path=/trunk/mcs/; revision=39042
2005-01-17 20:10:41 +00:00
Nick Drochak a797c7a10e 2004-02-05 Nick Drochak <[email protected]>
* DiagnosticsConfigurationHandlerTest.cs: Ignore tests using classes not
        meant to be used directly.

svn path=/trunk/mcs/; revision=22792
2004-02-05 13:35:41 +00:00
Nick Drochak 2362fd4b8c 2003-12-30 Nick Drochak <[email protected]>
* DiagnosticsConfigurationHandlerTest.cs: Inherit from Assertion to
	make it a bit simpler.
	* SwitchesTest.cs: Make the tests pass on .NET 1.1

svn path=/trunk/mcs/; revision=21551
2003-12-30 10:52:46 +00:00
Nick Drochak d3ca64a84d 2003/03/25 Nick Drochak <[email protected]>
* DiagnosticsConfigurationHandlerTest.cs: Fix compiler warnings

svn path=/trunk/mcs/; revision=12808
2003-03-25 08:37:23 +00:00
Martin Willemoes Hansen 2320c1fddc * Removed: Old AllTests.cs files
* NUnit20ified the tests.

svn path=/trunk/mcs/; revision=12666
2003-03-18 21:45:41 +00:00
Jonathan Pryor 2571837c88 New/Updated test cases. Fixed TraceTest so that it isn't causing test
failures anymore.  Added SwitchesTest (to test switches) and
DiagnosticsConfigurationHandler to test .config file handling.

Issues: while the DiagnosticsConfigurationHandlerTest is reasonably
self-contained, SwitchesTest is not.  To properly test switches, we need a
.exe and a .exe.config file.  The needed .exe.config file that SwitchesTest
depends on is present in `test-config-file', but I'm unsure where to place it
(much less what to name it).

Additionally, SwitchesTest generates test failures at this time, principally
because of the lack of .config file support in the test system.

Finally, makefile.gnu & system_linux_test.args was changed to use the newly
added tests and to reference System.Xml.dll, which is used by
DiagnosticsConfigurationHandlerTest.

svn path=/trunk/mcs/; revision=9807
2002-12-21 03:50:07 +00:00