Skip to content

Commit

Permalink
Merge pull request #81 from Soreepeong/sestring-valuetyped
Browse files Browse the repository at this point in the history
Add read-only value-typed views of SeString family and its builder
  • Loading branch information
NotAdam authored Apr 19, 2024
2 parents 56a057f + a0169fb commit da342d2
Show file tree
Hide file tree
Showing 29 changed files with 4,917 additions and 127 deletions.
2 changes: 1 addition & 1 deletion src/Lumina.Tests/Lumina.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
31 changes: 15 additions & 16 deletions src/Lumina.Tests/LuminaTests.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
using Xunit;

namespace Lumina.Tests
namespace Lumina.Tests;

public class LuminaTests
{
public class LuminaTests
[Theory]
[InlineData( "bg", "ex3", 13885885343001753777, "bg/ex3/01_nvt_n4/twn/n4t1/bgparts/n4t1_a1_chr03.mdl" )]
[InlineData( "music", "ex2", 16573140193792963234, "music/ex2/bgm_ex2_system_title.scd" )]
[InlineData( "chara", "ffxiv", 8982245735269998910, "chara/weapon/w0501/obj/body/b0018/vfx/texture/uv_cryst_128s.atex" )]
[InlineData( "sound", "ffxiv", 7568289509259556905, "sound/vfx/ability/se_vfx_abi_berserk_c.scd" )]
[InlineData( "exd", "ffxiv", 16400836168543909290, "exd/exportedsg.exh" )]
public void FilePathsAreParsedCorrectly( string category, string repo, ulong hash, string path )
{
[Theory]
[InlineData( "bg", "ex3", 13885885343001753777, "bg/ex3/01_nvt_n4/twn/n4t1/bgparts/n4t1_a1_chr03.mdl" )]
[InlineData( "music", "ex2", 16573140193792963234, "music/ex2/bgm_ex2_system_title.scd" )]
[InlineData( "chara", "ffxiv", 8982245735269998910, "chara/weapon/w0501/obj/body/b0018/vfx/texture/uv_cryst_128s.atex" )]
[InlineData( "sound", "ffxiv", 7568289509259556905, "sound/vfx/ability/se_vfx_abi_berserk_c.scd")]
[InlineData( "exd", "ffxiv", 16400836168543909290, "exd/exportedsg.exh")]
public void FilePathsAreParsedCorrectly( string category, string repo, ulong hash, string path )
{
var parsed = GameData.ParseFilePath( path );

Assert.Equal( category, parsed.Category );
Assert.Equal( repo, parsed.Repository );
Assert.Equal( hash, parsed.IndexHash );
}
var parsed = GameData.ParseFilePath( path )!;

Assert.Equal( category, parsed.Category );
Assert.Equal( repo, parsed.Repository );
Assert.Equal( hash, parsed.IndexHash );
}
}
15 changes: 15 additions & 0 deletions src/Lumina.Tests/RequiresGameInstallationFact.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.IO;
using Xunit;

namespace Lumina.Tests;

public sealed class RequiresGameInstallationFact : FactAttribute
{
private const string path = @"C:\Program Files (x86)\SquareEnix\FINAL FANTASY XIV - A Realm Reborn\game\sqpack";

public RequiresGameInstallationFact()
{
if( !Directory.Exists( path ) )
Skip = "Game installation is not found at the default path.";
}
}
Loading

0 comments on commit da342d2

Please sign in to comment.