From 266abdefacf2fc163cf220eaf59dec0404918fda Mon Sep 17 00:00:00 2001 From: Thijs Wiefferink Date: Thu, 16 Feb 2017 21:26:18 +0100 Subject: [PATCH] Tests: split same color tags to test them properly The second tags might break without noticing because the color of the first tag is remembered --- .../parsergenerator/color/legacyAll.txt | 320 +++++++----------- .../testing/parsergenerator/color/tagAll.txt | 180 ++++------ 2 files changed, 203 insertions(+), 297 deletions(-) diff --git a/src/test/java/me/wiefferink/interactivemessenger/testing/parsergenerator/color/legacyAll.txt b/src/test/java/me/wiefferink/interactivemessenger/testing/parsergenerator/color/legacyAll.txt index a33cba0..403ccb7 100644 --- a/src/test/java/me/wiefferink/interactivemessenger/testing/parsergenerator/color/legacyAll.txt +++ b/src/test/java/me/wiefferink/interactivemessenger/testing/parsergenerator/color/legacyAll.txt @@ -1,232 +1,168 @@ -&0black, §0black, -&1dark_blue, §1dark_blue, -&2dark_green, §2dark_green, -&3dark_aqua, §3dark_aqua, -&4dark_red, §4dark_red, -&5dark_purple, §5dark_purple, -&6gold, §6gold, -&7gray, §7gray, -&8dark_gray, §8dark_gray, -&9blue, §9blue, -&agreen, §agreen, -&baqua, §baqua, -&cred, §cred, -&dlight_purple, §dlight_purple, -&eyellow, §eyellow, -&fwhite, §fwhite +&0black, +&1dark_blue, +&2dark_green, +&3dark_aqua, +&4dark_red, +&5dark_purple, +&6gold, +&7gray, +&8dark_gray, +&9blue, +&agreen, +&baqua, +&cred, +&dlight_purple, +&eyellow, +&fwhite, +§0black, +§1dark_blue, +§2dark_green, +§3dark_aqua, +§4dark_red, +§5dark_purple, +§6gold, +§7gray, +§8dark_gray, +§9blue, +§agreen, +§baqua, +§cred, +§dlight_purple, +§eyellow, +§fwhite -§0black, §0black,§1dark_blue, §1dark_blue,§2dark_green, §2dark_green,§3dark_aqua, §3dark_aqua,§4dark_red, §4dark_red,§5dark_purple, §5dark_purple,§6gold, §6gold,§7gray, §7gray,§8dark_gray, §8dark_gray,§9blue, §9blue,§agreen, §agreen,§baqua, §baqua,§cred, §cred,§dlight_purple, §dlight_purple,§eyellow, §eyellow,§fwhite, §fwhite +§0black,§1dark_blue,§2dark_green,§3dark_aqua,§4dark_red,§5dark_purple,§6gold,§7gray,§8dark_gray,§9blue,§agreen,§baqua,§cred,§dlight_purple,§eyellow,§fwhite,§0black,§1dark_blue,§2dark_green,§3dark_aqua,§4dark_red,§5dark_purple,§6gold,§7gray,§8dark_gray,§9blue,§agreen,§baqua,§cred,§dlight_purple,§eyellow,§fwhite [ { "text": "", "extra": [ { - "text": "", - "extra": [ - { - "text": "black, ", - "color": "black" - }, - { - "text": "black,", - "color": "black" - } - ] + "text": "black,", + "color": "black" }, { - "text": "", - "extra": [ - { - "text": "dark_blue, ", - "color": "dark_blue" - }, - { - "text": "dark_blue,", - "color": "dark_blue" - } - ] + "text": "dark_blue,", + "color": "dark_blue" }, { - "text": "", - "extra": [ - { - "text": "dark_green, ", - "color": "dark_green" - }, - { - "text": "dark_green,", - "color": "dark_green" - } - ] + "text": "dark_green,", + "color": "dark_green" }, { - "text": "", - "extra": [ - { - "text": "dark_aqua, ", - "color": "dark_aqua" - }, - { - "text": "dark_aqua,", - "color": "dark_aqua" - } - ] + "text": "dark_aqua,", + "color": "dark_aqua" }, { - "text": "", - "extra": [ - { - "text": "dark_red, ", - "color": "dark_red" - }, - { - "text": "dark_red,", - "color": "dark_red" - } - ] + "text": "dark_red,", + "color": "dark_red" }, { - "text": "", - "extra": [ - { - "text": "dark_purple, ", - "color": "dark_purple" - }, - { - "text": "dark_purple,", - "color": "dark_purple" - } - ] + "text": "dark_purple,", + "color": "dark_purple" }, { - "text": "", - "extra": [ - { - "text": "gold, ", - "color": "gold" - }, - { - "text": "gold,", - "color": "gold" - } - ] + "text": "gold,", + "color": "gold" }, { - "text": "", - "extra": [ - { - "text": "gray, ", - "color": "gray" - }, - { - "text": "gray,", - "color": "gray" - } - ] + "text": "gray,", + "color": "gray" }, { - "text": "", - "extra": [ - { - "text": "dark_gray, ", - "color": "dark_gray" - }, - { - "text": "dark_gray,", - "color": "dark_gray" - } - ] + "text": "dark_gray,", + "color": "dark_gray" }, { - "text": "", - "extra": [ - { - "text": "blue, ", - "color": "blue" - }, - { - "text": "blue,", - "color": "blue" - } - ] + "text": "blue,", + "color": "blue" }, { - "text": "", - "extra": [ - { - "text": "green, ", - "color": "green" - }, - { - "text": "green,", - "color": "green" - } - ] + "text": "green,", + "color": "green" }, { - "text": "", - "extra": [ - { - "text": "aqua, ", - "color": "aqua" - }, - { - "text": "aqua,", - "color": "aqua" - } - ] + "text": "aqua,", + "color": "aqua" }, { - "text": "", - "extra": [ - { - "text": "red, ", - "color": "red" - }, - { - "text": "red,", - "color": "red" - } - ] + "text": "red,", + "color": "red" }, { - "text": "", - "extra": [ - { - "text": "light_purple, ", - "color": "light_purple" - }, - { - "text": "light_purple,", - "color": "light_purple" - } - ] + "text": "light_purple,", + "color": "light_purple" }, { - "text": "", - "extra": [ - { - "text": "yellow, ", - "color": "yellow" - }, - { - "text": "yellow,", - "color": "yellow" - } - ] + "text": "yellow,", + "color": "yellow" }, { - "text": "", - "extra": [ - { - "text": "white, " - }, - { - "text": "white" - } - ] + "text": "white," + }, + { + "text": "black,", + "color": "black" + }, + { + "text": "dark_blue,", + "color": "dark_blue" + }, + { + "text": "dark_green,", + "color": "dark_green" + }, + { + "text": "dark_aqua,", + "color": "dark_aqua" + }, + { + "text": "dark_red,", + "color": "dark_red" + }, + { + "text": "dark_purple,", + "color": "dark_purple" + }, + { + "text": "gold,", + "color": "gold" + }, + { + "text": "gray,", + "color": "gray" + }, + { + "text": "dark_gray,", + "color": "dark_gray" + }, + { + "text": "blue,", + "color": "blue" + }, + { + "text": "green,", + "color": "green" + }, + { + "text": "aqua,", + "color": "aqua" + }, + { + "text": "red,", + "color": "red" + }, + { + "text": "light_purple,", + "color": "light_purple" + }, + { + "text": "yellow,", + "color": "yellow" + }, + { + "text": "white" } ] } -] \ No newline at end of file +] diff --git a/src/test/java/me/wiefferink/interactivemessenger/testing/parsergenerator/color/tagAll.txt b/src/test/java/me/wiefferink/interactivemessenger/testing/parsergenerator/color/tagAll.txt index bbc79e3..ea47956 100644 --- a/src/test/java/me/wiefferink/interactivemessenger/testing/parsergenerator/color/tagAll.txt +++ b/src/test/java/me/wiefferink/interactivemessenger/testing/parsergenerator/color/tagAll.txt @@ -1,21 +1,31 @@ [black]black, -[dark_blue]dark_blue, [darkblue]darkblue, -[dark_green]dark_green, [darkgreen]darkgreen, -[dark_aqua]dark_aqua, [darkaqua]darkaqua, -[dark_red]dark_red, [darkred]darkred, -[dark_purple]dark_purple, [darkpurple]darkpurple, +[dark_blue]dark_blue, +[dark_green]dark_green, +[dark_aqua]dark_aqua, +[dark_red]dark_red, +[dark_purple]dark_purple, [gold]gold, -[gray]gray, [grey]grey, -[dark_gray]dark_gray, [darkgray]darkgray, [dark_grey]dark_grey, [darkgrey]darkgrey, +[gray]gray, +[dark_gray]dark_gray, [blue]blue, [green]green, [aqua]aqua, [red]red, -[light_purple]light_purple, [lightpurple]lightpurple, +[light_purple]light_purple, [yellow]yellow, [white]white +[darkblue]darkblue, +[darkgray]darkgray, +[darkgreen]darkgreen, +[darkaqua]darkaqua, +[dark_grey]dark_grey, +[darkred]darkred, +[darkgrey]darkgrey, +[darkpurple]darkpurple, +[grey]grey, +[lightpurple]lightpurple, -§0black,§1dark_blue, §1darkblue,§2dark_green, §2darkgreen,§3dark_aqua, §3darkaqua,§4dark_red, §4darkred,§5dark_purple, §5darkpurple,§6gold,§7gray, §7grey,§8dark_gray, §8darkgray, §8dark_grey, §8darkgrey,§9blue,§agreen,§baqua,§cred,§dlight_purple, §dlightpurple,§eyellow,§fwhite +§0black,§1dark_blue,§2dark_green,§3dark_aqua,§4dark_red,§5dark_purple,§6gold,§7gray,§8dark_gray,§9blue,§agreen,§baqua,§cred,§dlight_purple,§eyellow,§fwhite§1darkblue,§8darkgray,§2darkgreen,§3darkaqua,§8dark_grey,§4darkred,§8darkgrey,§5darkpurple,§7grey,§dlightpurple, [ { @@ -26,107 +36,36 @@ "color": "black" }, { - "text": "", - "extra": [ - { - "text": "dark_blue, ", - "color": "dark_blue" - }, - { - "text": "darkblue,", - "color": "dark_blue" - } - ] + "text": "dark_blue,", + "color": "dark_blue" }, { - "text": "", - "extra": [ - { - "text": "dark_green, ", - "color": "dark_green" - }, - { - "text": "darkgreen,", - "color": "dark_green" - } - ] + "text": "dark_green,", + "color": "dark_green" }, { - "text": "", - "extra": [ - { - "text": "dark_aqua, ", - "color": "dark_aqua" - }, - { - "text": "darkaqua,", - "color": "dark_aqua" - } - ] + "text": "dark_aqua,", + "color": "dark_aqua" }, { - "text": "", - "extra": [ - { - "text": "dark_red, ", - "color": "dark_red" - }, - { - "text": "darkred,", - "color": "dark_red" - } - ] + "text": "dark_red,", + "color": "dark_red" }, { - "text": "", - "extra": [ - { - "text": "dark_purple, ", - "color": "dark_purple" - }, - { - "text": "darkpurple,", - "color": "dark_purple" - } - ] + "text": "dark_purple,", + "color": "dark_purple" }, { "text": "gold,", "color": "gold" }, { - "text": "", - "extra": [ - { - "text": "gray, ", - "color": "gray" - }, - { - "text": "grey,", - "color": "gray" - } - ] + "text": "gray,", + "color": "gray" }, { - "text": "", - "extra": [ - { - "text": "dark_gray, ", - "color": "dark_gray" - }, - { - "text": "darkgray, ", - "color": "dark_gray" - }, - { - "text": "dark_grey, ", - "color": "dark_gray" - }, - { - "text": "darkgrey,", - "color": "dark_gray" - } - ] + "text": "dark_gray,", + "color": "dark_gray" }, { "text": "blue,", @@ -145,17 +84,8 @@ "color": "red" }, { - "text": "", - "extra": [ - { - "text": "light_purple, ", - "color": "light_purple" - }, - { - "text": "lightpurple,", - "color": "light_purple" - } - ] + "text": "light_purple,", + "color": "light_purple" }, { "text": "yellow,", @@ -163,6 +93,46 @@ }, { "text": "white" + }, + { + "text": "darkblue,", + "color": "dark_blue" + }, + { + "text": "darkgray,", + "color": "dark_gray" + }, + { + "text": "darkgreen,", + "color": "dark_green" + }, + { + "text": "darkaqua,", + "color": "dark_aqua" + }, + { + "text": "dark_grey,", + "color": "dark_gray" + }, + { + "text": "darkred,", + "color": "dark_red" + }, + { + "text": "darkgrey,", + "color": "dark_gray" + }, + { + "text": "darkpurple,", + "color": "dark_purple" + }, + { + "text": "grey,", + "color": "gray" + }, + { + "text": "lightpurple,", + "color": "light_purple" } ] }