{"ScriptPreparationCode":"var map = new Map([\r\n [0, \u0022Initializing\u0022],\r\n [1, \u0022Idle\u0022],\r\n [2, \u0022Running\u0022],\r\n [3, \u0022Stop\u0022],\r\n [4, \u0022Error\u0022],\r\n]);\r\nfunction switchCase(value) {\r\n switch (value) {\r\n case 0: return \u0022Initializing\u0022;\r\n case 1: return \u0022Idle\u0022;\r\n case 2: return \u0022Running\u0022;\r\n case 3: return \u0022Stop\u0022;\r\n case 4: return \u0022Error\u0022;\r\n default: return void 0;\r\n }\r\n}\r\nfunction ifElse(value) {\r\n if (value === 0) {\r\n return \u0022Initializing\u0022;\r\n } else if (value === 1) {\r\n return \u0022Idle\u0022;\r\n } else if (value === 2) {\r\n return \u0022Running\u0022;\r\n } else if (value === 3) {\r\n return \u0022Stop\u0022;\r\n } else if (value === 4) {\r\n return \u0022Error\u0022;\r\n }\r\n}","TestCases":[{"Name":"map lookup","Code":"let value = map.get(0);\r\nvalue = map.get(32);\r\nvalue = map.get(1);\r\nvalue = map.get(33);\r\nvalue = map.get(2);\r\nvalue = map.get(34);\r\nvalue = map.get(3);\r\nvalue = map.get(35);\r\nvalue = map.get(4);","IsDeferred":false},{"Name":"switch case","Code":"let value = switchCase(0);\r\nvalue = switchCase(32);\r\nvalue = switchCase(1);\r\nvalue = switchCase(33);\r\nvalue = switchCase(2);\r\nvalue = switchCase(34);\r\nvalue = switchCase(3);\r\nvalue = switchCase(35);\r\nvalue = switchCase(4);","IsDeferred":false},{"Name":"if/else","Code":"let value = ifElse(0);\r\nvalue = ifElse(32);\r\nvalue = ifElse(1);\r\nvalue = ifElse(33);\r\nvalue = ifElse(2);\r\nvalue = ifElse(34);\r\nvalue = ifElse(3);\r\nvalue = ifElse(35);\r\nvalue = ifElse(4);","IsDeferred":false}]}