Skip to content

Commit

Permalink
Added two new simple tests for r1c1
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKallman committed Feb 4, 2018
1 parent 97b51ab commit 2d08514
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
14 changes: 7 additions & 7 deletions EPPlus/EPPlus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\lib\</OutputPath>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -878,12 +878,12 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>
Expand Down
2 changes: 1 addition & 1 deletion EPPlus/OfficeProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public DateTime Modified
const string LinksUpToDatePath = "xp:Properties/xp:LinksUpToDate";
/// <summary>
/// Indicates whether hyperlinks in a document are up-to-date
/// < /summary>
/// </summary>
public bool LinksUpToDate
{
get { return _extendedHelper.GetXmlNodeBool(LinksUpToDatePath); }
Expand Down
23 changes: 22 additions & 1 deletion EPPlusTest/FormulaParsing/FormulaR1C1Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,28 @@ public void RCFixToABToR1C1_2()
Assert.AreEqual("$AB6-SUM($L6:$U6)", f);
_sheet.Cells[6, 13].Formula = f;
Assert.AreEqual(fR1C1, _sheet.Cells[6, 13].FormulaR1C1);

}
[TestMethod]
public void SimpleRelativeR1C1()
{
string fR1C1 = "R[-1]C[-5]";
var c = _sheet.Cells[7, 7];
c.FormulaR1C1 = fR1C1;
string f = c.Formula;
Assert.AreEqual("B6", f);
c.Formula = f;
Assert.AreEqual(fR1C1, c.FormulaR1C1);
}
[TestMethod]
public void SimpleAbsR1C1()
{
string fR1C1 = "R1C5";
var c = _sheet.Cells[8, 8];
c.FormulaR1C1 = fR1C1;
string f = c.Formula;
Assert.AreEqual("$E$1", f);
c.Formula = f;
Assert.AreEqual(fR1C1, c.FormulaR1C1);
}
}
}
2 changes: 1 addition & 1 deletion EPPlusTest/WorkSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1733,7 +1733,7 @@ public void LoadText_Bug15015_Negative()
ws.Cells["A1"].LoadFromText("\"text with eol,\r\n",
new ExcelTextFormat { TextQualifier = '"', EOL = ",\r\n", Delimiter = ',' });
}
catch (Exception e)
catch //(Exception e)
{
//Assert.AreEqual("Text delimiter is not closed in line : \"text with eol", e.Message, "Exception message");
exceptionThrown = true;
Expand Down

0 comments on commit 2d08514

Please sign in to comment.