Skip to content

Commit

Permalink
Fixed RenderModuleWidth() function to include WideBarToNarrowBarWidth… (
Browse files Browse the repository at this point in the history
#185)

* Fixed RenderModuleWidth() function to include WideBarToNarrowBarWidthRatio in return string.
* Fixed unit tests for changes to ZplBarcode
  • Loading branch information
wboxx1 authored Sep 13, 2023
1 parent b2694a7 commit 31f78c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/BinaryKits.Zpl.Label.UnitTest/BarcodeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void Barcode39()

Debug.WriteLine(output);
Assert.IsNotNull(output);
Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,100\n^BY2\n^B3N,N,100,Y,N\n^FD123ABC^FS\n^XZ", output);
Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,100\n^BY2,3\n^B3N,N,100,Y,N\n^FD123ABC^FS\n^XZ", output);
}

[TestMethod]
Expand All @@ -37,7 +37,7 @@ public void Barcode128()

Debug.WriteLine(output);
Assert.IsNotNull(output);
Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,300\n^BY2\n^BCN,100,Y,N\n^FD123ABC^FS\n^XZ", output);
Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,300\n^BY2,3\n^BCN,100,Y,N\n^FD123ABC^FS\n^XZ", output);
}

[TestMethod]
Expand All @@ -53,7 +53,7 @@ public void BarcodeEan13()

Debug.WriteLine(output);
Assert.IsNotNull(output);
Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,300\n^BY2\n^BEN,100,Y,N\n^FD123456^FS\n^XZ", output);
Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,300\n^BY2,3\n^BEN,100,Y,N\n^FD123456^FS\n^XZ", output);
}
}
}
2 changes: 1 addition & 1 deletion src/BinaryKits.Zpl.Label/Elements/ZplBarcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected string RenderFieldOrientation()

protected string RenderModuleWidth()
{
return $"^BY{ModuleWidth}";
return $"^BY{ModuleWidth},{WideBarToNarrowBarWidthRatio}";
}

protected bool IsDigitsOnly(string text)
Expand Down

0 comments on commit 31f78c7

Please sign in to comment.