A partir de 27 de março de 2025, recomendamos usar android-latest-release
em vez de aosp-main
para criar e contribuir com o AOSP. Para mais informações, consulte Mudanças no AOSP.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
TestOption
public
class
TestOption
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.testmapping.TestOption
|
Armazena os detalhes da opção de teste definidos em um arquivo TEST_MAPPING.
Resumo
Construtores públicos |
TestOption(String name, String value)
|
Construtores públicos
TestOption
public TestOption (String name,
String value)
Parâmetros |
name |
String |
value |
String |
Métodos públicos
compareTo
public int compareTo (TestOption option)
Parâmetros |
option |
TestOption |
equals
public boolean equals (Object obj)
getName
public String getName ()
getValue
public String getValue ()
hashCode
public int hashCode ()
isExclusive
public boolean isExclusive ()
Verifique se a opção é usada para excluir apenas alguns testes.
Confira alguns exemplos de opções exclusivas:
filtro de exclusão
filtro-nome-de-teste-negativo (GTest)
test-file-exclude-filter (AndroidJUnitTest)
exclude-annotation (AndroidJUnitTest)
Retorna |
boolean |
"true" se a opção for usada para excluir apenas determinados testes. |
isInclusive
public boolean isInclusive ()
Verifique se a opção é usada para incluir apenas alguns testes.
Confira alguns exemplos de opções inclusivas:
include-filter
positive-testname-filter (GTest)
test-file-include-filter (AndroidJUnitTest)
include-annotation (AndroidJUnitTest)
Retorna |
boolean |
"true" se a opção for usada para incluir apenas determinados testes. |
toString
public String toString ()
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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 |"]]