Commit b1763b9a authored by kravtsov's avatar kravtsov

[+] Добавлен тест duGS1Barcode

parent 172c5986
......@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=13
Release=0
Build=480
Build=481
Debug=0
PreRelease=0
Special=0
......@@ -126,9 +126,9 @@ CodePage=1252
[Version Info Keys]
CompanyName=SHTRIH-M
FileDescription=OPOS setup utility
FileVersion=1.13.0.480
InternalName=OPOS setup
LegalCopyright=SHTRIH-M 2013
FileVersion=1.13.0.481
InternalName=OPOS setup
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
OriginalFilename=OposConfig.exe
ProductName=OPOS drivers
......@@ -140,16 +140,12 @@ C:\Program Files (x86)\Borland\Delphi7\Projects\Bpl\PngComponentsD7.bpl=Png comp
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=2
Item0=C:\COMPON~1\JVCL\jcl\lib\d7\debug
Item1=$(DELPHI)\Lib\Debug
Count=1
Item0=$(DELPHI)\Lib\Debug
[HistoryLists\hlUnitOutputDirectory]
Count=2
Item0=DCU
Item1=..\lib\D7
[HistoryLists\hlOutputDirectorry]
Count=1
Item0=..\..\Bin
[HistoryLists\hlBPLOutput]
Count=3
Item0=$(DELPHI)\Bin\
......
[Closed Files]
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\DirectIOAPI.pas',0,1,1,1,9,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\SmResourceStrings.pas',0,1,1,1,1,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\PrinterParameters.pas',0,1,1,24,7,0,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\PrinterTest.pas',0,1,4448,16,4465,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas',0,1,5123,1,5130,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FSSalesReceipt.pas',0,1,1617,3,1621,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\ReceiptTemplate.pas',0,1,288,79,300,0,0
File_7=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\SharedPrinter.pas',0,1,802,25,806,0,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',0,1,1,1,1,0,0
File_9=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\GS1Barcode.pas',0,1,35,18,48,0,0
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\SmFptrSrv\Units\oleMain.pas',0,1,1,1,1,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duGS1Barcode.pas',0,1,19,3,36,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Source\Shared\DriverError.pas',0,1,19,19,37,0,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\GS1Barcode.pas',0,1,28,25,44,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas',0,1,8656,27,8671,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duBitUtils.pas',0,1,1,1,1,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duStringUtils.pas',0,1,1,18,2,0,0
File_7=SourceModule,'C:\projects\OPOSShtrih\Source\Shared\StringUtils.pas',0,1,19,1,33,0,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FSSalesReceipt.pas',0,1,179,46,175,0,0
File_9=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\Retalix.pas',0,1,205,54,217,0,0
[Modules]
Module0=c:\program files (x86)\borland\delphi7\source\rtl\common\Math.pas
Module1=c:\program files (x86)\borland\delphi7\source\rtl\Sys\Types.pas
Module2=c:\Program Files (x86)\Borland\Delphi7\Source\Rtl\Common\DateUtils.pas
Count=3
EditWindowCount=1
Count=0
EditWindowCount=0
TypeLibWindowCount=3
[c:\program files (x86)\borland\delphi7\source\rtl\common\Math.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[c:\program files (x86)\borland\delphi7\source\rtl\Sys\Types.pas]
ModuleType=SourceModule
[C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\SmFiscalPrinterTest.dpr]
FormState=0
FormOnTop=0
[c:\Program Files (x86)\Borland\Delphi7\Source\Rtl\Common\DateUtils.pas]
ModuleType=SourceModule
[C:\projects\OPOSShtrih\Test\SmScaleTest\SmScaleTestLib.dpr]
FormState=0
FormOnTop=0
......@@ -85,10 +75,6 @@ FormOnTop=0
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\SmFiscalPrinterTest.dpr]
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\SmFiscalPrinterTestLib.dpr]
FormState=0
FormOnTop=0
......@@ -105,60 +91,6 @@ FormOnTop=0
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Test\SmScaleTest\SmScaleTestLib.dpr]
FormState=0
FormOnTop=0
[EditWindow0]
ViewCount=3
CurrentView=1
View0=0
View1=1
View2=2
CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0
Create=1
Visible=1
State=2
Left=323
Top=138
Width=1302
Height=682
MaxLeft=-8
MaxTop=106
MaxWidth=1936
MaxHeight=952
ClientWidth=1920
ClientHeight=914
LeftPanelSize=0
LeftPanelClients=CodeExplorer@EditWindow0
LeftPanelData=00000400010000000C000000436F64654578706C6F7265720000000000000000000000000000000000FFFFFFFF
RightPanelSize=0
BottomPanelSize=81
BottomPanelClients=MessageView@EditWindow0
BottomPanelData=000004000000000000000000000000000000000000000000000100000000000000000B0000004D65737361676556696577FFFFFFFF
[View0]
Module=c:\Program Files (x86)\Borland\Delphi7\Source\Rtl\Common\DateUtils.pas
CursorX=16
CursorY=46
TopLine=26
LeftCol=1
[View1]
Module=c:\program files (x86)\borland\delphi7\source\rtl\common\Math.pas
CursorX=31
CursorY=1239
TopLine=1219
LeftCol=1
[View2]
Module=c:\program files (x86)\borland\delphi7\source\rtl\Sys\Types.pas
CursorX=19
CursorY=451
TopLine=431
LeftCol=1
[TypeLibEditWindow0]
Create=1
Visible=0
......@@ -255,11 +187,11 @@ Visible=1
State=0
Left=8
Top=124
Width=650
Width=581
Height=558
MaxLeft=-1
MaxTop=-1
ClientWidth=634
ClientWidth=565
ClientHeight=524
TBDockHeight=681
LRDockWidth=445
......@@ -482,41 +414,9 @@ Column2Width=545
EntryPointPane=225
CompUnitPane=104
[CodeExplorer@EditWindow0]
Create=1
Visible=0
State=0
Left=-127
Top=-6
Width=140
Height=305
MaxLeft=-1
MaxTop=-1
ClientWidth=140
ClientHeight=305
TBDockHeight=305
LRDockWidth=140
Dockable=1
[MessageView@EditWindow0]
Create=1
Visible=1
State=0
Left=12
Top=0
Width=1908
Height=81
MaxLeft=-1
MaxTop=-1
ClientWidth=1908
ClientHeight=81
TBDockHeight=81
LRDockWidth=443
Dockable=1
[DockHosts]
DockHostCount=0
[ActiveProject]
ActiveProject=3
ActiveProject=1
......@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=13
Release=0
Build=483
Build=484
Debug=0
PreRelease=0
Special=0
......@@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=SHTRIH-M
FileDescription=OPOS test utility
FileVersion=1.13.0.483
FileVersion=1.13.0.484
InternalName=OPOS test
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
......@@ -138,16 +138,12 @@ Comments=http://www.shtrih-m.ru
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=2
Item0=C:\COMPON~1\JVCL\jcl\lib\d7\debug
Item1=$(DELPHI)\Lib\Debug
Count=1
Item0=$(DELPHI)\Lib\Debug
[HistoryLists\hlUnitOutputDirectory]
Count=2
Item0=DCU
Item1=..\lib\D7
[HistoryLists\hlOutputDirectorry]
Count=1
Item0=..\..\Bin
[HistoryLists\hlBPLOutput]
Count=3
Item0=$(DELPHI)\Bin\
......
......@@ -12,7 +12,7 @@ unit FptrServerLib_TLB;
// ************************************************************************ //
// PASTLWTR : 1.2
// File generated on 12.03.2018 17:40:31 from Type Library described below.
// File generated on 14.03.2018 18:07:55 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\projects\OPOSShtrih\Source\SmFptrSrv\SmFptrSrv.tlb (1)
......
......@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=12
Release=0
Build=392
Build=393
Debug=0
PreRelease=0
Special=0
......@@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=SHTRIH-M
FileDescription=Fiscal printer print server
FileVersion=1.12.0.392
FileVersion=1.12.0.393
InternalName=Fiscal printer driver
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
......@@ -138,16 +138,12 @@ Comments=http://www.shtrih-m.ru
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=2
Item0=C:\COMPON~1\JVCL\jcl\lib\d7\debug
Item1=$(DELPHI)\Lib\Debug
Count=1
Item0=$(DELPHI)\Lib\Debug
[HistoryLists\hlUnitOutputDirectory]
Count=2
Item0=DCU
Item1=..\lib\D7
[HistoryLists\hlOutputDirectorry]
Count=1
Item0=..\..\Bin
[HistoryLists\hlBPLOutput]
Count=3
Item0=$(DELPHI)\Bin\
......
......@@ -39,6 +39,7 @@ TBitTest=0
TICMPClientTest=1
TSocketPortTest=0
TLogFileTest=0
TGS1BarcodeTest=1
[Tests.SmFiscalPrinterTest.exe.TOposStatisticsTest]
CheckReset=1
CheckUpdate=1
......@@ -245,8 +246,8 @@ CheckPrintRecItemVoid=1
CheckSaveToXml=0
[GUITestRunner Config]
AutoSave=1
Left=215
Top=198
Left=246
Top=140
Width=1361
Height=808
Maximized=0
......@@ -574,9 +575,9 @@ CheckDateUtils=0
[Tests.SmFiscalPrinterTest.exe.TTemplateItemTest]
GetNextTag=1
[Tests.SmFiscalPrinterTest.exe.TReceiptTemplateTest]
CheckGetText=1
CheckParseField=1
CheckParseField2=1
CheckGetText=0
CheckParseField=0
CheckParseField2=0
[Tests.SmFiscalPrinterTest.exe.TResourceStringTest]
CheckStrings=1
[Tests.SmFiscalPrinterTest.exe.TBitTest]
......@@ -589,3 +590,5 @@ CheckOpen=1
[Tests.SmFiscalPrinterTest.exe.TLogFileTest]
CheckDeleteFile=0
CheckMaxCount=0
[Tests.SmFiscalPrinterTest.exe.TGS1BarcodeTest]
CheckDecode=1
......@@ -138,16 +138,12 @@ Comments=
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=2
Item0=C:\COMPON~1\JVCL\jcl\lib\d7\debug
Item1=$(DELPHI)\Lib\Debug
Count=1
Item0=$(DELPHI)\Lib\Debug
[HistoryLists\hlUnitOutputDirectory]
Count=2
Item0=DCU
Item1=..\lib\D7
[HistoryLists\hlOutputDirectorry]
Count=1
Item0=..\..\Bin
[HistoryLists\hlBPLOutput]
Count=3
Item0=$(DELPHI)\Bin\
......
......@@ -214,6 +214,7 @@ uses
FSSalesReceipt in '..\..\Source\SmFiscalPrinter\Units\FSSalesReceipt.pas',
GS1Barcode in '..\..\Source\SmFiscalPrinter\Units\GS1Barcode.pas',
EkmClient in '..\..\Source\SmFiscalPrinter\Units\EkmClient.pas',
duGS1Barcode in 'Units\duGS1Barcode.pas',
duBitUtils in 'Units\duBitUtils.pas';
{$R *.RES}
......
unit duGS1Barcode;
interface
uses
// VCL
Windows, SysUtils, Classes,
// DUnit
TestFramework,
// This
GS1Barcode;
type
{ TGS1BarcodeTest }
TGS1BarcodeTest = class(TTestCase)
published
procedure CheckDecode;
end;
implementation
{ TGS1BarcodeTest }
procedure TGS1BarcodeTest.CheckDecode;
const
Barcode2 = '010700000000000321Ai1iJul291ErTuY7uj';
Barcode3 = '04606203084623+A13gPh-4Hi7uGl';
var
Data: string;
Barcode: TGS1Barcode;
begin
Data := GS1DecodeBraces(Barcode2);
CheckEquals('(01)07000000000003(21)Ai1iJul291ErTuY7uj', Data, 'Data');
Barcode := DecodeGS1(GS1FilterTockens(GS1DecodeBraces(Barcode2)));
CheckEquals('07000000000003', Barcode.GTIN, 'Barcode.GTIN');
CheckEquals('Ai1iJul291ErTuY7uj', Barcode.Serial, 'Barcode.Serial');
end;
initialization
RegisterTest('', TGS1BarcodeTest.Suite);
end.
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment