Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–38 unchanged (38 lines)
39 TEST_METHOD(Profile);
40 TEST_METHOD(ColorScheme);
41 TEST_METHOD(Actions);
42 TEST_METHOD(CascadiaSettings);
43 TEST_METHOD(LegacyFontSettings);
44
45 TEST_METHOD(RoundtripReloadEnvVars);
46 TEST_METHOD(DontRoundtripNoReloadEnvVars);
47
48 private:
49 // Method Description:
50 // - deserializes and reserializes a json string representing a settings object model of type T
51 // - verifies that the generated json string matches the provided one
52 // Template Types:
…lines 53–625 unchanged (573 lines)
626 newLoader.MergeInboxIntoUserSettings();
627 newLoader.FinalizeLayering();
628 newLoader.FixupUserSettings();
629 const auto newSettings = winrt::make_self<implementation::CascadiaSettings>(std::move(newLoader));
630 VERIFY_IS_FALSE(newSettings->ProfileDefaults().HasReloadEnvironmentVariables(),
631 L"Ensure that the new settings object didn't find a reloadEnvironmentVariables");
632 }
633}
634

After

…lines 1–39 unchanged (39 lines)
40 TEST_METHOD(ColorScheme);
41 TEST_METHOD(Actions);
42 TEST_METHOD(CascadiaSettings);
43 TEST_METHOD(LegacyFontSettings);
44
45 TEST_METHOD(RoundtripReloadEnvVars);
46 TEST_METHOD(DontRoundtripNoReloadEnvVars);
47
48 TEST_METHOD(RoundtripUserModifiedColorSchemeCollision);
49 TEST_METHOD(RoundtripUserModifiedColorSchemeCollisionUnusedByProfiles);
50 TEST_METHOD(RoundtripUserDeletedColorSchemeCollision);
51
52 private:
53 // Method Description:
54 // - deserializes and reserializes a json string representing a settings object model of type T
55 // - verifies that the generated json string matches the provided one
56 // Template Types:
…lines 57–631 unchanged (575 lines)
632 newLoader.FixupUserSettings();
633 const auto newSettings = winrt::make_self<implementation::CascadiaSettings>(std::move(newLoader));
634 VERIFY_IS_FALSE(newSettings->ProfileDefaults().HasReloadEnvironmentVariables(),
635 L"Ensure that the new settings object didn't find a reloadEnvironmentVariables");
636 }
637
638 void SerializationTests::RoundtripUserModifiedColorSchemeCollision()
639 {
640 static constexpr std::string_view oldSettingsJson{ R"(
641 {
642 "defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
643 "profiles": [
644 {
645 "name": "profile0",
646 "guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
647 },
648 {
649 "name": "profile1",
650 "colorScheme": "Tango Dark",
651 "guid": "{d0a65a9d-8665-4128-97a4-a581aa747aa7}"
652 }
653 ],
654 "schemes": [
655 {
656 "background": "#121314",
657 "black": "#121314",
658 "blue": "#121314",
659 "brightBlack": "#121314",
660 "brightBlue": "#121314",
661 "brightCyan": "#121314",
662 "brightGreen": "#121314",
663 "brightPurple": "#121314",
664 "brightRed": "#121314",
665 "brightWhite": "#121314",
666 "brightYellow": "#121314",
667 "cursorColor": "#121314",
668 "cyan": "#121314",
669 "foreground": "#121314",
670 "green": "#121314",
671 "name": "Campbell",
672 "purple": "#121314",
673 "red": "#121314",
674 "selectionBackground": "#121314",
675 "white": "#121314",
676 "yellow": "#121314"
677 },
678 {
679 "background": "#000000",
680 "black": "#000000",
681 "blue": "#3465A4",
682 "brightBlack": "#555753",
683 "brightBlue": "#729FCF",
684 "brightCyan": "#34E2E2",
685 "brightGreen": "#8AE234",
686 "brightPurple": "#AD7FA8",
687 "brightRed": "#EF2929",
688 "brightWhite": "#EEEEEC",
689 "brightYellow": "#FCE94F",
690 "cursorColor": "#FFFFFF",
691 "cyan": "#06989A",
692 "foreground": "#D3D7CF",
693 "green": "#4E9A06",
694 "name": "Tango Dark",
695 "purple": "#75507B",
696 "red": "#CC0000",
697 "selectionBackground": "#FFFFFF",
698 "white": "#D3D7CF",
699 "yellow": "#C4A000"
700 },
701 ]
702 })" };
703
704 // Key differences: one fewer color scheme (Tango Dark has been deleted) and defaults.colorScheme is set.
705 static constexpr std::string_view newSettingsJson{ R"-(
706 {
707 "defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
708 "profiles":
709 {
710 "defaults": {
711 "colorScheme": "Campbell (modified)"
712 },
713 "list":
714 [
715 {
716 "name": "profile0",
717 "guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
718 },
719 {
720 "name": "profile1",
721 "colorScheme": "Tango Dark",
722 "guid": "{d0a65a9d-8665-4128-97a4-a581aa747aa7}"
723 }
724 ]
725 },
726 "actions": [ ],
727 "schemes": [
728 {
729 "background": "#121314",
730 "black": "#121314",
731 "blue": "#121314",
732 "brightBlack": "#121314",
733 "brightBlue": "#121314",
734 "brightCyan": "#121314",
735 "brightGreen": "#121314",
736 "brightPurple": "#121314",
737 "brightRed": "#121314",
738 "brightWhite": "#121314",
739 "brightYellow": "#121314",
740 "cursorColor": "#121314",
741 "cyan": "#121314",
742 "foreground": "#121314",
743 "green": "#121314",
744 "name": "Campbell",
745 "purple": "#121314",
746 "red": "#121314",
747 "selectionBackground": "#121314",
748 "white": "#121314",
749 "yellow": "#121314"
750 }
751 ]
752 })-" };
753
754 implementation::SettingsLoader oldLoader{ oldSettingsJson, DefaultJson };
755 oldLoader.MergeInboxIntoUserSettings();
756 oldLoader.FinalizeLayering();
757 VERIFY_IS_TRUE(oldLoader.FixupUserSettings(), L"Validate that this will indicate we need to write them back to disk");
758 const auto oldSettings = winrt::make_self<implementation::CascadiaSettings>(std::move(oldLoader));
759 const auto oldResult{ oldSettings->ToJson() };
760
761 implementation::SettingsLoader newLoader{ newSettingsJson, DefaultJson };
762 newLoader.MergeInboxIntoUserSettings();
763 newLoader.FinalizeLayering();
764 newLoader.FixupUserSettings();
765 const auto newSettings = winrt::make_self<implementation::CascadiaSettings>(std::move(newLoader));
766 const auto newResult{ newSettings->ToJson() };
767
768 VERIFY_ARE_EQUAL(toString(newResult), toString(oldResult));
769 }
770
771 void SerializationTests::RoundtripUserModifiedColorSchemeCollisionUnusedByProfiles()
772 {
773 static constexpr std::string_view oldSettingsJson{ R"(
774 {
775 "defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
776 "profiles": [
777 {
778 "name": "profile0",
779 "guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
780 }
781 ],
782 "schemes": [
783 {
784 "background": "#111111",
785 "black": "#111111",
786 "blue": "#111111",
787 "brightBlack": "#111111",
788 "brightBlue": "#111111",
789 "brightCyan": "#111111",
790 "brightGreen": "#111111",
791 "brightPurple": "#111111",
792 "brightRed": "#111111",
793 "brightWhite": "#111111",
794 "brightYellow": "#111111",
795 "cursorColor": "#111111",
796 "cyan": "#111111",
797 "foreground": "#111111",
798 "green": "#111111",
799 "name": "Tango Dark",
800 "purple": "#111111",
801 "red": "#111111",
802 "selectionBackground": "#111111",
803 "white": "#111111",
804 "yellow": "#111111"
805 },
806 ]
807 })" };
808
809 // Key differences: Tango Dark has been renamed; nothing else has changed
810 static constexpr std::string_view newSettingsJson{ R"-(
811 {
812 "defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
813 "profiles":
814 {
815 "list":
816 [
817 {
818 "name": "profile0",
819 "guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
820 }
821 ]
822 },
823 "actions": [ ],
824 "schemes": [
825 {
826 "background": "#111111",
827 "black": "#111111",
828 "blue": "#111111",
829 "brightBlack": "#111111",
830 "brightBlue": "#111111",
831 "brightCyan": "#111111",
832 "brightGreen": "#111111",
833 "brightPurple": "#111111",
834 "brightRed": "#111111",
835 "brightWhite": "#111111",
836 "brightYellow": "#111111",
837 "cursorColor": "#111111",
838 "cyan": "#111111",
839 "foreground": "#111111",
840 "green": "#111111",
841 "name": "Tango Dark (modified)",
842 "purple": "#111111",
843 "red": "#111111",
844 "selectionBackground": "#111111",
845 "white": "#111111",
846 "yellow": "#111111"
847 },
848 ]
849 })-" };
850
851 implementation::SettingsLoader oldLoader{ oldSettingsJson, DefaultJson };
852 oldLoader.MergeInboxIntoUserSettings();
853 oldLoader.FinalizeLayering();
854 VERIFY_IS_TRUE(oldLoader.FixupUserSettings(), L"Validate that this will indicate we need to write them back to disk");
855 const auto oldSettings = winrt::make_self<implementation::CascadiaSettings>(std::move(oldLoader));
856 const auto oldResult{ oldSettings->ToJson() };
857
858 implementation::SettingsLoader newLoader{ newSettingsJson, DefaultJson };
859 newLoader.MergeInboxIntoUserSettings();
860 newLoader.FinalizeLayering();
861 newLoader.FixupUserSettings();
862 const auto newSettings = winrt::make_self<implementation::CascadiaSettings>(std::move(newLoader));
863 const auto newResult{ newSettings->ToJson() };
864
865 VERIFY_ARE_EQUAL(toString(newResult), toString(oldResult));
866 }
867
868 void SerializationTests::RoundtripUserDeletedColorSchemeCollision()
869 {
870 static constexpr std::string_view oldSettingsJson{ R"(
871 {
872 "defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
873 "profiles": [
874 {
875 "name": "profile0",
876 "guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
877 }
878 ],
879 "schemes": [
880 {
881 "name": "Tango Dark",
882 "foreground": "#D3D7CF",
883 "background": "#000000",
884 "cursorColor": "#FFFFFF",
885 "black": "#000000",
886 "red": "#CC0000",
887 "green": "#4E9A06",
888 "yellow": "#C4A000",
889 "blue": "#3465A4",
890 "purple": "#75507B",
891 "cyan": "#06989A",
892 "white": "#D3D7CF",
893 "brightBlack": "#555753",
894 "brightRed": "#EF2929",
895 "brightGreen": "#8AE234",
896 "brightYellow": "#FCE94F",
897 "brightBlue": "#729FCF",
898 "brightPurple": "#AD7FA8",
899 "brightCyan": "#34E2E2",
900 "brightWhite": "#EEEEEC"
901 }
902 ]
903 })" };
904
905 // Key differences: Tango Dark has been deleted, as it was identical to the inbox one.
906 static constexpr std::string_view newSettingsJson{ R"-(
907 {
908 "defaultProfile": "{6239a42c-0000-49a3-80bd-e8fdd045185c}",
909 "profiles":
910 {
911 "list":
912 [
913 {
914 "name": "profile0",
915 "guid": "{6239a42c-0000-49a3-80bd-e8fdd045185c}"
916 }
917 ]
918 },
919 "actions": [ ],
920 "schemes": [ ]
921 })-" };
922
923 implementation::SettingsLoader oldLoader{ oldSettingsJson, DefaultJson };
924 oldLoader.MergeInboxIntoUserSettings();
925 oldLoader.FinalizeLayering();
926 VERIFY_IS_TRUE(oldLoader.FixupUserSettings(), L"Validate that this will indicate we need to write them back to disk");
927 const auto oldSettings = winrt::make_self<implementation::CascadiaSettings>(std::move(oldLoader));
928 const auto oldResult{ oldSettings->ToJson() };
929
930 implementation::SettingsLoader newLoader{ newSettingsJson, DefaultJson };
931 newLoader.MergeInboxIntoUserSettings();
932 newLoader.FinalizeLayering();
933 newLoader.FixupUserSettings();
934 const auto newSettings = winrt::make_self<implementation::CascadiaSettings>(std::move(newLoader));
935 const auto newResult{ newSettings->ToJson() };
936
937 VERIFY_ARE_EQUAL(toString(newResult), toString(oldResult));
938 }
939}
940

Before

translation_unit
comment "// Copyright (c) Microsoft Corporation.\r"
comment "// Licensed under the MIT license.\r"
preproc_include
#include "#include"
string_literal
" "\""
string_content "pch.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "../TerminalSettingsModel/ColorScheme.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "../TerminalSettingsModel/CascadiaSettings.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "JsonTestClass.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "TestUtils.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<defaults.h>"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "Microsoft"
:: "::"
identifier "Console"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "WEX"
:: "::"
identifier "Logging"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "WEX"
:: "::"
identifier "TestExecution"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "WEX"
:: "::"
identifier "Common"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "winrt"
:: "::"
qualified_identifier
namespace_identifier "Microsoft"
:: "::"
qualified_identifier
namespace_identifier "Terminal"
:: "::"
qualified_identifier
namespace_identifier "Settings"
:: "::"
identifier "Model"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "winrt"
:: "::"
qualified_identifier
namespace_identifier "Microsoft"
:: "::"
qualified_identifier
namespace_identifier "Terminal"
:: "::"
identifier "Control"
; ";"
namespace_definition
namespace "namespace"
namespace_identifier "SettingsModelLocalTests"
declaration_list
{ "{"
comment "// TODO:microsoft/terminal#3838:\r"
comment "// Unfortunately, these tests _WILL NOT_ work in our CI. We'"...
comment "// an updated TAEF that will let us install framework packag"...
comment "// package is deployed. Until then, these tests won't deploy"...
class_specifier
class "class"
type_identifier "SerializationTests"
base_class_clause
: ":"
access_specifier
public "public"
type_identifier "JsonTestClass"
field_declaration_list
{ "{"
comment "// Use a custom AppxManifest to ensure that we can activate "...
comment "// from our test. This property will tell taef to manually u"...
comment "// the AppxManifest for this test class.\r"
comment "// This does not yet work for anything XAML-y. See TabTests."...
comment "// details on that.\r"
field_declaration
type_identifier "BEGIN_TEST_CLASS"
parenthesized_declarator
( "("
field_identifier "SerializationTests"
) ")"
; ""
field_declaration
type_identifier "TEST_CLASS_PROPERTY"
parenthesized_declarator
( "("
ERROR
identifier "L"
" "\""
identifier "RunAs"
" "\""
, ","
L" "L\""
identifier "UAP"
" "\""
) ")"
function_declarator (+22 nodes collapsed)
function_declarator
field_identifier "END_TEST_CLASS"
parameter_list
( "("
) ")"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "GlobalSettings"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "Profile"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "ColorScheme"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "Actions"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "CascadiaSettings"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "LegacyFontSettings"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "RoundtripReloadEnvVars"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "DontRoundtripNoReloadEnvVars"
) ")"
) ""
; ";"
access_specifier
private "private"
: ":"
comment "// Method Description:\r"
comment "// - deserializes and reserializes a json string representin"...
comment "// - verifies that the generated json string matches the pro"...
comment "// Template Types:\r"
comment "// - <T>: The type of Settings Model object to generate (mus"...
comment "// Arguments:\r"
comment "// - jsonString - JSON string we're performing the test on\r"
comment "// Return Value:\r"
comment "// - the JsonObject representing this instance\r"
template_declaration (+108 nodes collapsed)
comment "// Helper to remove the `$schema` property from a json objec"...
comment "// populate that based off the local path to the settings fi"...
comment "// course, that's entirely unpredictable in tests. So cut it"...
comment "// we do any sort of roundtrip testing.\r"
function_definition (+59 nodes collapsed)
} "}"
; ";"
function_definition (+89 nodes collapsed)
function_definition (+130 nodes collapsed)
function_definition (+51 nodes collapsed)
function_definition (+737 nodes collapsed)
function_definition (+117 nodes collapsed)
function_definition (+151 nodes collapsed)
function_definition (+281 nodes collapsed)
function_definition (+259 nodes collapsed)
} "}"

After

translation_unit
comment "// Copyright (c) Microsoft Corporation.\r"
comment "// Licensed under the MIT license.\r"
preproc_include
#include "#include"
string_literal
" "\""
string_content "pch.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "../TerminalSettingsModel/ColorScheme.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "../TerminalSettingsModel/CascadiaSettings.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "JsonTestClass.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "TestUtils.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<defaults.h>"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "Microsoft"
:: "::"
identifier "Console"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "WEX"
:: "::"
identifier "Logging"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "WEX"
:: "::"
identifier "TestExecution"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "WEX"
:: "::"
identifier "Common"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "winrt"
:: "::"
qualified_identifier
namespace_identifier "Microsoft"
:: "::"
qualified_identifier
namespace_identifier "Terminal"
:: "::"
qualified_identifier
namespace_identifier "Settings"
:: "::"
identifier "Model"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "winrt"
:: "::"
qualified_identifier
namespace_identifier "Microsoft"
:: "::"
qualified_identifier
namespace_identifier "Terminal"
:: "::"
identifier "Control"
; ";"
namespace_definition
namespace "namespace"
namespace_identifier "SettingsModelLocalTests"
declaration_list
{ "{"
comment "// TODO:microsoft/terminal#3838:\r"
comment "// Unfortunately, these tests _WILL NOT_ work in our CI. We'"...
comment "// an updated TAEF that will let us install framework packag"...
comment "// package is deployed. Until then, these tests won't deploy"...
class_specifier
class "class"
type_identifier "SerializationTests"
base_class_clause
: ":"
access_specifier
public "public"
type_identifier "JsonTestClass"
field_declaration_list
{ "{"
comment "// Use a custom AppxManifest to ensure that we can activate "...
comment "// from our test. This property will tell taef to manually u"...
comment "// the AppxManifest for this test class.\r"
comment "// This does not yet work for anything XAML-y. See TabTests."...
comment "// details on that.\r"
field_declaration
type_identifier "BEGIN_TEST_CLASS"
parenthesized_declarator
( "("
field_identifier "SerializationTests"
) ")"
; ""
field_declaration
type_identifier "TEST_CLASS_PROPERTY"
parenthesized_declarator
( "("
ERROR
identifier "L"
" "\""
identifier "RunAs"
" "\""
, ","
L" "L\""
identifier "UAP"
" "\""
) ")"
function_declarator (+22 nodes collapsed)
function_declarator
field_identifier "END_TEST_CLASS"
parameter_list
( "("
) ")"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "GlobalSettings"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "Profile"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "ColorScheme"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "Actions"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "CascadiaSettings"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "LegacyFontSettings"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "RoundtripReloadEnvVars"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "DontRoundtripNoReloadEnvVars"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "RoundtripUserModifiedColorSchemeCollision"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "RoundtripUserModifiedColorSchemeCollisionUnusedByProfiles"
) ")"
; ";"
function_declarator
field_identifier "TEST_METHOD"
parameter_list
( "("
parameter_declaration
type_identifier "RoundtripUserDeletedColorSchemeCollision"
) ")"
) ""
; ";"
access_specifier
private "private"
: ":"
comment "// Method Description:\r"
comment "// - deserializes and reserializes a json string representin"...
comment "// - verifies that the generated json string matches the pro"...
comment "// Template Types:\r"
comment "// - <T>: The type of Settings Model object to generate (mus"...
comment "// Arguments:\r"
comment "// - jsonString - JSON string we're performing the test on\r"
comment "// Return Value:\r"
comment "// - the JsonObject representing this instance\r"
template_declaration (+108 nodes collapsed)
comment "// Helper to remove the `$schema` property from a json objec"...
comment "// populate that based off the local path to the settings fi"...
comment "// course, that's entirely unpredictable in tests. So cut it"...
comment "// we do any sort of roundtrip testing.\r"
function_definition (+59 nodes collapsed)
} "}"
; ";"
function_definition (+89 nodes collapsed)
function_definition (+130 nodes collapsed)
function_definition (+51 nodes collapsed)
function_definition (+737 nodes collapsed)
function_definition (+117 nodes collapsed)
function_definition (+151 nodes collapsed)
function_definition (+281 nodes collapsed)
function_definition (+259 nodes collapsed)
function_definition
primitive_type "void"
function_declarator
qualified_identifier
namespace_identifier "SerializationTests"
:: "::"
identifier "RoundtripUserModifiedColorSchemeCollision"
parameter_list
( "("
) ")"
compound_statement
{ "{"
declaration
storage_class_specifier
static "static"
type_qualifier
constexpr "constexpr"
qualified_identifier
namespace_identifier "std"
:: "::"
type_identifier "string_view"
init_declarator
identifier "oldSettingsJson"
initializer_list
{ "{"
raw_string_literal
R" "R\""
( "("
raw_string_content "\r\n {\r\n \"defaultProfile\": \"{6239a42c-0000-4"...
) ")"
" "\""
} "}"
; ";"
comment "// Key differences: one fewer color scheme (Tango Dark has b"...
declaration
storage_class_specifier
static "static"
type_qualifier
constexpr "constexpr"
qualified_identifier
namespace_identifier "std"
:: "::"
type_identifier "string_view"
init_declarator
identifier "newSettingsJson"
initializer_list
{ "{"
raw_string_literal
R" "R\""
raw_string_delimiter "-"
( "("
raw_string_content "\r\n {\r\n \"defaultProfile\": \"{6239a42c-0000-4"...
) ")"
raw_string_delimiter "-"
" "\""
} "}"
; ";"
declaration
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "SettingsLoader"
init_declarator
identifier "oldLoader"
initializer_list
{ "{"
identifier "oldSettingsJson"
, ","
identifier "DefaultJson"
} "}"
; ";"
expression_statement
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "MergeInboxIntoUserSettings"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "FinalizeLayering"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
identifier "VERIFY_IS_TRUE"
argument_list
( "("
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "FixupUserSettings"
argument_list
( "("
) ")"
, ","
string_literal
L" "L\""
string_content "Validate that this will indicate we need to write them back "...
" "\""
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "oldSettings"
= "="
call_expression
qualified_identifier
namespace_identifier "winrt"
:: "::"
template_function
identifier "make_self"
template_argument_list
< "<"
type_descriptor
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "CascadiaSettings"
> ">"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "move"
argument_list
( "("
identifier "oldLoader"
) ")"
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "oldResult"
initializer_list
{ "{"
call_expression
field_expression
identifier "oldSettings"
-> "->"
field_identifier "ToJson"
argument_list
( "("
) ")"
} "}"
; ";"
declaration
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "SettingsLoader"
init_declarator
identifier "newLoader"
initializer_list
{ "{"
identifier "newSettingsJson"
, ","
identifier "DefaultJson"
} "}"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "MergeInboxIntoUserSettings"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "FinalizeLayering"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "FixupUserSettings"
argument_list
( "("
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "newSettings"
= "="
call_expression
qualified_identifier
namespace_identifier "winrt"
:: "::"
template_function
identifier "make_self"
template_argument_list
< "<"
type_descriptor
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "CascadiaSettings"
> ">"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "move"
argument_list
( "("
identifier "newLoader"
) ")"
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "newResult"
initializer_list
{ "{"
call_expression
field_expression
identifier "newSettings"
-> "->"
field_identifier "ToJson"
argument_list
( "("
) ")"
} "}"
; ";"
expression_statement
call_expression
identifier "VERIFY_ARE_EQUAL"
argument_list
( "("
call_expression
identifier "toString"
argument_list
( "("
identifier "newResult"
) ")"
, ","
call_expression
identifier "toString"
argument_list
( "("
identifier "oldResult"
) ")"
) ")"
; ";"
} "}"
function_definition
primitive_type "void"
function_declarator
qualified_identifier
namespace_identifier "SerializationTests"
:: "::"
identifier "RoundtripUserModifiedColorSchemeCollisionUnusedByProfiles"
parameter_list
( "("
) ")"
compound_statement
{ "{"
declaration
storage_class_specifier
static "static"
type_qualifier
constexpr "constexpr"
qualified_identifier
namespace_identifier "std"
:: "::"
type_identifier "string_view"
init_declarator
identifier "oldSettingsJson"
initializer_list
{ "{"
raw_string_literal
R" "R\""
( "("
raw_string_content "\r\n {\r\n \"defaultProfile\": \"{6239a42c-0000-4"...
) ")"
" "\""
} "}"
; ";"
comment "// Key differences: Tango Dark has been renamed; nothing els"...
declaration
storage_class_specifier
static "static"
type_qualifier
constexpr "constexpr"
qualified_identifier
namespace_identifier "std"
:: "::"
type_identifier "string_view"
init_declarator
identifier "newSettingsJson"
initializer_list
{ "{"
raw_string_literal
R" "R\""
raw_string_delimiter "-"
( "("
raw_string_content "\r\n {\r\n \"defaultProfile\": \"{6239a42c-0000-4"...
) ")"
raw_string_delimiter "-"
" "\""
} "}"
; ";"
declaration
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "SettingsLoader"
init_declarator
identifier "oldLoader"
initializer_list
{ "{"
identifier "oldSettingsJson"
, ","
identifier "DefaultJson"
} "}"
; ";"
expression_statement
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "MergeInboxIntoUserSettings"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "FinalizeLayering"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
identifier "VERIFY_IS_TRUE"
argument_list
( "("
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "FixupUserSettings"
argument_list
( "("
) ")"
, ","
string_literal
L" "L\""
string_content "Validate that this will indicate we need to write them back "...
" "\""
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "oldSettings"
= "="
call_expression
qualified_identifier
namespace_identifier "winrt"
:: "::"
template_function
identifier "make_self"
template_argument_list
< "<"
type_descriptor
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "CascadiaSettings"
> ">"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "move"
argument_list
( "("
identifier "oldLoader"
) ")"
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "oldResult"
initializer_list
{ "{"
call_expression
field_expression
identifier "oldSettings"
-> "->"
field_identifier "ToJson"
argument_list
( "("
) ")"
} "}"
; ";"
declaration
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "SettingsLoader"
init_declarator
identifier "newLoader"
initializer_list
{ "{"
identifier "newSettingsJson"
, ","
identifier "DefaultJson"
} "}"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "MergeInboxIntoUserSettings"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "FinalizeLayering"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "FixupUserSettings"
argument_list
( "("
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "newSettings"
= "="
call_expression
qualified_identifier
namespace_identifier "winrt"
:: "::"
template_function
identifier "make_self"
template_argument_list
< "<"
type_descriptor
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "CascadiaSettings"
> ">"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "move"
argument_list
( "("
identifier "newLoader"
) ")"
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "newResult"
initializer_list
{ "{"
call_expression
field_expression
identifier "newSettings"
-> "->"
field_identifier "ToJson"
argument_list
( "("
) ")"
} "}"
; ";"
expression_statement
call_expression
identifier "VERIFY_ARE_EQUAL"
argument_list
( "("
call_expression
identifier "toString"
argument_list
( "("
identifier "newResult"
) ")"
, ","
call_expression
identifier "toString"
argument_list
( "("
identifier "oldResult"
) ")"
) ")"
; ";"
} "}"
function_definition
primitive_type "void"
function_declarator
qualified_identifier
namespace_identifier "SerializationTests"
:: "::"
identifier "RoundtripUserDeletedColorSchemeCollision"
parameter_list
( "("
) ")"
compound_statement
{ "{"
declaration
storage_class_specifier
static "static"
type_qualifier
constexpr "constexpr"
qualified_identifier
namespace_identifier "std"
:: "::"
type_identifier "string_view"
init_declarator
identifier "oldSettingsJson"
initializer_list
{ "{"
raw_string_literal
R" "R\""
( "("
raw_string_content "\r\n {\r\n \"defaultProfile\": \"{6239a42c-0000-4"...
) ")"
" "\""
} "}"
; ";"
comment "// Key differences: Tango Dark has been deleted, as it was i"...
declaration
storage_class_specifier
static "static"
type_qualifier
constexpr "constexpr"
qualified_identifier
namespace_identifier "std"
:: "::"
type_identifier "string_view"
init_declarator
identifier "newSettingsJson"
initializer_list
{ "{"
raw_string_literal
R" "R\""
raw_string_delimiter "-"
( "("
raw_string_content "\r\n {\r\n \"defaultProfile\": \"{6239a42c-0000-4"...
) ")"
raw_string_delimiter "-"
" "\""
} "}"
; ";"
declaration
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "SettingsLoader"
init_declarator
identifier "oldLoader"
initializer_list
{ "{"
identifier "oldSettingsJson"
, ","
identifier "DefaultJson"
} "}"
; ";"
expression_statement
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "MergeInboxIntoUserSettings"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "FinalizeLayering"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
identifier "VERIFY_IS_TRUE"
argument_list
( "("
call_expression
field_expression
identifier "oldLoader"
. "."
field_identifier "FixupUserSettings"
argument_list
( "("
) ")"
, ","
string_literal
L" "L\""
string_content "Validate that this will indicate we need to write them back "...
" "\""
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "oldSettings"
= "="
call_expression
qualified_identifier
namespace_identifier "winrt"
:: "::"
template_function
identifier "make_self"
template_argument_list
< "<"
type_descriptor
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "CascadiaSettings"
> ">"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "move"
argument_list
( "("
identifier "oldLoader"
) ")"
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "oldResult"
initializer_list
{ "{"
call_expression
field_expression
identifier "oldSettings"
-> "->"
field_identifier "ToJson"
argument_list
( "("
) ")"
} "}"
; ";"
declaration
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "SettingsLoader"
init_declarator
identifier "newLoader"
initializer_list
{ "{"
identifier "newSettingsJson"
, ","
identifier "DefaultJson"
} "}"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "MergeInboxIntoUserSettings"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "FinalizeLayering"
argument_list
( "("
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "newLoader"
. "."
field_identifier "FixupUserSettings"
argument_list
( "("
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "newSettings"
= "="
call_expression
qualified_identifier
namespace_identifier "winrt"
:: "::"
template_function
identifier "make_self"
template_argument_list
< "<"
type_descriptor
qualified_identifier
namespace_identifier "implementation"
:: "::"
type_identifier "CascadiaSettings"
> ">"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "move"
argument_list
( "("
identifier "newLoader"
) ")"
) ")"
; ";"
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
identifier "newResult"
initializer_list
{ "{"
call_expression
field_expression
identifier "newSettings"
-> "->"
field_identifier "ToJson"
argument_list
( "("
) ")"
} "}"
; ";"
expression_statement
call_expression
identifier "VERIFY_ARE_EQUAL"
argument_list
( "("
call_expression
identifier "toString"
argument_list
( "("
identifier "newResult"
) ")"
, ","
call_expression
identifier "toString"
argument_list
( "("
identifier "oldResult"
) ")"
) ")"
; ";"
} "}"
} "}"