blob: 6dabf54a0d0a195cb4d8297086428ca5a19f78df [file]
// Copyright (c) 2026, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8;
import static org.junit.Assert.assertEquals;
import com.android.tools.r8.utils.internal.StringUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class ApiDatabaseGeneratorCommandParserTest extends TestBase {
@Parameters(name = "{0}")
public static TestParametersCollection data() {
return getTestParameters().withNoneRuntime().build();
}
public ApiDatabaseGeneratorCommandParserTest(TestParameters parameters) {
parameters.assertNoneRuntime();
}
@Test
public void testHelpMessage() {
assertEquals(
StringUtils.lines(
"Usage: apidatabasegenerator [options] <input-files>",
"where options are:",
" --help",
" -h # Print help.",
" --version # Print version.",
" --output <database-file>",
" # Output result in <database-file> (must be a file, not a"
+ " directory).",
" # Defaults to 'api_database.ser'."),
ApiDatabaseGeneratorCommandParser.getUsageMessage());
}
}