kralo / dehl Goto Github PK
View Code? Open in Web Editor NEWThis project forked from delphidabbler/dehl
Delphi Helper Library (Defunct)
License: Other
This project forked from delphidabbler/dehl
Delphi Helper Library (Defunct)
License: Other
There currently is no support for serializing a tkMethod, like the FOnChange/ of a TStringList.
As a starter, in DeHL.Types.pas around 5114, you could do
// WARNING: dangerous hack to skip serializing TStringList Methods if (AField.Name = 'FOnChange') or (AField.Name = 'FOnChanging') then Exit(true);
to skip the fields. Better would be to add proper support in MethodType.DoSerialize.
Todo:
[ ] Write a test case that test an object with one member of type TStringList
[ ] Implement support
EDIT: Sh**, sorry. Wanted to add the Issue to my fork for own reference. Any chance to move it there? Or simply delete...
current state:
DUnit / Testing
...................................................................F.............................FF..........................FF...................F...................................................................E....E.E.E..............................................................................................................................................................................................................................................................................FFFF........................................................................................................................FF...E..............................................................................................................................................................................................................................F.......................................................................................................................F..........................................................................................................................................................................................................................................................
Time: 0:00:31.4
FAILURES!!!
Test Results:
Run: 1217
Failures: 14
Errors: 5
There were 5 errors:
1) [Tests.TString] TTestString.Test_IsWhiteSpace: EArgumentOutOfRangeException
at
"String-Index außerhalb des Bereichs (1). Muss >= 0 und <= 0 sein"
2) [Tests.TString] TTestString.Test_TrimLeft: EArgumentOutOfRangeException
at
"String-Index außerhalb des Bereichs (8). Muss >= 0 und <= 7 sein"
3) [Tests.TString] TTestString.Test_TrimRight: EArgumentOutOfRangeException
at
"String-Index außerhalb des Bereichs (8). Muss >= 0 und <= 7 sein"
4) [Tests.TString] TTestString.Test_Trim: EArgumentOutOfRangeException
at
"String-Index außerhalb des Bereichs (8). Muss >= 0 und <= 7 sein"
5) [Tests.Serialization.Gross] TTestGrossSerialization.Test_Strings: EArgumentOutOfRangeException
at
"String-Index außerhalb des Bereichs (1). Muss >= 0 und <= 0 sein"
There were 14 failures:
1) [Tests.TypeSupport] TTestTypes.TestMethod: ETestFailure
at
"Type support = tmNone"
2) [Tests.TypeConv] TTestTypeConvertions.TestUCS4Char: ETestFailure
at
""
3) [Tests.TypeConv] TTestTypeConvertions.TestSysDate: ETestFailure
at
""
4) [Tests.TypeConv] TTestTypeConvertions.TestDynArray: ETestFailure
at
"Should have failed"
5) [Tests.TypeConv] TTestTypeConvertions.TestRawByteString: ETestFailure
at
"Expected the conversion to fail"
6) [Tests.TypeConv] TTestTypeConvertions.TestBuffer: ETestFailure
at
"Expected the conversion to fail"
7) [Tests.BigDecimal] TTestBigDecimal.Test_TryParse_FmtSettings: ETestFailure
at
"expected: <-1> but was: <1>"
8) [Tests.BigDecimal] TTestBigDecimal.Test_TryParse: ETestFailure
at
"expected: <-1> but was: <1>"
9) [Tests.BigDecimal] TTestBigDecimal.Test_Parse_FmtSettings: ETestFailure
at
"expected: <-1> but was: <1>"
10) [Tests.BigDecimal] TTestBigDecimal.Test_Parse: ETestFailure
at
"expected: <-1> but was: <1>"
11) [Tests.Serialization] TTestXmlSpecifics.Test_Attrs: ETestFailure
at
"expected: <<XMLClass xmlns="http://test.com" xmlns:DeHL="http://alex.ciobanu.org/DeHL.Serialization.XML" DeHL:class="Tests.Serialization.TXmlTestClass" DeHL:refid="1" FAttrStr="string in attr" xmlns:NS1="http://array.test.com"><FElemStr>string in element</FElemStr><NS1:ArrayTest DeHL:count="3" DeHL:refid="2"><NS1:TInnerArray DeHL:count="2" DeHL:refid="3"><NS1:string>one</NS1:string><NS1:string>two</NS1:string></NS1:TInnerArray><NS1:TInnerArray DeHL:refto="0"/><NS1:TInnerArray DeHL:count="1" DeHL:refid="4"><NS1:string>John</NS1:string></NS1:TInnerArray></NS1:ArrayTest></XMLClass>> but was: <<XMLClass xmlns="http://test.com" xmlns:DeHL="http://alex.ciobanu.org/DeHL.Serialization.XML" DeHL:class="Tests.Serialization.TXmlTestClass" DeHL:refid="1" FAttrStr="string in attr" xmlns:NS1="http://array.test.com"><FElemStr>string in element</FElemStr><ArrayTest xmlns="http://array.test.com" DeHL:count="3" DeHL:refid="2"><TInnerArray DeHL:count="2" DeHL:refid="3"><string>one</string><string>two</string></TInnerArray><TInnerArray DeHL:refto="0"/><TInnerArray DeHL:count="1" DeHL:refid="4"><string>John</string></TInnerArray></ArrayTest></XMLClass>>"
12) [Tests.Serialization] TTestXmlSpecifics.Test_XmlName_Element: ETestFailure
at
"expected: <<i1 xmlns="http://i1" xmlns:NS1="http://i2" xmlns:DeHL="http://alex.ciobanu.org/DeHL.Serialization.XML" xmlns:NS2="http://i0"><FField>One</FField><NS1:i2 DeHL:count="2" DeHL:refid="1"><NS2:i0>100</NS2:i0><NS2:i0>101</NS2:i0></NS1:i2><LArr2 DeHL:count="1" DeHL:refid="2"><NS2:a1>800</NS2:a1></LArr2></i1>> but was: <<i1 xmlns="http://i1" xmlns:NS1="http://i2" xmlns:DeHL="http://alex.ciobanu.org/DeHL.Serialization.XML" xmlns:NS2="http://i0"><FField>One</FField><i2 xmlns="http://i2" DeHL:count="2" DeHL:refid="1"><i0 xmlns="http://i0">100</i0><i0 xmlns="http://i0">101</i0></i2><LArr2 DeHL:count="1" DeHL:refid="2"><a1 xmlns="http://i0">800</a1></LArr2></i1>>"
13) [Tests.List] TTestList.TestCopy: ETestFailure
at
"List2 count expected to be 2"
14) [Tests.SortedList] TTestSortedList.TestCopy: ETestFailure
at
"List2 count expected to be 2"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.