Skip to content

Commit

Permalink
Change some project naming
Browse files Browse the repository at this point in the history
Makes it consistent with all the projects - TinyUpdate.Binary, leaving that one once I get to creating it
  • Loading branch information
Azyyyyyy committed Jan 7, 2024
1 parent 1895aff commit eeb9e12
Show file tree
Hide file tree
Showing 31 changed files with 40 additions and 38 deletions.
8 changes: 4 additions & 4 deletions TinyUpdate.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.Binary", "src\Up
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.Cli", "src\TinyUpdate.Cli\TinyUpdate.Cli.csproj", "{F2251107-156F-4D46-8EAE-19CA20DA1C62}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Delta", "Delta", "{3AC8B933-07FF-43CC-AAFD-46C759AD4496}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Deltas", "Deltas", "{3AC8B933-07FF-43CC-AAFD-46C759AD4496}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.MSDelta", "src\Deltas\TinyUpdate.MSDelta\TinyUpdate.MSDelta.csproj", "{DDA0CCA8-5886-4616-A21A-6D22825F1F56}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.Delta.MSDelta", "src\Deltas\TinyUpdate.Delta.MSDelta\TinyUpdate.Delta.MSDelta.csproj", "{DDA0CCA8-5886-4616-A21A-6D22825F1F56}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A486F679-9E40-4FE4-ABF9-1F27AADAE40A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.Delta.Tests", "tests\TinyUpdate.Delta.Tests\TinyUpdate.Delta.Tests.csproj", "{564B5AA0-34AA-4035-89AC-372F0FADC985}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.BSDelta", "src\Deltas\TinyUpdate.BSDelta\TinyUpdate.BSDelta.csproj", "{29EE089A-4D11-4FDB-937D-7D5884399416}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.Delta.BSDiff", "src\Deltas\TinyUpdate.Delta.BSDiff\TinyUpdate.Delta.BSDiff.csproj", "{29EE089A-4D11-4FDB-937D-7D5884399416}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packages", "Packages", "{FFCB9AB6-92FE-48B0-9B93-A5BBF0DB153B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.TUUP", "src\Packages\TinyUpdate.TUUP\TinyUpdate.TUUP.csproj", "{59769ABE-E512-43D0-B85B-37EF133DA27D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.Packages.Tests", "tests\TinyUpdate.Packages.Tests\TinyUpdate.Packages.Tests.csproj", "{B5BC1A21-5A4C-403E-918B-CE48675E6F89}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.Tests.Common", "tests\TinyUpdate.Tests.Common\TinyUpdate.Tests.Common.csproj", "{81B0A72E-04FA-4A4F-856F-68C22FF2D945}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyUpdate.Core.Tests", "tests\TinyUpdate.Core.Tests\TinyUpdate.Core.Tests.csproj", "{81B0A72E-04FA-4A4F-856F-68C22FF2D945}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// Squirrel.Bsdiff: Adapted from https://github.com/LogosBible/bsdiff.net/blob/master/src/bsdiff/BinaryPatchUtility.cs
// TinyUpdate: Adapted from https://github.com/Squirrel/Squirrel.Windows/blob/develop/src/Squirrel/BinaryPatchUtility.cs
namespace TinyUpdate.BSDelta;
namespace TinyUpdate.Delta.BSDiff;

/*
Permission is hereby granted, free of charge, to any person obtaining a
Expand Down Expand Up @@ -53,7 +53,7 @@ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
public partial class BSDelta(ILogger logger) : IDeltaApplier, IDeltaCreation
public partial class BSDiffDelta(ILogger logger) : IDeltaApplier, IDeltaCreation
{
private const long CFileSignature = 0x3034464649445342L;
private const int CHeaderSize = 32;
Expand Down Expand Up @@ -477,7 +477,7 @@ 0 32 Header
}
}

public partial class BSDelta
public partial class BSDiffDelta
{
private static int CompareBytes(byte[] left, int leftOffset, byte[] right, int rightOffset)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TinyUpdate.BSDelta;
namespace TinyUpdate.Delta.BSDiff;

/// <summary>
/// Provides helper methods for working with <see cref="Stream" />.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TinyUpdate.BSDelta;
namespace TinyUpdate.Delta.BSDiff;

//TODO: Add more modern overrides to this
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TinyUpdate.MSDelta.Enum;
namespace TinyUpdate.Delta.MSDelta.Enum;

/// <summary>
/// Flags for when we are applying a <see cref="MSDelta" /> file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ReSharper disable InconsistentNaming

namespace TinyUpdate.MSDelta.Enum;
namespace TinyUpdate.Delta.MSDelta.Enum;

[Flags]
internal enum FileType : long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ReSharper disable InconsistentNaming

namespace TinyUpdate.MSDelta.Enum;
namespace TinyUpdate.Delta.MSDelta.Enum;

[Flags]
internal enum FlagType : long
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TinyUpdate.MSDelta.Enum;
namespace TinyUpdate.Delta.MSDelta.Enum;

internal enum HashAlgId
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Runtime.InteropServices;
using TinyUpdate.Core.Abstract;
using TinyUpdate.MSDelta.Enum;
using TinyUpdate.MSDelta.Struct;
using TinyUpdate.Delta.MSDelta.Enum;
using TinyUpdate.Delta.MSDelta.Struct;

namespace TinyUpdate.MSDelta;
namespace TinyUpdate.Delta.MSDelta;

public partial class MSDelta : IDeltaApplier, IDeltaCreation
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Runtime.InteropServices;
using TinyUpdate.Core;

namespace TinyUpdate.MSDelta.Struct;
namespace TinyUpdate.Delta.MSDelta.Struct;

[StructLayout(LayoutKind.Sequential)]
internal unsafe struct DeltaHash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using TinyUpdate.MSDelta.Enum;
using TinyUpdate.Delta.MSDelta.Enum;

namespace TinyUpdate.MSDelta.Struct;
namespace TinyUpdate.Delta.MSDelta.Struct;

[StructLayout(LayoutKind.Sequential)]
internal struct DeltaHeaderInfo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;

namespace TinyUpdate.MSDelta.Struct;
namespace TinyUpdate.Delta.MSDelta.Struct;

/// <summary>
/// Type for input memory blocks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;

namespace TinyUpdate.MSDelta.Struct;
namespace TinyUpdate.Delta.MSDelta.Struct;

/// <summary>
/// Type for input memory blocks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>TinyUpdate.Delta.MSDelta</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using TinyUpdate.Core.Abstract;

namespace TinyUpdate.Tests.Common.Attributes;
namespace TinyUpdate.Core.Tests.Attributes;

/// <summary>
/// The test(s) are testing an <seealso cref="IDeltaApplier"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using TinyUpdate.Core.Abstract;

namespace TinyUpdate.Tests.Common.Attributes;
namespace TinyUpdate.Core.Tests.Attributes;

/// <summary>
/// The test(s) are testing an <seealso cref="IDeltaCreation"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal;

namespace TinyUpdate.Tests.Common.Attributes;
namespace TinyUpdate.Core.Tests.Attributes;

/// <summary>
/// This allows us to skip tests if the current operating system is *not* Windows
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.IO.Abstractions;
using System.IO.Abstractions.TestingHelpers;

namespace TinyUpdate.Tests.Common;
namespace TinyUpdate.Core.Tests;

//TODO: Add Tests for SHA256
public static class Functions
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/TinyUpdate.Delta.Tests/Abstract/DeltaCan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Runtime.InteropServices;
using TinyUpdate.Core;
using TinyUpdate.Core.Abstract;
using TinyUpdate.Tests.Common;
using TinyUpdate.Tests.Common.Attributes;
using TinyUpdate.Core.Tests;
using TinyUpdate.Core.Tests.Attributes;

namespace TinyUpdate.Delta.Tests.Abstract;

Expand Down
4 changes: 2 additions & 2 deletions tests/TinyUpdate.Delta.Tests/Abstract/DeltaManagerCan.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.IO.Abstractions;
using Moq;
using TinyUpdate.Core.Abstract;
using TinyUpdate.Tests.Common;
using TinyUpdate.Tests.Common.Attributes;
using TinyUpdate.Core.Tests;
using TinyUpdate.Core.Tests.Attributes;

namespace TinyUpdate.Delta.Tests.Abstract;

Expand Down
9 changes: 5 additions & 4 deletions tests/TinyUpdate.Delta.Tests/DeltaTests.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
using Microsoft.Extensions.Logging.Abstractions;
using TinyUpdate.Delta.Tests.Abstract;
using TinyUpdate.MSDelta.Struct;
using TinyUpdate.Tests.Common.Attributes;
using TinyUpdate.Delta.MSDelta.Struct;
using TinyUpdate.Core.Tests.Attributes;
using TinyUpdate.Delta.BSDiff;

namespace TinyUpdate.Delta.Tests;

public class BSDeltaTests : DeltaCan
public class BSDiffDeltaTests : DeltaCan
{
[OneTimeSetUp]
public void OneTimeSetup()
{
var delta = new BSDelta.BSDelta(NullLogger.Instance);
var delta = new BSDiffDelta(NullLogger.Instance);
Creator = delta;
Applier = delta;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/TinyUpdate.Delta.Tests/TinyUpdate.Delta.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Deltas\TinyUpdate.BSDelta\TinyUpdate.BSDelta.csproj" />
<ProjectReference Include="..\..\src\Deltas\TinyUpdate.MSDelta\TinyUpdate.MSDelta.csproj" />
<ProjectReference Include="..\TinyUpdate.Tests.Common\TinyUpdate.Tests.Common.csproj" />
<ProjectReference Include="..\..\src\Deltas\TinyUpdate.Delta.BSDiff\TinyUpdate.Delta.BSDiff.csproj" />
<ProjectReference Include="..\..\src\Deltas\TinyUpdate.Delta.MSDelta\TinyUpdate.Delta.MSDelta.csproj" />
<ProjectReference Include="..\TinyUpdate.Core.Tests\TinyUpdate.Core.Tests.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using SemVersion;
using TinyUpdate.Core;
using TinyUpdate.Core.Abstract;
using TinyUpdate.Tests.Common;
using TinyUpdate.Core.Tests;

namespace TinyUpdate.Packages.Tests.Abstract;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<ItemGroup>
<ProjectReference Include="..\..\src\Packages\TinyUpdate.TUUP\TinyUpdate.TUUP.csproj" />
<ProjectReference Include="..\TinyUpdate.Tests.Common\TinyUpdate.Tests.Common.csproj" />
<ProjectReference Include="..\TinyUpdate.Core.Tests\TinyUpdate.Core.Tests.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit eeb9e12

Please sign in to comment.