Author: lluis
Date: 2007-12-05 05:12:44 -0500 (Wed, 05 Dec 2007)
New Revision: 90745
Added:
trunk/mono-addins/Test/UnitTests/AddinInformationTests.cs
Modified:
trunk/mono-addins/Test/ChangeLog
trunk/mono-addins/Test/SystemInfoExtension/Makefile.am
trunk/mono-addins/Test/UnitTests/Makefile.am
trunk/mono-addins/Test/UnitTests/UnitTests.mdp
Log:
* UnitTests/UnitTests.mdp, UnitTests/Makefile.am,
SystemInfoExtension/Makefile.am: Flush.
* UnitTests/AddinInformationTests.cs: Added tests for
Addin.CompareVersion.
Modified: trunk/mono-addins/Test/ChangeLog
===================================================================
--- trunk/mono-addins/Test/ChangeLog 2007-12-05 10:07:12 UTC (rev 90744)
+++ trunk/mono-addins/Test/ChangeLog 2007-12-05 10:12:44 UTC (rev 90745)
@@ -1,3 +1,9 @@
+2007-12-05 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * UnitTests/UnitTests.mdp, UnitTests/Makefile.am,
+ SystemInfoExtension/Makefile.am: Flush.
+ * UnitTests/AddinInformationTests.cs: Added tests for
Addin.CompareVersion.
+
2007-12-03 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* SystemInfoExtension/Makefile.am: Added missing files.
Modified: trunk/mono-addins/Test/SystemInfoExtension/Makefile.am
===================================================================
--- trunk/mono-addins/Test/SystemInfoExtension/Makefile.am 2007-12-05
10:07:12 UTC (rev 90744)
+++ trunk/mono-addins/Test/SystemInfoExtension/Makefile.am 2007-12-05
10:12:44 UTC (rev 90745)
@@ -20,7 +20,6 @@
DATA_FILES = SystemInfoExtension.addin.xml
RESOURCES =
-
SATELLITE_ASSEMBLY = ../lib/ca/SystemInfoExtension.resources.dll
MAIN_RESOURCE = Resources.resources
Added: trunk/mono-addins/Test/UnitTests/AddinInformationTests.cs
===================================================================
--- trunk/mono-addins/Test/UnitTests/AddinInformationTests.cs 2007-12-05
10:07:12 UTC (rev 90744)
+++ trunk/mono-addins/Test/UnitTests/AddinInformationTests.cs 2007-12-05
10:12:44 UTC (rev 90745)
@@ -0,0 +1,54 @@
+// AddinInformationTests.cs
+//
+// Author:
+// Lluis Sanchez Gual <[EMAIL PROTECTED]>
+//
+// Copyright (c) 2007 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+//
+
+using System;
+using NUnit.Framework;
+using Mono.Addins;
+
+namespace UnitTests
+{
+ [TestFixture]
+ public class AddinInformationTests
+ {
+ [Test]
+ public void TestCompareVersions ()
+ {
+ Assert.AreEqual (-1, Addin.CompareVersions
("3.0","2.0"));
+ Assert.AreEqual (-1, Addin.CompareVersions ("3","2"));
+ Assert.AreEqual (-1, Addin.CompareVersions
("2.1","2.0"));
+ Assert.AreEqual (-1, Addin.CompareVersions
("2.0.0.1","2.0"));
+ Assert.AreEqual (-1, Addin.CompareVersions ("2.0.1",
"2.0.0.1"));
+ Assert.AreEqual (0, Addin.CompareVersions ("2","2"));
+ Assert.AreEqual (0, Addin.CompareVersions
("3.0.2.1","3.0.2.1"));
+ Assert.AreEqual (1, Addin.CompareVersions
("2.0","3.0"));
+ Assert.AreEqual (1, Addin.CompareVersions ("2","3"));
+ Assert.AreEqual (1, Addin.CompareVersions
("2.0","2.1"));
+ Assert.AreEqual (1, Addin.CompareVersions ("2.0",
"2.0.0.1"));
+ Assert.AreEqual (1, Addin.CompareVersions
("2.0.0.1","2.0.1"));
+ }
+ }
+}
Modified: trunk/mono-addins/Test/UnitTests/Makefile.am
===================================================================
--- trunk/mono-addins/Test/UnitTests/Makefile.am 2007-12-05 10:07:12 UTC
(rev 90744)
+++ trunk/mono-addins/Test/UnitTests/Makefile.am 2007-12-05 10:12:44 UTC
(rev 90745)
@@ -13,6 +13,7 @@
endif
FILES = \
+ AddinInformationTests.cs \
ComplexNode.cs \
GlobalInfoCondition.cs \
ISampleExtender.cs \
Modified: trunk/mono-addins/Test/UnitTests/UnitTests.mdp
===================================================================
--- trunk/mono-addins/Test/UnitTests/UnitTests.mdp 2007-12-05 10:07:12 UTC
(rev 90744)
+++ trunk/mono-addins/Test/UnitTests/UnitTests.mdp 2007-12-05 10:12:44 UTC
(rev 90745)
@@ -23,6 +23,7 @@
<File name="Makefile.am" subtype="Code" buildaction="Nothing" />
<File name="IWriter.cs" subtype="Code" buildaction="Compile" />
<File name="TestLocalization.cs" subtype="Code" buildaction="Compile" />
+ <File name="AddinInformationTests.cs" subtype="Code" buildaction="Compile"
/>
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -32,7 +33,6 @@
<ProjectReference type="Gac" localcopy="True" refto="nunit.framework,
Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
<ProjectReference type="Gac" localcopy="True" refto="nunit.util,
Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
</References>
- <Deployment.LinuxDeployData scriptName="unittests" generatePcFile="False" />
<MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True"
RelativeMakefileName="./Makefile.am" BuildTargetName="" CleanTargetName=""
SyncReferences="True" RelativeConfigureInPath="../../">
<BuildFilesVar Sync="True" Name="FILES" />
<DeployFilesVar Sync="True" Name="DATA_FILES" />
@@ -42,4 +42,5 @@
<AsmRefVar Sync="True" Name="DLL_REFERENCES" />
<ProjectRefVar Sync="True" Name="PROJECT_REFERENCES" />
</MonoDevelop.Autotools.MakefileInfo>
+ <Deployment.LinuxDeployData scriptName="unittests" generatePcFile="False" />
</Project>
\ No newline at end of file
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches