-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1179 from smartdevicelink/feature/fix_code_analyz…
…er_issues Fix code analyzer issues
- Loading branch information
Showing
38 changed files
with
612 additions
and
459 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
android/sdl_android/src/androidTest/java/com/smartdevicelink/test/util/CompareUtilsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.smartdevicelink.test.util; | ||
|
||
import com.smartdevicelink.AndroidTestCase2; | ||
import com.smartdevicelink.test.Test; | ||
import com.smartdevicelink.util.CompareUtils; | ||
|
||
public class CompareUtilsTest extends AndroidTestCase2 { | ||
|
||
public void testAreStringsEqual(){ | ||
|
||
assertTrue(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_STRING, true, true)); | ||
assertTrue(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_STRING, false, true)); | ||
assertTrue(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_STRING, true, false)); | ||
assertTrue(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_STRING, false, false)); | ||
|
||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_APP_ID, true, true)); | ||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_APP_ID, false, true)); | ||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_APP_ID, true, false)); | ||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_APP_ID, false, false)); | ||
|
||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_STRING.toUpperCase(), false, false)); | ||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_STRING.toUpperCase(), false, true)); | ||
assertTrue(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_STRING.toUpperCase(), true, false)); | ||
assertTrue(CompareUtils.areStringsEqual(Test.GENERAL_STRING, Test.GENERAL_STRING.toUpperCase(), true, true)); | ||
|
||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING.toUpperCase(), Test.GENERAL_STRING, false, false)); | ||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING.toUpperCase(), Test.GENERAL_STRING, false, true)); | ||
assertTrue(CompareUtils.areStringsEqual(Test.GENERAL_STRING.toUpperCase(), Test.GENERAL_STRING.toUpperCase(), true, false)); | ||
assertTrue(CompareUtils.areStringsEqual(Test.GENERAL_STRING.toUpperCase(), Test.GENERAL_STRING.toUpperCase(), true, true)); | ||
|
||
assertTrue(CompareUtils.areStringsEqual(null, null, true, true)); | ||
assertFalse(CompareUtils.areStringsEqual(null, null, true, false)); | ||
assertTrue(CompareUtils.areStringsEqual(null, null, false, true)); | ||
assertFalse(CompareUtils.areStringsEqual(null, null, false, false)); | ||
|
||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, null, true, true)); | ||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, null, true, false)); | ||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, null, false, true)); | ||
assertFalse(CompareUtils.areStringsEqual(Test.GENERAL_STRING, null, false, false)); | ||
|
||
assertFalse(CompareUtils.areStringsEqual(null, Test.GENERAL_STRING, false, true)); | ||
assertFalse(CompareUtils.areStringsEqual(null, Test.GENERAL_STRING, false, false)); | ||
assertFalse(CompareUtils.areStringsEqual(null, Test.GENERAL_STRING, true, true)); | ||
assertFalse(CompareUtils.areStringsEqual(null, Test.GENERAL_STRING, true, false)); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.