|
From: Geisschaes <gei...@us...> - 2005-04-25 20:23:30
|
Update of /cvsroot/macattrick/macattrick/Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29600/Test Modified Files: LineUpTreeTest.m PositionTest.m Log Message: some line up statistics added. but do not seem correct yet Index: PositionTest.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/Test/PositionTest.m,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PositionTest.m 7 Feb 2005 21:16:29 -0000 1.9 --- PositionTest.m 25 Apr 2005 20:23:02 -0000 1.10 *************** *** 144,147 **** --- 144,152 ---- } + -(void) testBelongsToSection { + [self assertTrue: [[[PositionHeap uniqueInstance] positionWithIdentifier:@"Keeper"] belongsToSection:@"Defense"]]; + [self assertTrue: [[[PositionHeap uniqueInstance] positionWithIdentifier:@"Inner Midfield Offensive"] belongsToSection:@"Midfield"]]; + [self assertTrue: [[[PositionHeap uniqueInstance] positionWithIdentifier:@"Forward Defensive"] belongsToSection:@"Attack"]]; + } @end Index: LineUpTreeTest.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/Test/LineUpTreeTest.m,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** LineUpTreeTest.m 7 Feb 2005 21:16:28 -0000 1.10 --- LineUpTreeTest.m 25 Apr 2005 20:23:02 -0000 1.11 *************** *** 73,79 **** } ! ! - (void) buildTree { ! } @end --- 73,84 ---- } ! - (void) testStrength { ! NSSet *playerSet = [NSSet setWithArray:[playerList playerList]]; ! [lineUpTree buildTree: 0.99 playerList: playerSet]; ! [self assertFloat: [lineUpTree strength:@"Total"] equals:40.0 precision:1.5]; ! [self assertFloat: [lineUpTree strength:@"Defense"] equals:16.0 precision:1.5]; ! [self assertFloat: [lineUpTree strength:@"Midfield"] equals:18.0 precision:1.5]; ! [self assertFloat: [lineUpTree strength:@"Attack"] equals:6 precision:1.5]; ! } @end |