コード例 #1
0
ファイル: fileInstaller_md.c プロジェクト: sfsy1989/j2me
/**
 * Entry point of the Javacall executable.
 *
 * @param argc number of arguments (1 means no arguments)
 * @param argv the arguments, argv[0] is the executable's name
 *
 * @return the exit value (1 if OK)
 */
javacall_result JavaTaskImpl(int argc, char* argv[]) {
    javacall_result res = fileInstaller(argc, argv);

    javacall_lifecycle_state_changed(JAVACALL_LIFECYCLE_MIDLET_SHUTDOWN,
                                     (res == 1) ? JAVACALL_OK : JAVACALL_FAIL);

    return res;
}
コード例 #2
0
ファイル: fileInstallerTest.c プロジェクト: jiangxilong/yari
int testInstalFileUsingJar(void) {
    int    res    =  ALL_OK;
    int    myArgc = 2;

    REPORT_INFO(LC_AMS, "#############  This test should pass.\n");
    res = fileInstaller(myArgc, mrgv);

    if (res != ALL_OK) {
        REPORT_WARN2(LC_AMS, "\n%s failed. Result code is %d\n",
		     fileInstallerTestJar, res);
    } else {
        REPORT_INFO1(LC_AMS, "%s passed\n", fileInstallerTestJar);
    }
    return res;
} /* testInstalFileUsingJad */
コード例 #3
0
ファイル: fileInstallerTest.c プロジェクト: jiangxilong/yari
int testInstalFileUsingBadJad(void) {
    int    res    =  -1;
    int    myArgc = 2;

    REPORT_INFO(LC_AMS, "#############  This test should fail. Using Jad without JAR-Size\n");
    res = fileInstaller(myArgc, mrgvbad);

    if (res >= 0) {
        REPORT_WARN2(LC_AMS, "\n%s failed. Result code is %d\n",
		     fileInstallerTestBadJad, res);
        res = -1;
    } else {
        REPORT_INFO1(LC_AMS, "%s passed\n", fileInstallerTestBadJad);
        res = ALL_OK;
    }
    return res;
}