Skip to content

Commit

Permalink
fix line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Apr 28, 2023
1 parent 6dd7b1c commit 98b1ed6
Show file tree
Hide file tree
Showing 13 changed files with 410 additions and 410 deletions.
124 changes: 62 additions & 62 deletions IxMilia.Dxf.sln
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32001.329
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf", "src\IxMilia.Dxf\IxMilia.Dxf.csproj", "{C067E97D-3B96-462A-B09D-33FAD60DE761}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf.Test", "src\IxMilia.Dxf.Test\IxMilia.Dxf.Test.csproj", "{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf.Generator", "src\IxMilia.Dxf.Generator\IxMilia.Dxf.Generator.csproj", "{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf.ReferenceCollector", "src\IxMilia.Dxf.ReferenceCollector\IxMilia.Dxf.ReferenceCollector.csproj", "{8AA16B3F-4FA0-4132-846B-6640699FF12F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{712CA821-79DE-43D7-8E44-BFFA7A4EFC2C}"
ProjectSection(SolutionItems) = preProject
build-and-test.cmd = build-and-test.cmd
build-and-test.sh = build-and-test.sh
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf.Integration.Test", "src\IxMilia.Dxf.Integration.Test\IxMilia.Dxf.Integration.Test.csproj", "{02FE5CB3-53AF-428F-8936-463112151FC6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples", "src\Examples\Examples.csproj", "{1E0308A7-479B-42CA-9437-548677532A85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C067E97D-3B96-462A-B09D-33FAD60DE761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C067E97D-3B96-462A-B09D-33FAD60DE761}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C067E97D-3B96-462A-B09D-33FAD60DE761}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C067E97D-3B96-462A-B09D-33FAD60DE761}.Release|Any CPU.Build.0 = Release|Any CPU
{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}.Release|Any CPU.Build.0 = Release|Any CPU
{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}.Release|Any CPU.Build.0 = Release|Any CPU
{8AA16B3F-4FA0-4132-846B-6640699FF12F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8AA16B3F-4FA0-4132-846B-6640699FF12F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8AA16B3F-4FA0-4132-846B-6640699FF12F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8AA16B3F-4FA0-4132-846B-6640699FF12F}.Release|Any CPU.Build.0 = Release|Any CPU
{02FE5CB3-53AF-428F-8936-463112151FC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02FE5CB3-53AF-428F-8936-463112151FC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02FE5CB3-53AF-428F-8936-463112151FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02FE5CB3-53AF-428F-8936-463112151FC6}.Release|Any CPU.Build.0 = Release|Any CPU
{1E0308A7-479B-42CA-9437-548677532A85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E0308A7-479B-42CA-9437-548677532A85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E0308A7-479B-42CA-9437-548677532A85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E0308A7-479B-42CA-9437-548677532A85}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C7B8DA5D-38A0-4647-A3E8-76B5E7CBC849}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32001.329
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf", "src\IxMilia.Dxf\IxMilia.Dxf.csproj", "{C067E97D-3B96-462A-B09D-33FAD60DE761}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf.Test", "src\IxMilia.Dxf.Test\IxMilia.Dxf.Test.csproj", "{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf.Generator", "src\IxMilia.Dxf.Generator\IxMilia.Dxf.Generator.csproj", "{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf.ReferenceCollector", "src\IxMilia.Dxf.ReferenceCollector\IxMilia.Dxf.ReferenceCollector.csproj", "{8AA16B3F-4FA0-4132-846B-6640699FF12F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{712CA821-79DE-43D7-8E44-BFFA7A4EFC2C}"
ProjectSection(SolutionItems) = preProject
build-and-test.cmd = build-and-test.cmd
build-and-test.sh = build-and-test.sh
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IxMilia.Dxf.Integration.Test", "src\IxMilia.Dxf.Integration.Test\IxMilia.Dxf.Integration.Test.csproj", "{02FE5CB3-53AF-428F-8936-463112151FC6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples", "src\Examples\Examples.csproj", "{1E0308A7-479B-42CA-9437-548677532A85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C067E97D-3B96-462A-B09D-33FAD60DE761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C067E97D-3B96-462A-B09D-33FAD60DE761}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C067E97D-3B96-462A-B09D-33FAD60DE761}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C067E97D-3B96-462A-B09D-33FAD60DE761}.Release|Any CPU.Build.0 = Release|Any CPU
{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B98F9CB2-3E1E-4072-99FB-B93B1C7E1A19}.Release|Any CPU.Build.0 = Release|Any CPU
{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34D31EC8-883B-4C37-AF98-A4BD5D0E2D3B}.Release|Any CPU.Build.0 = Release|Any CPU
{8AA16B3F-4FA0-4132-846B-6640699FF12F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8AA16B3F-4FA0-4132-846B-6640699FF12F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8AA16B3F-4FA0-4132-846B-6640699FF12F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8AA16B3F-4FA0-4132-846B-6640699FF12F}.Release|Any CPU.Build.0 = Release|Any CPU
{02FE5CB3-53AF-428F-8936-463112151FC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02FE5CB3-53AF-428F-8936-463112151FC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02FE5CB3-53AF-428F-8936-463112151FC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02FE5CB3-53AF-428F-8936-463112151FC6}.Release|Any CPU.Build.0 = Release|Any CPU
{1E0308A7-479B-42CA-9437-548677532A85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E0308A7-479B-42CA-9437-548677532A85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E0308A7-479B-42CA-9437-548677532A85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E0308A7-479B-42CA-9437-548677532A85}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C7B8DA5D-38A0-4647-A3E8-76B5E7CBC849}
EndGlobalSection
EndGlobal
10 changes: 5 additions & 5 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"rollForward": "latestMinor"
}
{
"sdk": {
"version": "7.0.100",
"rollForward": "latestMinor"
}
}
2 changes: 1 addition & 1 deletion src/Examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SavedExamples/
SavedExamples/
38 changes: 19 additions & 19 deletions src/Examples/Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\IxMilia.Dxf\IxMilia.Dxf.csproj" />
<ProjectReference Include="..\IxMilia.Dxf.Test\IxMilia.Dxf.Test.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\IxMilia.Dxf\IxMilia.Dxf.csproj" />
<ProjectReference Include="..\IxMilia.Dxf.Test\IxMilia.Dxf.Test.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/Examples/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Examples
========

This project is created as a bunch of unit tests, but the tests themselves don't actually assert anything. They exist
primarily to give short, self-contained, individually runnable examples of how to use the library.
Examples
========

This project is created as a bunch of unit tests, but the tests themselves don't actually assert anything. They exist
primarily to give short, self-contained, individually runnable examples of how to use the library.
26 changes: 13 additions & 13 deletions src/Examples/TestExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using System.IO;
using System.Runtime.CompilerServices;
using IxMilia.Dxf;

using System.IO;
using System.Runtime.CompilerServices;
using IxMilia.Dxf;

namespace Examples
{
internal static class TestExtensions
{
internal static void SaveExample(this DxfFile file, [CallerFilePath] string testFilePath = null, [CallerMemberName] string testName = null)
{
var testDirectory = Path.GetDirectoryName(testFilePath);
var fullTestDirectory = Path.Combine(testDirectory, "SavedExamples");
Directory.CreateDirectory(fullTestDirectory);

var fileName = $"{testName}.dxf";
var fullOutputPath = Path.Combine(fullTestDirectory, fileName);
file.Save(fullOutputPath);
internal static void SaveExample(this DxfFile file, [CallerFilePath] string testFilePath = null, [CallerMemberName] string testName = null)
{
var testDirectory = Path.GetDirectoryName(testFilePath);
var fullTestDirectory = Path.Combine(testDirectory, "SavedExamples");
Directory.CreateDirectory(fullTestDirectory);

var fileName = $"{testName}.dxf";
var fullOutputPath = Path.Combine(fullTestDirectory, fileName);
file.Save(fullOutputPath);
}
}
}
8 changes: 4 additions & 4 deletions src/IxMilia.Dxf.Integration.Test/AudoCadCompatTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ public void AutoCadReadIxMiliaFileCompatTest()
file.Save(outputPath);

// open thefile in AutoCAD and try to write it back out
var scriptLines = new List<string>()
{
$"DXFOUT \"{Path.Combine(tempDir, $"result.{version}.dxf")}\" V R12 16",
"QUIT Y"
var scriptLines = new List<string>()
{
$"DXFOUT \"{Path.Combine(tempDir, $"result.{version}.dxf")}\" V R12 16",
"QUIT Y"
};
var scriptPath = Path.Combine(tempDir, $"script.{version}.scr");
File.WriteAllLines(scriptPath, scriptLines);
Expand Down
34 changes: 17 additions & 17 deletions src/IxMilia.Dxf.Integration.Test/CompatTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Text;
using IxMilia.Dxf.Entities;
using IxMilia.Dxf.Test;
using Xunit;
Expand Down Expand Up @@ -98,19 +98,19 @@ protected void RoundTripDimensionWithXData(Func<DxfFile, DxfFile> roundTripper)

protected void WaitForProcess(string fileName, string arguments)
{
var proc = new Process()
{
StartInfo = new ProcessStartInfo()
{
FileName = fileName,
Arguments = arguments,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
StandardOutputEncoding = Encoding.Unicode,
StandardErrorEncoding = Encoding.Unicode,
UseShellExecute = false,
},
var proc = new Process()
{
StartInfo = new ProcessStartInfo()
{
FileName = fileName,
Arguments = arguments,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
StandardOutputEncoding = Encoding.Unicode,
StandardErrorEncoding = Encoding.Unicode,
UseShellExecute = false,
},
};
var stdout = new StringBuilder();
var stderr = new StringBuilder();
Expand All @@ -122,9 +122,9 @@ protected void WaitForProcess(string fileName, string arguments)
var exited = proc.WaitForExit((int)TimeSpan.FromSeconds(30).TotalMilliseconds);
proc.CancelOutputRead();
proc.CancelErrorRead();
if (!exited)
{
proc.Kill();
if (!exited)
{
proc.Kill();
}

var message = $"STDOUT:\n{stdout}\nSTDERR:\n{stderr}";
Expand Down
10 changes: 5 additions & 5 deletions src/IxMilia.Dxf.Test/AbstractDxfTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ namespace IxMilia.Dxf.Test
{
public abstract class AbstractDxfTests
{
protected DateTime RoundToNearestSecond(DateTime dateTime)
{
var seconds = dateTime.Second + ((dateTime.Millisecond + 500.0) / 1000.0);
return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, dateTime.Hour, dateTime.Minute, (int)seconds, dateTime.Kind);
}
protected DateTime RoundToNearestSecond(DateTime dateTime)
{
var seconds = dateTime.Second + ((dateTime.Millisecond + 500.0) / 1000.0);
return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, dateTime.Hour, dateTime.Minute, (int)seconds, dateTime.Kind);
}

protected static DxfFile Parse(string data)
{
Expand Down
34 changes: 17 additions & 17 deletions src/IxMilia.Dxf.Test/MiscTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Globalization;
using System.Globalization;
using System.Linq;
using IxMilia.Dxf.Blocks;
using IxMilia.Dxf.Entities;
Expand Down Expand Up @@ -220,22 +220,22 @@ public void BreakPolylineIntoSimpleEntitiesPreservesCommonEntityProperties()
[Theory]
[InlineData("en-US")]
[InlineData("de-DE")]
public void PointAndVectorStringValuesAreConsistentAcrossCultures(string culture)
{
var existingCulture = CultureInfo.CurrentCulture;
try
{
var point = new DxfPoint(1.5, 2.5, 3.5);
var vector = new DxfVector(4.5, 5.5, 6.5);

CultureInfo.CurrentCulture = new CultureInfo(culture);
Assert.Equal("(1.5,2.5,3.5)", point.ToString());
Assert.Equal("(4.5,5.5,6.5)", vector.ToString());
}
finally
{
CultureInfo.CurrentCulture = existingCulture;
}
public void PointAndVectorStringValuesAreConsistentAcrossCultures(string culture)
{
var existingCulture = CultureInfo.CurrentCulture;
try
{
var point = new DxfPoint(1.5, 2.5, 3.5);
var vector = new DxfVector(4.5, 5.5, 6.5);

CultureInfo.CurrentCulture = new CultureInfo(culture);
Assert.Equal("(1.5,2.5,3.5)", point.ToString());
Assert.Equal("(4.5,5.5,6.5)", vector.ToString());
}
finally
{
CultureInfo.CurrentCulture = existingCulture;
}
}
}
}
Loading

0 comments on commit 98b1ed6

Please sign in to comment.