lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [2/4] adding nuget.config to direct packages to root/lib. The @interface in Java is meant to a mark an annotation/attribute. extracted attributes. defaulting the temp directory property.
Date Mon, 10 Mar 2014 22:07:42 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/lib/NUnit.2.6.3/license.txt
----------------------------------------------------------------------
diff --git a/lib/NUnit.2.6.3/license.txt b/lib/NUnit.2.6.3/license.txt
new file mode 100644
index 0000000..b12903a
--- /dev/null
+++ b/lib/NUnit.2.6.3/license.txt
@@ -0,0 +1,15 @@
+Copyright � 2002-2013 Charlie Poole
+Copyright � 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
+Copyright � 2000-2002 Philip A. Craig
+
+This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote
the original software. If you use this software in a product, an acknowledgment (see the following)
in the product documentation is required.
+
+Portions Copyright � 2002-2013 Charlie Poole or Copyright � 2002-2004 James W. Newkirk,
Michael C. Two, Alexei A. Vorontsov or Copyright � 2000-2002 Philip A. Craig
+
+2. Altered source versions must be plainly marked as such, and must not be misrepresented
as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/lib/repositories.config
----------------------------------------------------------------------
diff --git a/lib/repositories.config b/lib/repositories.config
new file mode 100644
index 0000000..7ef44ec
--- /dev/null
+++ b/lib/repositories.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<repositories>
+  <repository path="..\test\test-framework\packages.config" />
+</repositories>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/lucene.net
----------------------------------------------------------------------
diff --git a/lucene.net b/lucene.net
deleted file mode 160000
index 855782f..0000000
--- a/lucene.net
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 855782fd4be0b15f0ff06588ce817172a9ba0050

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/nuget.config
----------------------------------------------------------------------
diff --git a/nuget.config b/nuget.config
new file mode 100644
index 0000000..63b37b8
--- /dev/null
+++ b/nuget.config
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+ 
+http://www.apache.org/licenses/LICENSE-2.0
+ 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<configuration>
+  <config>
+  	<add key="repositorypath" value="lib" />
+  </config>
+ </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/test/core/README.md
----------------------------------------------------------------------
diff --git a/test/core/README.md b/test/core/README.md
index 533accd..497e45d 100644
--- a/test/core/README.md
+++ b/test/core/README.md
@@ -9,5 +9,4 @@ that will be found in the test framework library.
 
 All tests that currently do not compile have been excluded till the tests
 match their lucene 4.3 counter parts.  Some of these tests will need to 
-be moved in order to match the reorganization of Lucene 4.x.
-
+be moved in order to match the reorganization of Lucene 4.x.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/test/test-framework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/test/test-framework/Lucene.Net.TestFramework.csproj b/test/test-framework/Lucene.Net.TestFramework.csproj
index 875243e..86cbed0 100644
--- a/test/test-framework/Lucene.Net.TestFramework.csproj
+++ b/test/test-framework/Lucene.Net.TestFramework.csproj
@@ -7,11 +7,12 @@
     <ProjectGuid>{B2C0D749-CE34-4F62-A15E-00CB2FF5DDB3}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Lucene.Net.TestFramework</RootNamespace>
+    <RootNamespace>Lucene.Net</RootNamespace>
     <AssemblyName>Lucene.Net.TestFramework</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
-    <TargetFrameworkProfile />
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -21,6 +22,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -29,6 +31,7 @@
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup>
     <SignAssembly>true</SignAssembly>
@@ -37,11 +40,9 @@
     <AssemblyOriginatorKeyFile>Lucene.Net.snk</AssemblyOriginatorKeyFile>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="nunit.framework">
-      <HintPath>..\..\lib\NUnit.org\NUnit\2.5.9\bin\net-2.0\framework\nunit.framework.dll</HintPath>
-    </Reference>
-    <Reference Include="nunit.mocks">
-      <HintPath>..\..\lib\NUnit.org\NUnit\2.5.9\bin\net-2.0\framework\nunit.mocks.dll</HintPath>
+    <Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77,
processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\lib\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
@@ -55,8 +56,11 @@
   <ItemGroup>
     <Compile Include="Support\RandomizedTest.cs" />
     <Compile Include="Support\SystemProperties.cs" />
+    <Compile Include="Util\Attributes.cs" />
     <Compile Include="Util\LuceneTestCase.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Util\TestCase.cs" />
+    <Compile Include="Util\TestFixture2.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\src\core\Lucene.Net.csproj">
@@ -66,9 +70,16 @@
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Analysis\" />
+    <Folder Include="Randomization\" />
   </ItemGroup>
   <ItemGroup>
     <None Include="Lucene.Net.snk" />
+    <None Include="Notice.md" />
+    <None Include="packages.config" />
+    <None Include="README.md" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and
uncomment it. 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/test/test-framework/Notice.md
----------------------------------------------------------------------
diff --git a/test/test-framework/Notice.md b/test/test-framework/Notice.md
new file mode 100644
index 0000000..11e1fc5
--- /dev/null
+++ b/test/test-framework/Notice.md
@@ -0,0 +1,7 @@
+
+The following classes were ported from the [randomized testing library](https://github.com/carrotsearch/randomizedtesting)
+which is under the apache 2.0 license
+
+
+
+

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/test/test-framework/README.md
----------------------------------------------------------------------
diff --git a/test/test-framework/README.md b/test/test-framework/README.md
new file mode 100644
index 0000000..82bdd9f
--- /dev/null
+++ b/test/test-framework/README.md
@@ -0,0 +1,6 @@
+
+# Notes
+
+ * Randomized Values needs to be ported from https://github.com/carrotsearch/randomizedtesting
+ * LuceneTestCase now inherits from Assert
+ * 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/test/test-framework/Support/RandomizedTest.cs
----------------------------------------------------------------------
diff --git a/test/test-framework/Support/RandomizedTest.cs b/test/test-framework/Support/RandomizedTest.cs
index 70894f3..41485b9 100644
--- a/test/test-framework/Support/RandomizedTest.cs
+++ b/test/test-framework/Support/RandomizedTest.cs
@@ -23,6 +23,8 @@ namespace Lucene.Net.TestFramework.Support
             return defaultValue;
         }
 
+        
+
         public static int SystemPropertyAsInt(string key, int defaultValue)
         {
             var setting = ConfigurationManager.AppSettings[key];

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/test/test-framework/Util/Attributes.cs
----------------------------------------------------------------------
diff --git a/test/test-framework/Util/Attributes.cs b/test/test-framework/Util/Attributes.cs
new file mode 100644
index 0000000..5991ab4
--- /dev/null
+++ b/test/test-framework/Util/Attributes.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Lucene.Net.Util
+{
+
+    public class LuceneCategoryAttribute : NUnit.Framework.CategoryAttribute
+    {
+        public LuceneCategoryAttribute(string name)
+            : base(name.Replace(":", " ").Replace(".", " "))
+        {
+
+        }
+    }
+
+    public class NightlyAttribute : LuceneCategoryAttribute
+    {
+        public const string KEY = "tests:nightly";
+
+        public NightlyAttribute()
+            : base(KEY)
+        {
+          
+        }
+    }
+
+    public class AwaitsFixAttribute : LuceneCategoryAttribute
+    {
+        public const string KEY = "tests:awaitsfix";
+
+        public AwaitsFixAttribute()
+            : base(KEY)
+        {
+
+        }
+    }
+
+
+    public class WeeklyAttribute : LuceneCategoryAttribute
+    {
+        public const string KEY = "tests:weekly";
+
+        public WeeklyAttribute()
+            : base(KEY)
+        {
+
+        }
+    }
+
+    public class SlowAttribute : LuceneCategoryAttribute 
+    {
+        public const string KEY = "tests:slow";
+
+        public static bool Ignore { get; set; }
+
+        public SlowAttribute(bool enabled)
+            : base(KEY)
+        {
+               
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/test/test-framework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/test/test-framework/Util/LuceneTestCase.cs b/test/test-framework/Util/LuceneTestCase.cs
index 0b362ae..43ccb94 100644
--- a/test/test-framework/Util/LuceneTestCase.cs
+++ b/test/test-framework/Util/LuceneTestCase.cs
@@ -26,6 +26,8 @@ using Lucene.Net.TestFramework.Support;
 using System.Collections.Generic;
 using Lucene.Net.Search;
 
+using Lucene.Net.TestFramework;
+
 namespace Lucene.Net.Util
 {
 
@@ -47,6 +49,7 @@ namespace Lucene.Net.Util
     /// <seealso cref="assertSaneFieldCaches">
     /// </seealso>
     [Serializable]
+    [TestFixture]
     public abstract class LuceneTestCase : Assert
     {
         // --------------------------------------------------------------------
@@ -65,23 +68,8 @@ namespace Lucene.Net.Util
         /** @see #ignoreAfterMaxFailures*/
         private const string SYSPROP_FAILFAST = "tests.failfast";
 
-        public interface INightly { }
-
-        public interface IWeekly { }
-
-        public interface IAwaitsFix
-        {
-            string BugUrl { get; }
-        }
-
-        public interface ISlow { }
 
-        public interface IBadApple { }
-
-        public interface ISuppressCodecs
-        {
-            string[] Value { get; }
-        }
+     
 
         public static readonly Util.Version TEST_VERSION_CURRENT = Util.Version.LUCENE_43;
 
@@ -103,13 +91,13 @@ namespace Lucene.Net.Util
 
         public static readonly string TEST_LINE_DOCS_FILE = SystemProperties.GetProperty("tests.linedocsfile",
DEFAULT_LINE_DOCS_FILE);
 
-        public static readonly bool TEST_NIGHTLY = RandomizedTest.SystemPropertyAsBoolean(SYSPROP_NIGHTLY,
false);
+        public static readonly bool TEST_NIGHTLY = RandomizedTest.SystemPropertyAsBoolean(NightlyAttribute.KEY,
false);
 
-        public static readonly bool TEST_WEEKLY = RandomizedTest.SystemPropertyAsBoolean(SYSPROP_WEEKLY,
false);
+        public static readonly bool TEST_WEEKLY = RandomizedTest.SystemPropertyAsBoolean(WeeklyAttribute.KEY,
false);
 
-        public static readonly bool TEST_AWAITSFIX = RandomizedTest.SystemPropertyAsBoolean(SYSPROP_AWAITSFIX,
false);
+        public static readonly bool TEST_AWAITSFIX = RandomizedTest.SystemPropertyAsBoolean(AwaitsFixAttribute.KEY,
false);
 
-        public static readonly bool TEST_SLOW = RandomizedTest.SystemPropertyAsBoolean(SYSPROP_SLOW,
false);
+        public static readonly bool TEST_SLOW = RandomizedTest.SystemPropertyAsBoolean(SlowAttribute.KEY,
false);
 
         //public static readonly MockDirectoryWrapper.Throttling TEST_THROTTLING = TEST_NIGHTLY
? MockDirectoryWrapper.Throttling.SOMETIMES : MockDirectoryWrapper.Throttling.NEVER;
 
@@ -117,7 +105,7 @@ namespace Lucene.Net.Util
 
         static LuceneTestCase()
         {
-            String s = SystemProperties.GetProperty("tempDir", SystemProperties.GetProperty("java.io.tmpdir"));
+            String s = SystemProperties.GetProperty("tempDir", System.IO.Path.GetTempPath());
             if (s == null)
                 throw new SystemException("To run tests, you need to define system property
'tempDir' or 'java.io.tmpdir'.");
 
@@ -126,6 +114,8 @@ namespace Lucene.Net.Util
 
             CORE_DIRECTORIES = new List<string>(FS_DIRECTORIES);
             CORE_DIRECTORIES.Add("RAMDirectory");
+
+            
         }
 
         private static readonly string[] IGNORED_INVARIANT_PROPERTIES = {
@@ -154,6 +144,11 @@ namespace Lucene.Net.Util
             "MockRandom"
         });
 
+        public void Test()
+        {
+            
+        }
+
         public static bool PREFLEX_IMPERSONATION_IS_ACTIVE;
 
         //private static readonly TestRuleStoreClassName classNameRule;
@@ -414,7 +409,21 @@ namespace Lucene.Net.Util
         [NonSerialized]
         private static readonly System.Random seedRnd = new System.Random();
 
+       
+       
+
+        protected static void Ok(bool condition, string message = null)
+        {
+            if (!string.IsNullOrWhiteSpace(message))
+                Assert.True(condition, message);
+            else
+                Assert.True(condition);
+        }
+
         #region Java porting shortcuts
+
+        
+
         protected static void assertEquals(string msg, object obj1, object obj2)
         {
             Assert.AreEqual(obj1, obj2, msg);
@@ -425,6 +434,7 @@ namespace Lucene.Net.Util
             Assert.AreEqual(obj1, obj2);
         }
 
+        
         protected static void assertEquals(double d1, double d2, double delta)
         {
             Assert.AreEqual(d1, d2, delta);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcc56d70/test/test-framework/packages.config
----------------------------------------------------------------------
diff --git a/test/test-framework/packages.config b/test/test-framework/packages.config
new file mode 100644
index 0000000..967502d
--- /dev/null
+++ b/test/test-framework/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="NUnit" version="2.6.3" targetFramework="net40" />
+</packages>
\ No newline at end of file


Mime
View raw message