Merge branch 'master' into v3.1
大石头 authored at 2024-07-13 19:03:18
515.00 B
Stardust
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using Xunit;

namespace Stardust.ServerTests.Nodes;

public class NodeStatTests
{
    [Fact]
    public void Test1()
    {
        var name = "AMD Ryzen 7 2700 Eight-Core Processor";

        var p = name.IndexOf("-Core");
        if (p > 0) p = name.LastIndexOf(' ', p);
        if (p > 0) name = name[..p].Trim();

        Assert.Equal("AMD Ryzen 7 2700", name);
    }
}