do not unnecessarily mess with CONFIG

it could/would bite us later

Change-Id: I73f989e7603c6e5b7b85fc4ee4ad2557c1b02d80
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
Oswald Buddenhagen 2012-06-26 14:23:38 +02:00
parent ae7e9a407f
commit 16785c4c14
3 changed files with 26 additions and 26 deletions

View File

@ -1,17 +1,17 @@
CONFIG = qt thread
VAR = qt thread
defineTest(testReplace) {
!isEqual(1, $$2):message("FAILED: $$3: got $$1, expected $${2}.")
}
#count
!count( CONFIG, 2 ) {
message( "FAILED: count function: $$CONFIG" )
!count( VAR, 2 ) {
message( "FAILED: count function: $$VAR" )
}
#contains
!contains( CONFIG, thread ) {
message( "FAILED: contains function: $$CONFIG" )
!contains( VAR, thread ) {
message( "FAILED: contains function: $$VAR" )
}
#exists
@ -20,8 +20,8 @@ defineTest(testReplace) {
}
#isEmpty
isEmpty( CONFIG ) {
message( "FAILED: isEmpty function: $CONFIG" )
isEmpty( VAR ) {
message( "FAILED: isEmpty function: $VAR" )
}
#files

View File

@ -1,24 +1,24 @@
CONFIG = qt thread
VAR = qt thread
CONFIG += debug
!contains( CONFIG, debug ) {
VAR += debug
!contains( VAR, debug ) {
message( "FAILED: +=" )
}
CONFIG -= thread
contains( CONFIG, thread ) {
VAR -= thread
contains( VAR, thread ) {
message( "FAILED: -=" )
}
CONFIG = thread
CONFIG *= thread
!count( CONFIG, 1 ) {
VAR = thread
VAR *= thread
!count( VAR, 1 ) {
message( "FAILED: *=" )
}
CONFIG = thread QT_DLL debug
CONFIG ~= s/QT_+/Q_
!contains( CONFIG, Q_DLL ) {
VAR = thread QT_DLL debug
VAR ~= s/QT_+/Q_
!contains( VAR, Q_DLL ) {
message( "FAILED: ~=" )
}

View File

@ -1,14 +1,14 @@
CONFIG = 1 2 3 4 5
JOINEDCONFIG = $$join( CONFIG, "-GLUE-", "-BEFORE-", "-AFTER-" )
!contains( JOINEDCONFIG, -BEFORE-1-GLUE-2-GLUE-3-GLUE-4-GLUE-5-AFTER- ) {
message( "FAILED: join [$$JOINEDCONFIG != -BEFORE-1-GLUE-2-GLUE-3-GLUE-4-GLUE-5-AFTER-]" )
VAR = 1 2 3 4 5
JOINEDVAR = $$join( VAR, "-GLUE-", "-BEFORE-", "-AFTER-" )
!contains( JOINEDVAR, -BEFORE-1-GLUE-2-GLUE-3-GLUE-4-GLUE-5-AFTER- ) {
message( "FAILED: join [$$JOINEDVAR != -BEFORE-1-GLUE-2-GLUE-3-GLUE-4-GLUE-5-AFTER-]" )
}
# To test member we need to use join
NEWCONFIG = $$member( CONFIG, 4 ) $$member( CONFIG, 3 ) $$member( CONFIG, 2 )
JOINEDNEWCONFIG = $$join( NEWCONFIG, "-" )
!contains( JOINEDNEWCONFIG, 5-4-3 ) {
message( "FAILED: member [$$JOINEDNEWCONFIG != 5-4-3]" )
NEWVAR = $$member( VAR, 4 ) $$member( VAR, 3 ) $$member( VAR, 2 )
JOINEDNEWVAR = $$join( NEWVAR, "-" )
!contains( JOINEDNEWVAR, 5-4-3 ) {
message( "FAILED: member [$$JOINEDNEWVAR != 5-4-3]" )
}