📄 testapi.java
字号:
package sample;/* -------------------------------------------------------------------------- Name: TestAPI.cpp Title: Test CMPP API of ISMG for CMPP 1.1 Package: ISMG for CMPP 1.1 Written: 2001/01/01 Jeffrey Du <jeffdu@21cn.com> Asiainfo Revised: Synopsis: Test CMPP 1.1 API. -----------------------------------------------------------------------------*/import aiismg.jcmppapi30.CMPPAPI;public final class TestAPI { public static void main( String argv[] ) { CMPPAPI test = new CMPPAPI(); int n; // get argument for(n=0; n<argv.length; ++n) { if(argv[n].compareTo( "-a") == 0) { if(test.InitCMPPAPI( "../config/javacmppc.ini" ) != 0) { System.out.println("Fail to call InitCMPPAPI!"); System.exit(1); } if(test.CMPPActiveTest ( true ) == 0) { System.out.println("CMPPActiveTest ok!"); } else { System.out.println("CMPPActiveTest fail, err=" + test.GetErrCode() ); System.exit(1); } System.exit(0); } else { Usage(); System.exit(1); } } Usage(); System.exit(1); } public static void Usage() { System.out.println("Usage: TestAPI -a"); System.out.println(" -a: active test(call CMPPActiveTest)"); System.out.println("e.g.: TestAPI -a # active test"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -