Skip to content
Permalink
Browse files

Followup 8e2b791, add unit test

  • Loading branch information
nyalldawson committed Oct 11, 2015
1 parent 15af5a1 commit ecbd691ca457b79afb4b743f5a3133a0806a3fae
Showing with 5 additions and 0 deletions.
  1. +5 −0 tests/src/core/testqgsfields.cpp
@@ -343,6 +343,11 @@ void TestQgsFields::indexFromName()
//indexFromName is case sensitive, fieldNameIndex isn't
QCOMPARE( fields.indexFromName( QString( "teStFiEld2" ) ), -1 );
QCOMPARE( fields.fieldNameIndex( QString( "teStFiEld2" ) ), 1 );

//test that fieldNameIndex prefers exact case matches over case insensitive matches
QgsField sameNameDifferentCase( QString( "teStFielD" ) );
fields.append( sameNameDifferentCase );
QCOMPARE( fields.fieldNameIndex( QString( "teStFielD" ) ), 3 );
}

void TestQgsFields::toList()

0 comments on commit ecbd691

Please sign in to comment.
You can’t perform that action at this time.