This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
tests/ServiceStack.Text.Tests Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 203203 <Compile Include =" JsonTests\InvalidJsonTests.cs" />
204204 <Compile Include =" JsonTests\OnDeserializationErrorTests.cs" />
205205 <Compile Include =" JsonTests\TypeInfoTests.cs" />
206+ <Compile Include =" JsvTests\JsvBasicDataTests.cs" />
206207 <Compile Include =" PclApiTests.cs" />
208+ <Compile Include =" Shared\ModelWithFloatTypes.cs" />
209+ <Compile Include =" Shared\ModelWithIntegerTypes.cs" />
207210 <Compile Include =" Support\NumberTypes.cs" />
208211 <Compile Include =" Support\Point.cs" />
209212 <Compile Include =" SerializationDelegatePerformanceTests.cs" />
Original file line number Diff line number Diff line change 1+ namespace ServiceStack . Text . Tests . Shared
2+ {
3+ public class ModelWithIntegerTypes
4+ {
5+ public byte Byte { get ; set ; }
6+ public short Short { get ; set ; }
7+ public int Int { get ; set ; }
8+ public long Long { get ; set ; }
9+
10+ protected bool Equals ( ModelWithIntegerTypes other )
11+ {
12+ return Byte == other . Byte && Short == other . Short && Int == other . Int && Long == other . Long ;
13+ }
14+
15+ public override bool Equals ( object obj )
16+ {
17+ if ( ReferenceEquals ( null , obj ) ) return false ;
18+ if ( ReferenceEquals ( this , obj ) ) return true ;
19+ if ( obj . GetType ( ) != this . GetType ( ) ) return false ;
20+ return Equals ( ( ModelWithIntegerTypes ) obj ) ;
21+ }
22+
23+ public override int GetHashCode ( )
24+ {
25+ unchecked
26+ {
27+ var hashCode = Byte . GetHashCode ( ) ;
28+ hashCode = ( hashCode * 397 ) ^ Short . GetHashCode ( ) ;
29+ hashCode = ( hashCode * 397 ) ^ Int ;
30+ hashCode = ( hashCode * 397 ) ^ Long . GetHashCode ( ) ;
31+ return hashCode ;
32+ }
33+ }
34+ }
35+ }
You can’t perform that action at this time.
0 commit comments