Пример #1
0
        public void it_uses_local_encoding_as_default()
        {
            var mock           = GetMock("");
            var encodingParser = new EncodingParser(mock.Object);

            encodingParser.GetEncoding().ShouldBe(Encoding.Default);
        }
Пример #2
0
        public void it_chooses_character_set_as_encoding()
        {
            var mock           = GetMock("unicode");
            var encodingParser = new EncodingParser(mock.Object);

            encodingParser.GetEncoding().ShouldBe(Encoding.Unicode);
        }
			public static void Parse(IEnumerable<NasmEncodingToken> tokens, VexOpcodeEncoding vexEncoding,
				out Opcode opcode, out InstructionEncoding encoding)
			{
				Contract.Requires(tokens != null);

				var parser = new EncodingParser();
				parser.Parse(tokens, vexEncoding);
				opcode = parser.opcode;
				encoding = parser.encoding;
			}