Skip to content

Updated all packages to their latest versions - pre-releases included. #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ee2fbb9
Update README.md
MarkMichaelis Jun 16, 2019
197a87f
Updated with 2.09 to provide clearer output.
MarkMichaelis Jun 16, 2019
f97dd97
-Updated to support new parameter names on IntelliTect.TestTools libr…
MarkMichaelis Jun 16, 2019
3631383
Updated test 02.01 to support both netcoreapp2.0 and netcoreapp3.0. (…
MarkMichaelis Jun 16, 2019
779c009
Updated for latest IntelliTect.TestTools which updated parameter/meth…
MarkMichaelis Jun 17, 2019
65ab2bf
Improved new line handling.
MarkMichaelis Jun 17, 2019
f0abf19
Updated test 02.09 to support both netcoreapp2.0 and netcoreapp3.0. (…
MarkMichaelis Jun 17, 2019
cf2113f
Updated to latest version of IntelliTect.TestTools.
MarkMichaelis Jun 17, 2019
f3250c7
Converted csproj files from AASCII to UTF8.
MarkMichaelis Jun 17, 2019
b2b5728
Refactored code for test 2.01.
MarkMichaelis Jun 17, 2019
9915ae1
Updated to address differences in netcoreapp3.0 for listing 4.7
MarkMichaelis Jun 17, 2019
96ca976
Merge branch 'v7.0' of github.com:IntelliTect/EssentialCSharp into v7.0
MarkMichaelis Jun 17, 2019
d7d8141
Updated IntelliTect.TestTools.Console submodule.
MarkMichaelis Jun 17, 2019
4bd68f7
Updated chapter 15 tests to ignore empty during split.
MarkMichaelis Jun 17, 2019
6719998
Fix compilation issue. Update nuget package target
COsborn2 Jun 19, 2019
879966e
Merge pull request #47 from COsborn2/fix-build-issues
COsborn2 Jun 20, 2019
0ea1524
Updated all packages to their latest versions - pre-releases included.
MarkMichaelis Jun 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions src/Chapter02.Tests/Listing02.01.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,24 @@ public void Main_WriteNumbers()
42
0x2A";

const string netCoreApp3expected =
string expected = // netcoreapp3.0 and later
@"42
1.618034
1.618033988749895
1.618033988749895
6.023E+23
42
0x2A";
string expected;

string netCoreVersion = NetCore.GetNetCoreVersion();
if(netCoreVersion.StartsWith("2.1"))
if (string.Compare(netCoreVersion, "3") < 0)
{
expected = netCoreApp2expected;
}
else if(netCoreVersion.StartsWith("3"))
{
expected = netCoreApp3expected;
}
else
{
throw new System.Exception(".NET Core Version ({netCoreVersion}) not handled.");
}

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, Program.Main);

}
}
}
3 changes: 3 additions & 0 deletions src/Chapter04.Tests/Chapter04.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
</PropertyGroup>
<Import Project="..\Versioning.targets" />
<Import Project="..\ChapterTests.targets"/>
<ItemGroup>
<Compile Include="..\Shared\NetCore.cs" Link="NetCore.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0-preview-20170727-01" />
<PackageReference Include="MSTest.TestAdapter" Version="1.2.0-beta" />
Expand Down
27 changes: 20 additions & 7 deletions src/Chapter04.Tests/Listing04.07.UnexpectedInequality.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,32 @@ public class ProgramTests
[TestMethod]
public void MainTest()
{
const string expected =
@"4.2 != 4.2000002861023
const string netCoreApp2expected =
@"4.2 != 4.2000002861023
4.2 != 4.20000028610229
(float)4.2M != 4.2F
4.20000028610229 != 4.2
4.2F != 4.2D
4.19999980926514 != 4.2
4.2F != 4.2D";
4.2F != 4.2D";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, Program.Main);

// Removed 4.20000028610229 != 4.20000028610229 ... in .Net Core float conversions seem to be more accurate
string expected =
@"4.2 != 4.2000002861023
4.2 != 4.200000286102295
(float)4.2M != 4.2000003F
4.200000286102295 != 4.2
4.2000003F != 4.2D
4.199999809265137 != 4.2
4.2F != 4.2D";

string netCoreVersion = NetCore.GetNetCoreVersion();
if (string.Compare(netCoreVersion, "3") < 0)
{
expected = netCoreApp2expected;
}

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
expected, Program.Main);
}
}
}