Compare commits

...
Author SHA1 Message Date
nobody 39c87c56fb This commit was manufactured by cvs2svn to create tag 'MCS_0_95'.
svn path=/tags/MCS_0_95/mcs/; revision=28626
2004-06-01 13:30:40 +00:00
nobody 4e4824afab This commit was manufactured by cvs2svn to create branch 'SAVANNAH_CVS'.
svn path=/branches/SAVANNAH_CVS/mcs/; revision=6844
2002-08-21 10:08:33 +00:00
59 changed files with 156 additions and 505 deletions

No files matched your search

-7
View File
@@ -1,10 +1,3 @@
2004-06-01 Raja R Harinath <[email protected]>
* Makefile.am (bootstrap,faststrap,fasterstrap): Refactor.
Fix 'faststrap' to be corlib-version-change-safe.
(one-stage-strap,two-stage-strap,three-stage-strap): Remove.
(monolite-bootstrap): Update.
2004-05-31 Gonzalo Paniagua Javier <[email protected]>
* configure.in: fixlets for windows.
+64 -55
View File
@@ -17,16 +17,16 @@ endif
DISTCLEANFILES= mono.pc mint.pc
#
# The following targets are used to compile and install
# The following target is used to compile and install
# mono and mcs without running into the out-of-sync
# problems by doing the compilation in the right order.
#
mcs_topdir=$(top_srcdir)/../mcs
.PHONY: bootstrap faststrap fasterstrap bootstrap-clean bootstrap-check get-monolite-latest monolite-bootstrap
.PHONY: tmpinst-dir tmpinst-mcs-basic-build tmpinst-mcs-short-build tmpinst-mcs-full-build tmpinst-monolite
.PHONY: mono-do-runtime-only mcs-do-basic-build mcs-do-short-build mcs-do-full-build mcs-do-clean-profiles mcs-do-run-test
.PHONY: tmpinst-dir tmpinst-basic-build tmpinst-short-build tmpinst-full-build
.PHONY: bootstrap faststrap fasterstrap one-stage-strap two-stage-strap three-stage-strap bootstrap-clean bootstrap-check
.PHONY: mono-do-basic-build mcs-do-basic-build mcs-do-short-build mcs-do-full-build mcs-do-clean-profiles mcs-do-run-test
if USE_JIT
mono_runtime = mono/mini/mono
@@ -34,78 +34,69 @@ else
mono_runtime = mono/interpreter/mint
endif
# Minimal set of directories to build, and files used to run the 'mcs' compiler
MCS_BASIC_DIRS = jay mcs class/corlib class/System
MCS_BASIC_FILES = \
$(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll
bootstrap: three-stage-strap
# Set of directories and files the 'mcs' compiler can use
## We build class/System twice to resolve the cyclic dependency of class/System.XML
MCS_DIRS = $(MCS_BASIC_DIRS) class/System.XML class/System class/Mono.CSharp.Debugger
MCS_FILES = $(MCS_BASIC_FILES) \
$(mcs_topdir)/class/lib/default/System.Xml.dll \
$(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll
faststrap: mono-do-basic-build
$(MAKE) two-stage-strap
bootstrap: tmpinst-mcs-basic-build mono-do-runtime-only
$(MAKE) tmpinst-mcs-short-build
$(MAKE) fasterstrap
fasterstrap: mono-do-basic-build
$(MAKE) one-stage-strap
faststrap: tmpinst-mcs-short-build
$(MAKE) mono-do-runtime-only
$(MAKE) fasterstrap
three-stage-strap: tmpinst-basic-build
$(MAKE) two-stage-strap
fasterstrap: tmpinst-mcs-full-build
two-stage-strap: tmpinst-short-build
$(MAKE) one-stage-strap
one-stage-strap: tmpinst-full-build
rm -f $(top_srcdir)/runtime/*/*.dll $(top_srcdir)/runtime/*.exe
$(MAKE)
bootstrap-clean: clean mcs-do-clean-profiles
bootstrap-check: check mcs-do-run-test
# building with monolite
# (takes advantage of 'make -j': independent subtasks are separate dependencies)
tmpinst-basic-build: mcs-do-basic-build mono-do-basic-build tmpinst-dir
mv -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
_tmpinst/lib
get-monolite-latest:
wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
tmpinst-short-build: mcs-do-short-build
mv -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
$(mcs_topdir)/class/lib/default/System.Xml.dll \
$(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll \
_tmpinst/lib
monolite-bootstrap: tmpinst-monolite mono-do-runtime-only
rm -f $(MCS_FILES)
$(MAKE) tmpinst-mcs-short-build
$(MAKE) fasterstrap
# internal targets
tmpinst-mcs-basic-build: mcs-do-basic-build tmpinst-dir
mv -f $(MCS_BASIC_FILES) _tmpinst/lib
tmpinst-mcs-short-build: mcs-do-short-build
mv -f $(MCS_FILES) _tmpinst/lib
tmpinst-mcs-full-build: mcs-do-full-build
cp -f $(MCS_FILES) _tmpinst/lib
tmpinst-monolite: tmpinst-dir
-rm -f _tmpinst/lib/mcs.exe _tmpinst/lib/*.dll
-rm -fr _tmpinst/monolite-*
srcdir=`cd $(srcdir) && pwd` && cd _tmpinst && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
mv -f _tmpinst/monolite-*/mcs.exe _tmpinst/monolite-*/*.dll _tmpinst/lib
rm -fr _tmpinst/monolite-*
tmpinst-full-build: mcs-do-full-build
cp -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
$(mcs_topdir)/class/lib/default/System.Xml.dll \
$(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll \
_tmpinst/lib
# Build enough of 'mono' to run the stage1 mcs.exe
mono-do-runtime-only: $(CONFIG_HEADER)
mono-do-basic-build: $(CONFIG_HEADER)
if test -z "$(libgc_dir)"; then :; else cd libgc && $(MAKE) ; fi
cd mono && $(MAKE)
mcs-do-basic-build:
rm -f $(MCS_FILES)
for dir in $(MCS_BASIC_DIRS); do \
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB") || exit 1 ; \
done
# Build stripped down versions of 'mcs', 'mscorlib.dll' and 'System.dll' with installed 'mcs'
## remove System.Xml.dll since it's a soft-dependency of System.dll
mcs-do-basic-build:
rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll
cd $(mcs_topdir)/jay && $(MAKE)
cd $(mcs_topdir)/mcs && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
cd $(mcs_topdir)/class/corlib && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
cd $(mcs_topdir)/class/System && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
mcs-do-short-build:
tmpinst=`cd _tmpinst && pwd` ; \
PATH=$$tmpinst/bin:$$PATH; export PATH ; \
for dir in $(MCS_DIRS); do \
for dir in jay mcs class/corlib class/System class/System.XML class/System class/Mono.CSharp.Debugger; do \
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default) || exit 1 ; \
done
@@ -139,6 +130,24 @@ tmpinst-dir.stamp: Makefile.am
tmpinst-dir: tmpinst-dir.stamp
@if test -d _tmpinst; then :; else rm -f tmpinst-dir.stamp; $(MAKE) tmpinst-dir.stamp; fi
# building with monolite
get-monolite-latest:
wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
tmpinst-monolite: tmpinst-dir
-rm -f _tmpinst/lib/mcs.exe _tmpinst/lib/*.dll
-rm -fr _tmpinst/monolite-*
srcdir=`cd $(srcdir) && pwd` && cd _tmpinst && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
mv -f _tmpinst/monolite-*/mcs.exe _tmpinst/monolite-*/*.dll _tmpinst/lib
rm -fr _tmpinst/monolite-*
monolite-bootstrap: tmpinst-monolite mono-do-basic-build
rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll Mono.CSharp.Debugger.dll
$(MAKE) two-stage-strap
# Obsolete target -- don't use.
.PHONY: fullbuild
fullbuild: bootstrap
-36
View File
@@ -1,36 +0,0 @@
Imports System
Module M
Delegate Sub SD()
sub f()
End sub
Public Delegate Function SF(a as integer) as Integer
Public Function f1(a as integer) as Integer
return a
End Function
Sub Main()
dim d1 as SD
d1 = new SD(AddressOf f)
d1.Invoke()
'dim d2 as SD
'd2 = AddressOf f ''//this invocation is not functional yet
'd2.Invoke()
dim d3 as new SD(AddressOf f)
d3.Invoke()
dim d4 as SF
d4 = new SF(AddressOf f1)
Dim i as Integer = d4.Invoke(10)
if i <> 10 then
Throw new System.Exception ("#A1, Unexpected result")
end if
End Sub
End Module
-14
View File
@@ -1,14 +0,0 @@
Imports System
Module M
Delegate Sub SD()
sub f(i as integer)
End sub
Sub Main()
dim d1 as SD
d1= new SD(AddressOf f)
d1.Invoke()
End Sub
End Module
-18
View File
@@ -1,18 +0,0 @@
Imports System
Module M
Delegate Sub SD()
sub f()
End sub
Public Delegate Function SF(a as integer) as Integer
Public Function f1(a as integer) as Integer
return a
End Function
Sub Main()
dim d1 as SD
d1= new SD(AddressOf f1)
d1.Invoke()
End Sub
End Module
+2 -5
View File
@@ -132,8 +132,7 @@ PropertyA \
PropertyB \
PropertyC \
PropertyD \
PropertyE \
DelegateA
PropertyE
# All negetive test cases which should
# fail during compilation goes here
@@ -282,9 +281,7 @@ EnumC7 \
PropertyC1 \
PropertyC2 \
PropertyC3 \
PropertyC4 \
DelegateC1 \
DelegateC2
PropertyC4
# All negetive test cases which should fail at
# runtime goes here
@@ -18,7 +18,6 @@ namespace System.Drawing
public abstract class Brush : MarshalByRefObject, ICloneable, IDisposable
{
internal IntPtr nativeObject;
internal bool disposed = false;
abstract public object Clone ();
internal Brush ()
@@ -64,11 +63,8 @@ namespace System.Drawing
protected virtual void Dispose (bool disposing)
{
if (disposed == false) {
Status status = GDIPlus.GdipDeleteBrush (nativeObject);
GDIPlus.CheckStatus (status);
disposed = true;
}
Status status = GDIPlus.GdipDeleteBrush (nativeObject);
GDIPlus.CheckStatus (status);
}
~Brush ()
@@ -1,14 +1,3 @@
2004-06-01 Gert Driesen <[email protected]>
* Font.cs: Added missing Browsable attribute on SizeInPoints.
* Region.cs: Removed extra ComVisible attribute from Clone().
2004-06-01 Ravindra <[email protected]>
* Pen.cs: Added a note on Dispose method.
* Brush.cs: Fixed Dispose method.
* SolidBrush.cs: Fixed Dispose method.
2004-05-28 Ravindra <[email protected]>
* gdipFunctions.cs: Added some P/Invoke calls for Draw/Fill
@@ -382,8 +382,6 @@ namespace System.Drawing {
}
private float _sizeInPoints;
[Browsable (false)]
public float SizeInPoints {
get {
return _sizeInPoints;
+7 -11
View File
@@ -421,18 +421,14 @@ namespace System.Drawing {
void Dispose (bool disposing)
{
// Pen is disposed if and only if it is not disposed and
// it is modifiable OR it is not disposed and it is being
// collected by GC.
if (! disposed) {
if (isModifiable || disposing == false) {
Status status = GDIPlus.GdipDeletePen (nativeObject);
GDIPlus.CheckStatus (status);
disposed = true;
}
else
throw new ArgumentException ("This Pen object can't be modified.");
// Let the GC collect it
if ((disposed == false) && (isModifiable || disposing == false)) {
Status status = GDIPlus.GdipDeletePen (nativeObject);
GDIPlus.CheckStatus (status);
disposed = true;
}
else
throw new ArgumentException ("This Pen object can't be modified.");
}
~Pen ()
@@ -504,6 +504,7 @@ namespace System.Drawing
GDIPlus.CheckStatus (status);
}
[ComVisible (false)]
public Region Clone()
{
IntPtr cloned;
@@ -63,18 +63,13 @@ namespace System.Drawing
protected override void Dispose (bool disposing)
{
// SolidBrush is disposed if and only if it is not disposed
// and it is modifiable OR it is not disposed and it is being
// collected by GC.
if (! disposed) {
if (isModifiable || disposing == false) {
Status status = GDIPlus.GdipDeleteBrush (nativeObject);
GDIPlus.CheckStatus (status);
disposed = true;
}
else
throw new ArgumentException ("This SolidBrush object can't be modified.");
// Let the GC collect it
if (isModifiable || disposing == false) {
Status status = GDIPlus.GdipDeleteBrush (nativeObject);
GDIPlus.CheckStatus (status);
}
else
throw new ArgumentException ("This SolidBrush object can't be modified.");
}
}
}
@@ -1,7 +1,3 @@
2004-06-01 Gert Driesen <[email protected]>
* WebServicesConfigurationSectionHandler.cs: removed unused variables
2004-02-05 Alon Gazit <[email protected]>
* XmlFormatExtensionAttribute.cs:
@@ -346,6 +346,7 @@ namespace System.Web.Services.Configuration
ThrowException ("Only elements allowed", child);
string name = child.Name;
string error;
if (name == "add") {
string seType = AttValue ("type", child, false);
string priority = AttValue ("priority", child);
@@ -389,6 +390,7 @@ namespace System.Web.Services.Configuration
ThrowException ("Only elements allowed", child);
string name = child.Name;
string error;
if (name == "add") {
string typeName = AttValue ("name", child, false);
if (child.Attributes != null && child.Attributes.Count != 0)
@@ -40,7 +40,7 @@ namespace System.Web.Services.Description {
#region Properties
// [XmlIgnore]
[XmlIgnore]
public ServiceDescriptionFormatExtensionCollection Extensions {
get { return extensions; }
}
@@ -1,25 +1,3 @@
2004-06-01 Gert Driesen <[email protected]>
* Binding.cs: removed extra XmlIgnore attribute on ServiceDescription
* Import.cs: removed extra XmlIgnore attribute on ServiceDescription
* Message.cs: removed extra XmlIgnore attribute on ServiceDescription
* MessageBinding.cs: removed extra DefaultValue attribute from Name,
removed extra XmlIgnoreAttribute from OperationBinding
* MessagePart.cs: removed extra XmlIgnore attribute on Message
* MimeContentBinding.cs: removed extra DefaultValue attribute on Part
* Operation.cs: removed extra XmlIgnore attribute on PortType
* OperationBinding.cs: removed extra XmlIgnore attribute on Binding
* OperationMessage.cs: removed extra XmlIgnore attribute on Operation
* Port.cs: removed extra XmlIgnore attribute on Service
* PortType.cs: removed extra XmlIgnore on ServiceDescription
* Service.cs: removed extra XmlIgnore on ServiceDescription
* ServiceDescriptionFormatExtension.cs: removed extra XmlIgnore
attribute on Parent
* SoapHeaderBinding.cs: added XmlElement attribute on Fault
* HttpSimpleProtocolImporter.cs: removed unused variable
* ServiceDescriptionImporter.cs: removed unused variable
* SoapProtocolImporter.cs: removed unused variable
2004-05-25 Lluis Sanchez Gual <[email protected]>
* BindingCollection.cs: Fixed this[string] property.
@@ -118,6 +118,7 @@ namespace System.Web.Services.Description
XmlMembersMapping ImportInMembersMapping (Message msg)
{
XmlQualifiedName elem = null;
SoapSchemaMember[] mems = new SoapSchemaMember [msg.Parts.Count];
for (int n=0; n<mems.Length; n++)
{
@@ -45,7 +45,7 @@ namespace System.Web.Services.Description {
set { ns = value; }
}
// [XmlIgnore]
[XmlIgnore]
public ServiceDescription ServiceDescription {
get { return serviceDescription; }
}
@@ -46,7 +46,7 @@ namespace System.Web.Services.Description {
get { return parts; }
}
// [XmlIgnore]
[XmlIgnore]
public ServiceDescription ServiceDescription {
get { return serviceDescription; }
}
@@ -37,14 +37,14 @@ namespace System.Web.Services.Description {
get;
}
// [DefaultValue (null)]
[DefaultValue (null)]
[XmlAttribute ("name", DataType = "NMTOKEN")]
public string Name {
get { return name; }
set { name = value; }
}
// [XmlIgnore]
[XmlIgnore]
public OperationBinding OperationBinding {
get { return operationBinding; }
}
@@ -42,7 +42,7 @@ namespace System.Web.Services.Description {
set { element = value; }
}
// [XmlIgnore]
[XmlIgnore]
public Message Message {
get { return message; }
}
@@ -73,7 +73,7 @@ namespace System.Web.Services.Description {
set { ParameterOrder = value.Split (' '); }
}
// [XmlIgnore]
[XmlIgnore]
public PortType PortType {
get { return portType; }
}
@@ -40,7 +40,7 @@ namespace System.Web.Services.Description {
#region Properties
// [XmlIgnore]
[XmlIgnore]
public Binding Binding {
get { return binding; }
}
@@ -47,7 +47,7 @@ namespace System.Web.Services.Description {
set { name = value; }
}
// [XmlIgnore]
[XmlIgnore]
public Operation Operation {
get { return operation; }
}
@@ -55,7 +55,7 @@ namespace System.Web.Services.Description {
set { name = value; }
}
// [XmlIgnore]
[XmlIgnore]
public Service Service {
get { return service; }
}
@@ -44,7 +44,7 @@ namespace System.Web.Services.Description {
get { return operations; }
}
// [XmlIgnore]
[XmlIgnore]
public ServiceDescription ServiceDescription {
get { return serviceDescription; }
}
@@ -51,7 +51,7 @@ namespace System.Web.Services.Description {
get { return ports; }
}
// [XmlIgnore]
[XmlIgnore]
public ServiceDescription ServiceDescription {
get { return serviceDescription; }
}
@@ -87,6 +87,7 @@ namespace System.Web.Services.Description {
public ServiceDescriptionImportWarnings Import (CodeNamespace codeNamespace, CodeCompileUnit codeCompileUnit)
{
ServiceDescriptionImportWarnings warns = 0;
ProtocolImporter importer = GetImporter ();
if (!importer.Import (this, codeNamespace, codeCompileUnit, importInfo))
@@ -85,7 +85,6 @@ namespace System.Web.Services.Description {
#if NET_1_1
[MonoTODO]
[XmlElement ("headerfault")]
public SoapHeaderFaultBinding Fault
{
get { return null; }
@@ -212,6 +212,7 @@ namespace System.Web.Services.Description {
XmlMembersMapping ImportMembersMapping (Message msg, SoapBodyBinding sbb, SoapBindingStyle style, bool output)
{
XmlQualifiedName elem = null;
string elemName = Operation.Name;
if (output) elemName += "Response";
@@ -1,7 +1,3 @@
2004-06-01 Gert Driesen <[email protected]>
* DiscoveryReference.cs: Added missing XmlIgnore attribute.
2004-05-24 Lluis Sanchez Gual <[email protected]>
* ContractReference.cs: convert relative import uris to absolute uris.
@@ -38,7 +38,6 @@ namespace System.Web.Services.Discovery {
}
[XmlIgnore]
public virtual string DefaultFilename {
get { return FilenameFromUrl (Url); }
}
@@ -1,8 +1,3 @@
2004-06-01 Gert Driesen <[email protected]>
* HttpSoapWebServiceHandler.cs: Removed unused variables.
* SoapHeaderAttribute.cs: Added Obsolete attribute.
2004-05-24 Lluis Sanchez Gual <[email protected]>
* SoapClientMessage.cs: Get the MethodInfo from the corresponding
@@ -301,6 +301,10 @@ namespace System.Web.Services.Protocols
SoapException soex = ex as SoapException;
if (soex == null) soex = new SoapException (ex.Message, SoapException.ServerFaultCode, ex);
MethodStubInfo stubInfo;
object server;
Stream stream;
SoapServerMessage faultMessage;
if (requestMessage != null)
faultMessage = new SoapServerMessage (context.Request, soex, requestMessage.MethodStubInfo, requestMessage.Server, requestMessage.Stream);
@@ -42,11 +42,6 @@ namespace System.Web.Services.Protocols {
set { memberName = value; }
}
#if NET_1_1
[Obsolete ("This property will be removed from a future"
+ " version. The presence of a particular header"
+ " in a SOAP message is no longer enforced", false)]
#endif
public bool Required {
get { return required; }
set { required = value; }
@@ -1,8 +1,3 @@
2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* HttpWorkerRequest.cs: the hashtables are now case-insensitive. Thanks
to Markus Kräutner.
2004-05-31 Gonzalo Paniagua Javier <[email protected]>
* HttpRequest.cs: nullify _sRequestRootVirtualDir and baseVirtualDir
@@ -11,7 +11,6 @@
//
using System;
using System.Collections;
using System.Globalization;
using System.Runtime.InteropServices;
namespace System.Web
@@ -173,12 +172,8 @@ namespace System.Web
s_HttpResponseHeaderNames = new string [30];
// Lookup tables (name -> id)
CaseInsensitiveHashCodeProvider hprovider;
hprovider = new CaseInsensitiveHashCodeProvider (CultureInfo.InvariantCulture);
CaseInsensitiveComparer hcomparer;
hcomparer = new CaseInsensitiveComparer (CultureInfo.InvariantCulture);
s_HttpRequestHeaderTable = new Hashtable (hprovider, hcomparer);
s_HttpResponseHeadersTable = new Hashtable (hprovider, hcomparer);
s_HttpRequestHeaderTable = new Hashtable ();
s_HttpResponseHeadersTable = new Hashtable ();
AddHeader (true, true, 0, "Cache-Control");
AddHeader (true, true, 1, "Connection");
@@ -1,9 +1,3 @@
2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* syntax.cs: re-applied my patch from 2004-05-27 plus a fix which is
emitting a Category.All if both a category and its negated value are
present.
2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* syntax.cs: reverting my previous patch. It causes bigger problems.
@@ -773,9 +773,14 @@ namespace System.Text.RegularExpressions.Syntax {
// initialize pos/neg category arrays
int cat_size = (int) Category.LastValue;
pos_cats = new BitArray (cat_size);
neg_cats = new BitArray (cat_size);
Array cat_values = Enum.GetValues (typeof (Category));
int cat_size = (int)(Category)cat_values.GetValue (cat_values.Length - 1) + 1;
pos_cats = new bool[cat_size];
neg_cats = new bool[cat_size];
for (int i = 0; i < cat_size; ++ i) {
pos_cats[i] = false;
neg_cats[i] = false;
}
}
public CharacterClass (Category cat, bool negate) : this (false, false) {
@@ -796,8 +801,15 @@ namespace System.Text.RegularExpressions.Syntax {
int n = (int)cat;
if (negate) {
if (pos_cats[n])
pos_cats[n] = false;
neg_cats[n] = true;
} else {
}
else {
if (neg_cats[n])
neg_cats[n] = false;
pos_cats[n] = true;
}
}
@@ -864,14 +876,10 @@ namespace System.Text.RegularExpressions.Syntax {
// emit categories
for (int i = 0; i < pos_cats.Length; ++ i) {
if (pos_cats[i]) {
if (neg_cats [i])
cmp.EmitCategory (Category.Any, negate, reverse);
else
cmp.EmitCategory ((Category)i, negate, reverse);
} else if (neg_cats[i]) {
if (pos_cats[i])
cmp.EmitCategory ((Category)i, negate, reverse);
else if (neg_cats[i])
cmp.EmitCategory ((Category)i, !negate, reverse);
}
}
// emit character/range/sets from meta-collection
@@ -930,7 +938,7 @@ namespace System.Text.RegularExpressions.Syntax {
private static Interval upper_case_characters = new Interval ((char)65, (char)90);
private const int distance_between_upper_and_lower_case = 32;
private bool negate, ignore;
private BitArray pos_cats, neg_cats;
private bool[] pos_cats, neg_cats;
private IntervalCollection intervals;
}
@@ -1,7 +1,3 @@
2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* RegexBugs.cs: added CategoryAndNegated test.
2004-05-27 Gonzalo Paniagua Javier <[email protected]>
* RegexBugs.cs: added tests from bug #59150.
@@ -193,16 +193,6 @@ namespace MonoTests.System.Text.RegularExpressions
Match m = re.Match (new string ('1', 33));
AssertEquals ("#01", true, m.Success);
}
[Test]
public void CategoryAndNegated () // Was a regression after first attemp to fix 59150.
{
string text = "<?xml version=\"1.0\"?>";
Regex re = new Regex ("<\\s*(\\/?)\\s*([\\s\\S]*?)\\s*(\\/?)\\s*>");
text = re.Replace (text, "{blue:&lt;$1}{maroon:$2}{blue:$3&gt;}");
AssertEquals ("#01", "{blue:&lt;}{maroon:?xml version=\"1.0\"?}{blue:&gt;}", text);
}
}
}
@@ -1,11 +1,3 @@
2004-06-01 Sebastien Pouliot <[email protected]>
* SortedList.cs: Fixed case where the initial capacity was set to 0.
2004-05-31 Sebastien Pouliot <[email protected]>
* Hashtable.cs: Added ArgumentNullException in GetObjectData.
2004-05-29 Gonzalo Paniagua Javier <[email protected]>
* ChangeLog:
@@ -431,9 +431,6 @@ namespace System.Collections {
public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
{
if (info == null)
throw new ArgumentNullException ("info");
info.AddValue ("LoadFactor", loadFactor);
info.AddValue ("Version", modificationCount);
info.AddValue ("Comparer", comparerRef);
@@ -37,14 +37,12 @@ namespace System.Collections {
private int inUse;
private int modificationCount;
private Slot[] table;
private IComparer comparer;
private int defaultCapacity;
private IComparer comparer;
//
// Constructors
//
public SortedList ()
: this (null, INITIAL_SIZE)
public SortedList () : this (INITIAL_SIZE)
{
}
@@ -56,12 +54,7 @@ namespace System.Collections {
public SortedList (IComparer comparer, int initialCapacity)
{
if (initialCapacity < 0)
throw new ArgumentOutOfRangeException ("initialCapacity");
if (initialCapacity == 0)
defaultCapacity = 0;
else
defaultCapacity = INITIAL_SIZE;
throw new ArgumentOutOfRangeException();
this.comparer = comparer;
InitTable (initialCapacity, true);
@@ -181,13 +174,13 @@ namespace System.Collections {
}
else if (value == 0) {
// return to default size
Slot [] newTable = new Slot [defaultCapacity];
Slot [] newTable = new Slot [INITIAL_SIZE];
Array.Copy (table, newTable, inUse);
this.table = newTable;
}
#if NET_1_0
else if (current > defaultCapacity && value < current) {
Slot [] newTable = new Slot [defaultCapacity];
else if (current > INITIAL_SIZE && value < current) {
Slot [] newTable = new Slot [INITIAL_SIZE];
Array.Copy (table, newTable, inUse);
this.table = newTable;
}
@@ -226,9 +219,8 @@ namespace System.Collections {
public virtual void Clear ()
{
defaultCapacity = INITIAL_SIZE;
this.table = new Slot [defaultCapacity];
{
this.table = new Slot [INITIAL_SIZE];
inUse = 0;
modificationCount++;
}
@@ -426,7 +418,7 @@ namespace System.Collections {
// of the SortedList to the default capacity,
// not zero.
if (Count == 0)
Resize (defaultCapacity, false);
Resize (INITIAL_SIZE, false);
else
Resize (Count, true);
}
@@ -534,10 +526,8 @@ namespace System.Collections {
InitTable (capacity, false);
}
private void InitTable (int capacity, bool forceSize)
{
if (!forceSize && (capacity < defaultCapacity))
capacity = defaultCapacity;
private void InitTable (int capacity, bool forceSize) {
if (!forceSize && (capacity < INITIAL_SIZE)) capacity = INITIAL_SIZE;
this.table = new Slot [capacity];
this.inUse = 0;
this.modificationCount = 0;
@@ -1,25 +0,0 @@
Assembly.cs
AssemblyNameFlags.cs
BindingFlags.cs
CallingConventions.cs
ConstructorInfo.cs
DefaultMemberAttribute.cs
EventAttributes.cs
EventInfo.cs
FieldAttributes.cs
FieldInfo.cs
ICustomAttributeProvider.cs
MemberFilter.cs
MemberInfo.cs
MemberTypes.cs
MethodAttributes.cs
MethodBase.cs
MethodImplAttributes.cs
MethodInfo.cs
Module.cs
ParameterAttributes.cs
PropertyAttributes.cs
PropertyInfo.cs
ResourceAttributes.cs
ResourceLocation.cs
TypeAttributes.cs
@@ -418,14 +418,6 @@ public class ArrayListTest : Assertion {
al.BinarySearch (1, Int32.MaxValue, this, null);
}
[Test]
public void BinarySearch_Null ()
{
ArrayList al = new ArrayList ();
al.Add (this);
AssertEquals ("null", -1, al.BinarySearch (null));
}
// TODO - BinarySearch with IComparer
public void TestClear() {
@@ -1,14 +1,3 @@
2004-06-01 Sebastien Pouliot <[email protected]>
* SortedListTest.cs: Added new test when initial capacity is set to 0
(so it never returns to default, 16, when Capacity is set to 0) unless
Clear is called. Cleaned up unused SetUp/TearDown.
2004-05-31 Sebastien Pouliot <[email protected]>
* ArrayListTest.cs: Added new test for null in BinarySearch.
* HashtableTest.cs: Added null checking fro GetObjectData.
2004-05-27 Sebastien Pouliot <[email protected]>
* HashtableTest.cs: Added case where a cloned hashtable must also be
@@ -778,13 +778,5 @@ public class HashtableTest : Assertion {
Assert (!e.MoveNext ());
}
[Test]
[ExpectedException (typeof (ArgumentNullException))]
public void GetObjectData_NullSerializationInfo ()
{
SetDefaultData ();
ht.GetObjectData (null, new StreamingContext ());
}
}
}
@@ -21,6 +21,8 @@ using NUnit.Framework;
namespace MonoTests.System.Collections {
/// <summary>SortedList test.</summary>
[TestFixture]
public class SortedListTest : Assertion {
protected SortedList sl1;
@@ -28,6 +30,16 @@ public class SortedListTest : Assertion {
protected SortedList emptysl;
protected const int icap=16;
[SetUp]
public void SetUp()
{
}
[TearDown]
public void TearDown()
{
}
public void TestConstructor1() {
SortedList temp1 = new SortedList();
AssertNotNull("sl.constructor-1: returns null", temp1);
@@ -103,24 +115,6 @@ public class SortedListTest : Assertion {
} catch (ArgumentOutOfRangeException) {}
}
[Test]
public void Constructor_Capacity ()
{
SortedList sl = new SortedList (0);
AssertEquals ("Capacity-Original", 0, sl.Capacity);
sl.Capacity = 0;
// doesn't reset to class default (16)
AssertEquals ("Capacity-Resetted", 0, sl.Capacity);
for (int i=1; i <= 16; i++) {
sl = new SortedList (i);
AssertEquals ("Capacity-Original" + i.ToString (), i, sl.Capacity);
sl.Capacity = 0;
// reset to class default (16)
AssertEquals ("Capacity-Resetted" + i.ToString (), 16, sl.Capacity);
}
}
[Test]
public void TestIsSynchronized() {
SortedList sl1 = new SortedList();
@@ -308,32 +302,6 @@ public class SortedListTest : Assertion {
AssertEquals("sl.Clear: capacity is altered", 16, sl1.Capacity);
}
[Test]
public void Clear_Capacity ()
{
// strangely Clear change the default capacity (while Capacity doesn't)
for (int i=0; i <= 16; i++) {
SortedList sl = new SortedList (i);
AssertEquals ("Capacity-Original" + i.ToString (), i, sl.Capacity);
sl.Clear ();
// reset to class default (16)
AssertEquals ("Capacity-Resetted" + i.ToString (), 16, sl.Capacity);
}
}
[Test]
public void Clear_Capacity_Reset ()
{
SortedList sl = new SortedList (0);
AssertEquals ("0", 0, sl.Capacity);
sl.Clear ();
// reset to class default (16)
AssertEquals ("Clear", 16, sl.Capacity);
sl.Capacity = 0;
AssertEquals ("Capacity", 16, sl.Capacity);
// note: we didn't return to 0 - so Clear cahnge the default capacity
}
[Test]
public void TestClone() {
{
@@ -1,11 +1,3 @@
2004-05-31 Sebastien Pouliot <[email protected]>
* FileTest.cs: Added tests to confirm that Exists never throws
exceptions even for invalid filenames or for unexisting directories.
* PathTest.cs: Added windows-specific tests that shows that
ChangeExtension validate the input patch but doesn't validate the
resulting path.
2004-05-30 Sebastien Pouliot <[email protected]>
* BufferedStreamTest.cs: Added tests for Position after SetLength,
+2 -12
View File
@@ -65,18 +65,8 @@ namespace MonoTests.System.IO
s.Close ();
DeleteFile (path);
}
}
[Test]
public void Exists_InvalidFileName ()
{
Assert ("><|", !File.Exists ("><|"));
}
[Test]
public void Exists_InvalidDirectory ()
{
Assert ("InvalidDirectory", !File.Exists (Path.Combine ("does not exist", "file.txt")));
}
[Test]
+6 -14
View File
@@ -129,22 +129,14 @@ namespace MonoTests.System.IO
AssertEquals ("ChangeExtension #17", String.Empty, testPath);
testPath = Path.ChangeExtension (null, null);
AssertNull ("ChangeExtension #18", testPath);
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void ChangeExtension_BadPath ()
{
if (!Windows) throw new ArgumentException ("Test Only On Windows");
Path.ChangeExtension ("<", ".extension");
}
[Test]
public void ChangeExtension_BadExtension ()
{
if (Windows) {
string fn = Path.ChangeExtension ("file.ext", "<");
AssertEquals ("Invalid filename", "file.<", fn);
try {
testPath = Path.ChangeExtension ("<", ".extension");
Fail ("ChangeException Fail #01");
} catch (Exception e) {
AssertEquals ("ChangeExtension Exc. #01", typeof (ArgumentException), e.GetType ());
}
}
}
-16
View File
@@ -203,22 +203,6 @@ public class ArrayTest : Assertion
AssertEquals("#B30", 49, Array.BinarySearch(array, 10));
}
[Test]
public void BinarySearch_NullValue ()
{
int[] array = new int[1];
AssertEquals ("I=a,o", -1, Array.BinarySearch (array, null));
AssertEquals ("I=a,o,c", -1, Array.BinarySearch (array, null, null));
AssertEquals ("I=a,i,i,o", -1, Array.BinarySearch (array, 0, 1, null));
AssertEquals ("I=a,i,i,o,c", -1, Array.BinarySearch (array, 0, 1, null,null));
object[] o = new object [3] { this, this, null };
AssertEquals ("O=a,o", -1, Array.BinarySearch (o, null));
AssertEquals ("O=a,o,c", -1, Array.BinarySearch (o, null, null));
AssertEquals ("O=a,i,i,o", -1, Array.BinarySearch (o, 0, 3, null));
AssertEquals ("O=a,i,i,o,c", -1, Array.BinarySearch (o, 0, 3, null, null));
}
// TODO - testBinarySearch with explicit IComparer args
[Test]
-11
View File
@@ -216,17 +216,6 @@ public class ByteTest : Assertion
}
}
[Test]
public void ToString_Default ()
{
byte value = 255;
string def = value.ToString ("G");
string format = null;
AssertEquals ("null", def, value.ToString (format));
format = String.Empty;
AssertEquals ("empty", def, value.ToString (format));
}
}
}
-5
View File
@@ -1,8 +1,3 @@
2004-05-30 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Added tests for null values in BinarySearch.
* Byte.cs: Added test for default ToString format value.
2004-05-30 David Sheldon <[email protected]>
* DecimalTest.cs: Moved the rounding test that fails due to
-6
View File
@@ -1,9 +1,3 @@
2004-06-01 Marek Safar <[email protected]>
* cs1555.cs,
* cs1556.cs,
* cs3000.cs: 3 new error tests.
2004-05-30 Marek Safar <[email protected]>
* cs1017.cs: New test.
-10
View File
@@ -1,10 +0,0 @@
// cs1555.cs: Could not find 'DoesNotExist' specified for Main method
// Line: 0
// Compiler options: -main:DoesNotExist
public class MainTest
{
public static void Main (string[] args)
{
}
}
-8
View File
@@ -1,8 +0,0 @@
// cs1555.cs: 'MainTest' specified for Main method must be a valid class or struct
// Line: 0
// Compiler options: -main:MainTest
public interface MainTest
{
void Main (string[] args);
}
-13
View File
@@ -1,13 +0,0 @@
// cs3000.cs: Methods with variable arguments are not CLS-compliant
// Line: 10
using System;
[assembly: CLSCompliant (true)]
public class M
{
public void Method (__arglist)
{
}
}