Skip to content

Commit

Permalink
fix. legacy project test
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed May 21, 2024
1 parent 8747661 commit dd971e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions test/ReaderTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Text;
using Byter;
using Byter.Legacy;
using Xunit;

namespace ByterTest;
Expand Down Expand Up @@ -238,37 +238,37 @@ public void TryMakeError()
[Fact]
public void ReadFloat2()
{
var target = new Float2(1, 2);
var target = new ByFloat2(1, 2);

Writer writer = new();
writer.Write(target);

Reader reader = new(ref writer);

var result = reader.Read<Float2>();
var result = reader.Read<ByFloat2>();
Assert.Equal(target, result);
Assert.True(reader.Success);
}

[Fact]
public void ReadFloat3()
{
var target = new Float3(1, 2, 3);
var target = new ByFloat3(1, 2, 3);

Writer writer = new();
writer.Write(target);

Reader reader = new(ref writer);

var result = reader.Read<Float3>();
var result = reader.Read<ByFloat3>();
Assert.Equal(target, result);
Assert.True(reader.Success);
}

[Fact]
public void ImplFloat2()
{
var result = new Float2(FLOAT_X, FLOAT_Y);
var result = new ByFloat2(FLOAT_X, FLOAT_Y);

Assert.Equal(FLOAT_X, result.X);
Assert.Equal(FLOAT_Y, result.Y);
Expand All @@ -277,7 +277,7 @@ public void ImplFloat2()
[Fact]
public void ImplFloat3()
{
var result = new Float3(FLOAT_X, FLOAT_Y, FLOAT_Z);
var result = new ByFloat3(FLOAT_X, FLOAT_Y, FLOAT_Z);

Assert.Equal(FLOAT_X, result.X);
Assert.Equal(FLOAT_Y, result.Y);
Expand All @@ -287,7 +287,7 @@ public void ImplFloat3()
[Fact]
public void ImplFloat4()
{
var result = new Float4(FLOAT_X, FLOAT_Y, FLOAT_Z, FLOAT_W);
var result = new ByFloat4(FLOAT_X, FLOAT_Y, FLOAT_Z, FLOAT_W);

Assert.Equal(FLOAT_X, result.X);
Assert.Equal(FLOAT_Y, result.Y);
Expand Down
4 changes: 2 additions & 2 deletions test/WriterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using Xunit;
using Byter;
using Byter.Core;
using Byter.Legacy;

namespace ByterTest;

Expand Down Expand Up @@ -35,7 +35,7 @@ public void Write()
w.Write((char) 'A');
w.Write((string) "UTF8");
w.Write((string) "ASCII", Encoding.ASCII);
w.Write(new Float2(1, 2));
w.Write(new ByFloat2(1, 2));

byte[] a = w.GetBytes();
List<byte> b = w.GetList();
Expand Down

0 comments on commit dd971e3

Please sign in to comment.