{"ScriptPreparationCode":null,"TestCases":[{"Name":"Bitfield","Code":"const READONLY = 1 \u003C\u003C 0;\r\n\r\nclass FileBit {\r\n constructor() {\r\n this._bitField = 0;\r\n }\r\n\r\n isReadOnly() {\r\n // Parentheses are required.\r\n return (this._bitField \u0026 READONLY) !== 0;\r\n }\r\n\r\n setReadOnly() {\r\n this._bitField = this._bitField | READONLY;\r\n }\r\n\r\n unsetReadOnly() {\r\n this._bitField = this._bitField \u0026 (~READONLY);\r\n }\r\n}\r\nvar ft = new FileBit;\r\nft.isReadOnly() === true;\r\nft.setReadOnly();\r\nft.unsetReadOnly();\r\nft.isReadOnly() === false;","IsDeferred":false},{"Name":"True","Code":"class FileBool {\r\n constructor() {\r\n this._readonly = false;\r\n }\r\n\r\n isReadOnly() {\r\n // Parentheses are required.\r\n return this._readonly;\r\n }\r\n\r\n setReadOnly() {\r\n this._readonly = true;\r\n }\r\n\r\n unsetReadOnly() {\r\n this._readonly = false;\r\n }\r\n}\r\nvar fb = new FileBool;\r\nfb.isReadOnly() === true;\r\nfb.setReadOnly();\r\nfb.unsetReadOnly();\r\nfb.isReadOnly() === false;","IsDeferred":false}]}