mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-27 00:07:58 +01:00
* Remove NStack and replace ustring to string.
* Add unit test and improving some code.
* Adjust code and fix all unit tests errors.
* Add XML Document and move the Rune folder into the Text folder.
* Improve unit tests with byte array on DecodeRune and DecodeLastRune.
* Fix unit test.
* 😂Code review
* Reduce unit tests code.
* Change StringExtensions.Make to StringExtensions.ToString and added some more unit tests.
* Fix merge errors.
* Remove GetTextWidth and calls replaced with StringExtensions.GetColumns.
* Hack to use UseSystemConsole passed in the command line arguments.
* Revert "Hack to use UseSystemConsole passed in the command line arguments."
This reverts commit b74d11c786.
* Remove Application.UseSystemConsole from the config file.
* Fix errors related by removing UseSystemConsole from the config file.
* Fixes #2633. DecodeEscSeq throw an exception if cki is null.
* Fix an exception if SelectedItem is -1.
* Set SelectedItem to 0 and remove unnecessary ToString.
* Updated RuneJsonConverter to deal with more formats
* nonBMP apple
* Adjusted unit tests
* Added ConsoleDriver.IsRuneSupported API
* Removed debug code
* Disabled non-BMP in CursesDriver
---------
Co-authored-by: BDisp <bd.bdisp@gmail.com>
34 lines
880 B
C#
34 lines
880 B
C#
using System;
|
|
using System.Buffers;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text.Json;
|
|
using Xunit;
|
|
|
|
namespace Terminal.Gui.DrawingTests;
|
|
|
|
public class GlyphTests {
|
|
[Fact]
|
|
public void Default_GlyphDefinitions_Deserialize ()
|
|
{
|
|
var defs = new GlyphDefinitions ();
|
|
// enumerate all properties in GlyphDefinitions
|
|
foreach (var prop in typeof (GlyphDefinitions).GetProperties ()) {
|
|
if (prop.PropertyType == typeof (Rune)) {
|
|
|
|
// Act
|
|
var rune = (Rune)prop.GetValue (defs);
|
|
var json = JsonSerializer.Serialize (rune, ConfigurationManager._serializerOptions);
|
|
var deserialized = JsonSerializer.Deserialize<Rune> (json, ConfigurationManager._serializerOptions);
|
|
|
|
// Assert
|
|
Assert.Equal (((Rune)prop.GetValue (defs)).Value, deserialized.Value);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|