Skip to content

Commit bf92c70

Browse files
Add byte write-read test
1 parent c6f7cd8 commit bf92c70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

projects/client/Unit/src/unit/TestFieldTableFormatting.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,19 @@ public void TestQpidJmsTypes()
117117
{
118118
NetworkBinaryWriter w = Writer();
119119
Hashtable t = new Hashtable();
120+
t["B"] = (byte)255;
120121
t["b"] = (sbyte)-128;
121122
t["d"] = (double)123;
122123
t["f"] = (float)123;
123124
t["l"] = (long)123;
124125
t["s"] = (short)123;
125126
t["t"] = true;
126-
byte[] xbytes = new byte[] { 0xaa, 0x55 };
127+
byte[] xbytes = { 0xaa, 0x55 };
127128
t["x"] = new BinaryTableValue(xbytes);
128129
t["V"] = null;
129130
WireFormatting.WriteTable(w, t);
130131
IDictionary nt = (IDictionary)WireFormatting.ReadTable(Reader(Contents(w)));
132+
Assert.AreEqual(typeof(byte), nt["B"].GetType()); Assert.AreEqual((byte)255, nt["B"]);
131133
Assert.AreEqual(typeof(sbyte), nt["b"].GetType()); Assert.AreEqual((sbyte)-128, nt["b"]);
132134
Assert.AreEqual(typeof(double), nt["d"].GetType()); Assert.AreEqual((double)123, nt["d"]);
133135
Assert.AreEqual(typeof(float), nt["f"].GetType()); Assert.AreEqual((float)123, nt["f"]);

0 commit comments

Comments
 (0)