Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
TestOption
public
class
TestOption
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.testmapping.TestOption
|
Menyimpan detail opsi pengujian yang ditetapkan dalam file TEST_MAPPING.
Ringkasan
Konstruktor publik |
TestOption(String name, String value)
|
Konstruktor publik
TestOption
public TestOption (String name,
String value)
Parameter |
name |
String |
value |
String |
Metode publik
compareTo
public int compareTo (TestOption option)
Parameter |
option |
TestOption |
sama dengan
public boolean equals (Object obj)
getName
public String getName ()
getValue
public String getValue ()
hashCode
public int hashCode ()
isExclusive
public boolean isExclusive ()
Periksa apakah opsi tersebut digunakan hanya untuk mengecualikan pengujian tertentu.
Beberapa contoh opsi eksklusif adalah:
filter-pengecualian
negative-testname-filter (GTest)
test-file-exclude-filter (AndroidJUnitTest)
exclude-annotation (AndroidJUnitTest)
Hasil |
boolean |
benar jika opsi digunakan untuk hanya mengecualikan pengujian tertentu. |
isInclusive
public boolean isInclusive ()
Periksa apakah opsi tersebut digunakan untuk hanya menyertakan pengujian tertentu.
Beberapa contoh opsi inklusif adalah:
include-filter
positive-testname-filter (GTest)
test-file-include-filter (AndroidJUnitTest)
include-annotation (AndroidJUnitTest)
Hasil |
boolean |
benar jika opsi digunakan untuk hanya menyertakan pengujian tertentu. |
toString
public String toString ()
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# TestOption\n==========\n\n\n`\npublic\n\n\nclass\nTestOption\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.util.testmapping.TestOption |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nStores the test option details set in a TEST_MAPPING file.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[TestOption](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#TestOption(java.lang.String,%20java.lang.String))`(String name, String value) ` |\n\n| ### Public methods ||\n|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` int` | ` `[compareTo](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#compareTo(com.android.tradefed.util.testmapping.TestOption))`(`[TestOption](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html)` option) ` |\n| ` boolean` | ` `[equals](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#equals(java.lang.Object))`(Object obj) ` |\n| ` String` | ` `[getName](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#getName())`() ` |\n| ` String` | ` `[getValue](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#getValue())`() ` |\n| ` int` | ` `[hashCode](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#hashCode())`() ` |\n| ` boolean` | ` `[isExclusive](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#isExclusive())`() ` Check if the option is used to only exclude certain tests. |\n| ` boolean` | ` `[isInclusive](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#isInclusive())`() ` Check if the option is used to only include certain tests. |\n| ` String` | ` `[toString](../../../../../../../reference/tradefed/com/android/tradefed/util/testmapping/TestOption.html#toString())`() ` |\n\nPublic constructors\n-------------------\n\n### TestOption\n\n```\npublic TestOption (String name, \n String value)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|-----------------|\n| `name` | `String` \u003cbr /\u003e |\n| `value` | `String` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### compareTo\n\n```\npublic int compareTo (TestOption option)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|---------------------|\n| `option` | `TestOption` \u003cbr /\u003e |\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### equals\n\n```\npublic boolean equals (Object obj)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|-----------------|\n| `obj` | `Object` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |\n\n### getName\n\n```\npublic String getName ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |\n\n### getValue\n\n```\npublic String getValue ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |\n\n### hashCode\n\n```\npublic int hashCode ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### isExclusive\n\n```\npublic boolean isExclusive ()\n```\n\nCheck if the option is used to only exclude certain tests.\n\nSome sample exclusive options are:\n\nexclude-filter\n\nnegative-testname-filter (GTest)\n\ntest-file-exclude-filter (AndroidJUnitTest)\n\nexclude-annotation (AndroidJUnitTest)\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|------------------------------------------------------------------|\n| `boolean` | true if the option is used to only exclude certain tests. \u003cbr /\u003e |\n\n### isInclusive\n\n```\npublic boolean isInclusive ()\n```\n\nCheck if the option is used to only include certain tests.\n\nSome sample inclusive options are:\n\ninclude-filter\n\npositive-testname-filter (GTest)\n\ntest-file-include-filter (AndroidJUnitTest)\n\ninclude-annotation (AndroidJUnitTest)\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|------------------------------------------------------------------|\n| `boolean` | true if the option is used to only include certain tests. \u003cbr /\u003e |\n\n### toString\n\n```\npublic String toString ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |"]]