Skip to content

Commit

Permalink
Update Primitive.Enum.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed May 30, 2024
1 parent 0906566 commit 0d5c4f4
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion test/primitive/Primitive.Enum.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
using System;
using Byter;
using Xunit;

namespace Test.Primitives;

public partial class Primitives
{
[Fact]
public void _Enun()
public void _Enum()
{
Primitive primitive = new();

var a = TypeCode.Empty;
var b = TypeCode.Object;
var c = TypeCode.Boolean;

primitive.Add.Enum(a);
primitive.Add.Enum(b);
primitive.Add.Enum(c);

Assert.Equal(a, primitive.Get.Enum<TypeCode>());
Assert.Equal(b, primitive.Get.Enum<TypeCode>());
Assert.Equal(b, primitive.Get.Enum<TypeCode>());
Assert.True(primitive.IsValid);
}
}

0 comments on commit 0d5c4f4

Please sign in to comment.