⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 per2bugs.tpl

📁 在手机操作系统symbina上使用的一个脚本扩展语言的代码实现,可以参考用于自己的开发
💻 TPL
字号:
REM pER2Bugs.tpl
REM EPOC OPL automatic test code for ER2 OPL bugfixes.
REM Copyright (c) 1991-2000 Symbian Ltd. All rights reserved.

INCLUDE "Const.oph"
INCLUDE "hUtils.oph"
include "system.oxh"

PROC Standalone:
	REM Main procedure called when not running inside test harness.
	LOADM KhUtils$
	hLink:( "pER2bugs", hThreadIdFromOplDoc&:, KhUserFull%)
	REM After standalone completion, control returns here.
	dINIT "Tests complete" :DIALOG
ENDP


proc per2bugs:
	rem hInitTestHarness:(KhInitLocalErrorHandling%, KhInitNotUsed%)
	hRunTest%:("tConst")
rem	hCleanUp%:("CleanUp")
endp


proc tconst:
	local k&

	rem print "Check new consts ok"
	k&=KKeyMenu32&
	if k&<>&f836
		raise 1
	endif
	k&=KKeyDownArrow32&
	if k&<>&f80a
		raise 2
	endif
endp


REM Skip these tests.
PROC inter:
	print "Interactive tests"
	tconsti:
	texternalpower:
	tbeep:
ENDP


proc tconsti:
	local ev&(16)
	
	while 1
		getevent32 ev&()
		if ev&(1)=27 :break :endif
		print ev&(1)
	endwh
endp


PROC texternalpower:
	local isExt&,wasExt&

	print "Test external power detection"
	wasExt&=2	rem will become -1 when present
	while get<>27
		isExt&=isExternalPowerPresent&:
		if isExt&<>wasExt&
			wasExt&=isExt&
			if isExt&
				print "External power present"
			else
				print "External power not present"
			endif
		else
			print ".";
		endif
	endwh
	print
ENDP


PROC tbeep:
	print "Set system beep setting loud and press key (esc quits)"
	while get<>27
		trybeep:
	endwh
	print "Set system beep setting quiet and press key (esc quits)"
	while get<>27
		trybeep:
	endwh
	print "Set system beep setting off and press key (esc quits)"
	while get<>27
		trybeep:
	endwh
ENDP

PROC trybeep:
	beep 10,500
ENDP

REM End of pER2bugs.tpl

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -