PageRenderTime 120ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/testsuite/misc-haxe.all/classes.all/text/TextSnapshot_as.hx

https://github.com/frash/frash
Haxe | 1246 lines | 947 code | 214 blank | 85 comment | 368 complexity | 00c83ebddd9c5c9d9cca197ac6e3c7cb MD5 | raw file
  1. // TextSnapshot_as.hx: ActionScript 3 "TextSnapshot" class, for Gnash.
  2. //
  3. // Generated on: 20090602 by "bnaugle". Remove this
  4. // after any hand editing loosing changes.
  5. //
  6. // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
  7. //
  8. // This program is free software; you can redistribute it and/or modify
  9. // it under the terms of the GNU General Public License as published by
  10. // the Free Software Foundation; either version 3 of the License, or
  11. // (at your option) any later version.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU General Public License
  19. // along with this program; if not, write to the Free Software
  20. // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  21. //
  22. // This test case must be processed by CPP before compiling to include the
  23. // DejaGnu.hx header file for the testing framework support.
  24. #if flash9
  25. import flash.text.TextSnapshot;
  26. import flash.display.MovieClip;
  27. import flash.display.DisplayObjectContainer;
  28. import flash.display.Sprite;
  29. #elseif !flash6
  30. import flash.TextSnapshot;
  31. import flash.MovieClip;
  32. #end
  33. import flash.Lib;
  34. import Type;
  35. import Std;
  36. import Reflect;
  37. // import our testing API
  38. import DejaGnu;
  39. // Class must be named with the _as suffix, as that's the same name as the file.
  40. class TextSnapshot_as {
  41. static var _root=flash.Lib.current;
  42. static function main() {
  43. #if !flash6
  44. #if flash9
  45. var d1:DisplayObjectContainer = new Sprite();
  46. var x1:TextSnapshot = d1.textSnapshot;
  47. #else
  48. var m1:MovieClip = flash.Lib._root;
  49. var x1:TextSnapshot = m1.getTextSnapshot();
  50. #end
  51. // Make sure we actually get a valid class
  52. if (Std.is(x1, TextSnapshot)) {
  53. DejaGnu.pass("TextSnapshot class exists.");
  54. } else {
  55. DejaGnu.fail("TextSnapshot class doesn't exist!");
  56. }
  57. // Tests to see if all the properties exist. All these do is test for
  58. // existance of a property, and don't test the functionality at all. This
  59. // is primarily useful only to test completeness of the API implementation.
  60. #if flash9
  61. if (Type.typeof(x1.charCount) == ValueType.TInt) {
  62. DejaGnu.pass("TextSnapshot.charCount property exists.");
  63. } else {
  64. DejaGnu.fail("TextSnapshot.charCount property doesn't exist!");
  65. }
  66. #end
  67. // Tests to see if all the methods exist. All these do is test for
  68. // existance of a method, and don't test the functionality at all. This
  69. // is primarily useful only to test completeness of the API implementation.
  70. #if !flash9
  71. if (Type.typeof(x1.getCount) == ValueType.TFunction) {
  72. DejaGnu.pass("TextSnapshot::getCount() method exists.");
  73. } else {
  74. DejaGnu.fail("TextSnapshot::getCount() method doesn't exist!");
  75. }
  76. #else
  77. if (Type.typeof(x1.getTextRunInfo) == ValueType.TFunction) {
  78. DejaGnu.pass("TextSnapshot::getTextRunInfo() method exists.");
  79. } else {
  80. DejaGnu.fail("TextSnapshot::getTextRunInfo() method doesn't exist!");
  81. }
  82. #end
  83. if (Type.typeof(x1.findText) == ValueType.TFunction) {
  84. DejaGnu.pass("TextSnapshot::findText() method exists.");
  85. } else {
  86. DejaGnu.fail("TextSnapshot::findText() method doesn't exist!");
  87. }
  88. if (Type.typeof(x1.getSelected) == ValueType.TFunction) {
  89. DejaGnu.pass("TextSnapshot::getSelected() method exists.");
  90. } else {
  91. DejaGnu.fail("TextSnapshot::getSelected() method doesn't exist!");
  92. }
  93. if (Type.typeof(x1.getSelectedText) == ValueType.TFunction) {
  94. DejaGnu.pass("TextSnapshot::getSelectedText() method exists.");
  95. } else {
  96. DejaGnu.fail("TextSnapshot::getSelectedText() method doesn't exist!");
  97. }
  98. if (Type.typeof(x1.getText) == ValueType.TFunction) {
  99. DejaGnu.pass("TextSnapshot::getText() method exists.");
  100. } else {
  101. DejaGnu.fail("TextSnapshot::getText() method doesn't exist!");
  102. }
  103. if (Type.typeof(x1.hitTestTextNearPos) == ValueType.TFunction) {
  104. DejaGnu.pass("TextSnapshot::hitTestTextNearPos() method exists.");
  105. } else {
  106. DejaGnu.fail("TextSnapshot::hitTestTextNearPos() method doesn't exist!");
  107. }
  108. if (Type.typeof(x1.setSelectColor) == ValueType.TFunction) {
  109. DejaGnu.pass("TextSnapshot::setSelectColor() method exists.");
  110. } else {
  111. DejaGnu.fail("TextSnapshot::setSelectColor() method doesn't exist!");
  112. }
  113. if (Type.typeof(x1.setSelected) == ValueType.TFunction) {
  114. DejaGnu.pass("TextSnapshot::setSelected() method exists.");
  115. } else {
  116. DejaGnu.fail("TextSnapshot::setSelected() method doesn't exist!");
  117. }
  118. // Call this after finishing all tests. It prints out the totals.
  119. //Si
  120. //The following tests are from ming.
  121. #if !flash9
  122. if (untyped TextSnapshot.prototype.hasOwnProperty("findText")) {
  123. DejaGnu.pass("TextSnapshot.prototype.'findText' property exists.");
  124. } else {
  125. DejaGnu.fail("TextSnapshot.prototype.'findText' property does not exist!");
  126. }
  127. if (untyped TextSnapshot.prototype.hasOwnProperty("getCount")) {
  128. DejaGnu.pass("TextSnapshot.prototype.'getCount' property exists.");
  129. } else {
  130. DejaGnu.fail("TextSnapshot.prototype.'getCount' property does not exist!");
  131. }
  132. if (untyped TextSnapshot.prototype.hasOwnProperty("getSelected")) {
  133. DejaGnu.pass("TextSnapshot.prototype.'getSelected' property exists.");
  134. } else {
  135. DejaGnu.fail("TextSnapshot.prototype.'getSelected' property does not exist!");
  136. }
  137. if (untyped TextSnapshot.prototype.hasOwnProperty("getSelectedText")) {
  138. DejaGnu.pass("TextSnapshot.prototype.'getSelectedText' property exists.");
  139. } else {
  140. DejaGnu.fail("TextSnapshot.prototype.'getSelectedText' property does not exist!");
  141. }
  142. if (untyped TextSnapshot.prototype.hasOwnProperty("getText")) {
  143. DejaGnu.pass("TextSnapshot.prototype.'getText' property exists.");
  144. } else {
  145. DejaGnu.fail("TextSnapshot.prototype.'getText' property does not exist!");
  146. }
  147. if (untyped TextSnapshot.prototype.hasOwnProperty("setSelectColor")) {
  148. DejaGnu.pass("TextSnapshot.prototype.'setSelectColor' property exists.");
  149. } else {
  150. DejaGnu.fail("TextSnapshot.prototype.'setSelectorColor' property does not exist!");
  151. }
  152. if (untyped TextSnapshot.prototype.hasOwnProperty("hitTestTextNearPos")) {
  153. DejaGnu.pass("TextSnapshot.prototype.'hitTestTextNearPos' property exists.");
  154. } else {
  155. DejaGnu.fail("TextSnapshot.prototype.'hitTestTextNearPos' property does not exist!");
  156. }
  157. if (untyped TextSnapshot.prototype.hasOwnProperty("setSelected")) {
  158. DejaGnu.pass("TextSnapshot.prototype.'setSelected' property exists.");
  159. } else {
  160. DejaGnu.fail("TextSnapshot.prototype.'setSelected' property does not exist!");
  161. }
  162. #end
  163. #if flash9
  164. if (Std.string(untyped __typeof__(TextSnapshot)) == 'object') {
  165. DejaGnu.pass("TextSnapshot is an 'object' in flash9.");
  166. } else {
  167. DejaGnu.fail("TextSnapshot is not an 'object' in flash9.");
  168. }
  169. #else
  170. // DejaGnu.note("TextSnapshot type:"+Std.string(untyped __typeof__(TextSnapshot)) );
  171. if (Std.string(untyped __typeof__(TextSnapshot)) == 'function') {
  172. DejaGnu.pass("TextSnapshot is a 'function'.");
  173. } else {
  174. DejaGnu.fail("TextSnapshot is not a 'function'.");
  175. }
  176. #end
  177. var textsnapshotobj:TextSnapshot = untyped __new__(TextSnapshot);
  178. #if flash9
  179. if (Std.is(textsnapshotobj, TextSnapshot) ){
  180. DejaGnu.pass("textsnapshotobj is an instance of 'TextSnapshot'.");
  181. } else {
  182. DejaGnu.fail("textsnapshotobj is not an instance of 'TextSnapshot'.");
  183. }
  184. #else
  185. if (untyped __instanceof__(textsnapshotobj,TextSnapshot) ){
  186. DejaGnu.pass("textsnapshotobj is an instance of 'TextSnapshot'.");
  187. } else {
  188. DejaGnu.fail("textsnapshotobj is not an instance of 'TextSnapshot'.");
  189. }
  190. #end
  191. #if !flash9
  192. // DejaGnu.note("TextSnapshot type:"+Std.string(untyped __typeof__(TextSnapshot)) );
  193. if (untyped !TextSnapshot.hasOwnProperty("findText")) {
  194. DejaGnu.pass("textsnapshotobj.'findText' property does not exists");
  195. } else {
  196. DejaGnu.fail("textsnapshotobj.'findText' property exists. Wrong!");
  197. }
  198. if (untyped !TextSnapshot.hasOwnProperty("getCount")) {
  199. DejaGnu.pass("textsnapshotobj.'getCount' property does not exists.");
  200. } else {
  201. DejaGnu.fail("textsnapshotobj.'getCount' property exists. Wrong!");
  202. }
  203. if (untyped !TextSnapshot.hasOwnProperty("getSelected")) {
  204. DejaGnu.pass("textsnapshotobj.'getSelected' property does not exists.");
  205. } else {
  206. DejaGnu.fail("textsnapshotobj.'getSelected' property exists. Wrong!");
  207. }
  208. if (untyped !TextSnapshot.hasOwnProperty("getSelectedText")) {
  209. DejaGnu.pass("textsnapshotobj.'getSelectedText property does not exists.");
  210. } else {
  211. DejaGnu.fail("textsnapshotobj.'getSelectedText property exists. Wrong!");
  212. }
  213. if (untyped !TextSnapshot.hasOwnProperty("getText")) {
  214. DejaGnu.pass("textsnapshotobj.'getText property does not exists.");
  215. } else {
  216. DejaGnu.fail("textsnapshotobj.'getText' property exists. Wrong!");
  217. }
  218. if (untyped !TextSnapshot.hasOwnProperty("setSelectColor")) {
  219. DejaGnu.pass("textsnapshotobj.'setSelectColor' property does not exists.");
  220. } else {
  221. DejaGnu.fail("textsnapshotobj.'setSelectColor' property exists. Wrong!");
  222. }
  223. if (untyped !TextSnapshot.hasOwnProperty("hitTestTextNearPos")) {
  224. DejaGnu.pass("textsnapshotobj.'hitTestTextNearPos' property does not exists.");
  225. } else {
  226. DejaGnu.fail("textsnapshotobj.'hitTestTextNearPos' property exists. Wrong!");
  227. }
  228. if (untyped !TextSnapshot.hasOwnProperty("setSelected")) {
  229. DejaGnu.pass("textsnapshotobj.'setSelected' property does not exists.");
  230. } else {
  231. DejaGnu.fail("textsnapshotobj.'setSelected' property exists. Wrong!");
  232. }
  233. #end
  234. // DejaGnu.note("TextSnapshot type:"+Std.string(untyped __typeof__(textsnapshotobj)) );
  235. if (Std.string(untyped __typeof__(textsnapshotobj)) == 'object') {
  236. DejaGnu.pass("textsnapshotobj is an 'object'.");
  237. } else {
  238. DejaGnu.fail("textsnapshotobj is not an 'object'.");
  239. }
  240. #if !flash9
  241. if (Std.string(untyped __typeof__(textsnapshotobj.findText) )== 'function'){
  242. DejaGnu.pass("The type of textsnapshotobj.findText is a 'fucntion'.");
  243. } else {
  244. DejaGnu.fail("The type of textsnapshotobj.findText is not a 'fucntion'!");
  245. }
  246. if (Std.string(untyped __typeof__(textsnapshotobj.getCount) )== 'function'){
  247. DejaGnu.pass("The type of textsnapshotobj.getCount is a 'fucntion'."); } else { DejaGnu.fail("The type of textsnapshotobj.getCount is not a 'fucntion'!"); }
  248. if (Std.string(untyped __typeof__(textsnapshotobj.getSelected) )== 'function'){
  249. DejaGnu.pass("The type of textsnapshotobj.getSelected is a 'fucntion'.");
  250. } else {
  251. DejaGnu.fail("The type of textsnapshotobj.getSelected is not a 'fucntion'!");
  252. }
  253. if (Std.string(untyped __typeof__(textsnapshotobj.getSelectedText) )== 'function'){
  254. DejaGnu.pass("The type of textsnapshotobj.getSelectedText is a 'fucntion'.");
  255. } else {
  256. DejaGnu.fail("The type of textsnapshotobj.getSelectedText is not a 'fucntion'!");
  257. }
  258. if (Std.string(untyped __typeof__(textsnapshotobj.getText) )== 'function'){
  259. DejaGnu.pass("The type of textsnapshotobj.getText is a 'fucntion'.");
  260. } else {
  261. DejaGnu.fail("The type of textsnapshotobj.getText is not a 'fucntion'!");
  262. }
  263. if (Std.string(untyped __typeof__(textsnapshotobj.hitTestTextNearPos) )== 'function'){
  264. DejaGnu.pass("The type of textsnapshotobj.hisTestTextNearPos is a 'fucntion'.");
  265. } else {
  266. DejaGnu.fail("The type of textsnapshotobj.hisTestTextNearPos is not a 'fucntion'!");
  267. }
  268. if (Std.string(untyped __typeof__(textsnapshotobj.setSelectColor) )== 'function'){
  269. DejaGnu.pass("The type of textsnapshotobj.setSelectColor is a 'fucntion'.");
  270. } else {
  271. DejaGnu.fail("The type of textsnapshotobj.setSelectColor is not a 'fucntion'!");
  272. }
  273. if (Std.string(untyped __typeof__(textsnapshotobj.setSelected) )== 'function'){
  274. DejaGnu.pass("The type of textsnapshotobj.setSelected is a 'fucntion'.");
  275. } else {
  276. DejaGnu.fail("The type of textsnapshotobj.setSelected is not a 'fucntion'!");
  277. }
  278. #end
  279. #if !flash9
  280. var gh:TextSnapshot = untyped __new__(TextSnapshot,["hello"]);
  281. // DejaGnu.note("gh.toString():"+ untyped gh.toString() );
  282. // DejaGnu.note("gh.getCount.toString():"+ untyped gh.getCount.toString() );
  283. // DejaGnu.note("gh.getCount():"+ untyped gh.getCount() );
  284. if (untyped gh.toString()=="[object Object]") {
  285. DejaGnu.pass("gh.toString() is ''[object Object]''.");
  286. } else {
  287. DejaGnu.fail("gh.toString() is not ''[object Object]''!");
  288. }
  289. if (untyped gh.getCount.toString()=="[type Function]") {
  290. DejaGnu.pass("gh.getCount.toString() is ''[type Function]''.");
  291. } else {
  292. DejaGnu.fail("gh.getCounttoString() is not ''[type Function]''!");
  293. }
  294. if (untyped gh.getCount()==undefined) {
  295. DejaGnu.pass("gh.getCount() is ''undefined''.");
  296. } else {
  297. DejaGnu.fail("gh.getCount() is not ''undefined''!");
  298. }
  299. var o = {};
  300. var gh:TextSnapshot = untyped __new__(TextSnapshot, [o]);
  301. DejaGnu.note("gh.toString():"+ untyped gh.toString() );
  302. DejaGnu.note("gh.getCount.toString():"+ untyped gh.getCount.toString() );
  303. DejaGnu.note("gh.getCount():"+ untyped gh.getCount() );
  304. if (untyped gh.toString()=="[object Object]") {
  305. DejaGnu.pass("gh.toString() is ''[object Object]''.");
  306. } else {
  307. DejaGnu.fail("gh.toString() is not ''[object Object]''!");
  308. }
  309. if (untyped gh.getCount.toString()=="[type Function]") {
  310. DejaGnu.pass("gh.getCount.toString() is ''[type Function]''.");
  311. } else {
  312. DejaGnu.fail("gh.getCounttoString() is not ''[type Function]''!");
  313. }
  314. if (untyped gh.getCount()==undefined) {
  315. DejaGnu.pass("gh.getCount() is ''undefined''.");
  316. } else {
  317. DejaGnu.fail("gh.getCount() is not ''undefined''!");
  318. }
  319. var gh:TextSnapshot = untyped __new__(TextSnapshot,[flash.Lib.current]);
  320. if (untyped gh.toString()=="[object Object]") {
  321. DejaGnu.pass("gh.toString() is ''[object Object]''.");
  322. } else {
  323. DejaGnu.fail("gh.toString() is not ''[object Object]''!");
  324. }
  325. if (untyped gh.getCount.toString()=="[type Function]") {
  326. DejaGnu.pass("gh.getCount.toString() is ''[type Function]''.");
  327. } else {
  328. DejaGnu.fail("gh.getCounttoString() is not ''[type Function]''!");
  329. }
  330. DejaGnu.note("gh.getCount():"+ untyped gh.getCount() );
  331. if (untyped gh.getCount()==0) {
  332. DejaGnu.pass("gh.getCount() is 0.");
  333. } else {
  334. DejaGnu.xfail("gh.getCount() is not 0!");
  335. DejaGnu.note("Warning! It is ''undefined'' here, not 0. Do not know why!");
  336. }
  337. var gh:TextSnapshot = untyped __new__(TextSnapshot,[untyped flash.Lib.current,true]);
  338. if (untyped gh.toString()=="[object Object]") {
  339. DejaGnu.pass("gh.toString() is ''[object Object]''.");
  340. } else {
  341. DejaGnu.fail("gh.toString() is not ''[object Object]''!");
  342. }
  343. if (untyped gh.getCount.toString()=="[type Function]") {
  344. DejaGnu.pass("gh.getCount.toString() is ''[type Function]''.");
  345. } else {
  346. DejaGnu.fail("gh.getCounttoString() is not ''[type Function]''!");
  347. }
  348. if (untyped gh.getCount()==undefined) {
  349. DejaGnu.pass("gh.getCount() is ''undefined''.");
  350. } else {
  351. DejaGnu.fail("gh.getCount() is not ''undefined''!");
  352. }
  353. #end
  354. /*
  355. gh = new TextSnapshot("hello");
  356. check_equals(gh.toString(), "[object Object]");
  357. check_equals(gh.getCount.toString(), "[type Function]");
  358. check_equals(gh.getCount(), undefined);
  359. o = {};
  360. gh = new TextSnapshot(o);
  361. check_equals(gh.toString(), "[object Object]");
  362. check_equals(gh.getCount.toString(), "[type Function]");
  363. check_equals(gh.getCount(), undefined);
  364. gh = new TextSnapshot(this);
  365. check_equals(gh.toString(), "[object Object]");
  366. check_equals(gh.getCount.toString(), "[type Function]");
  367. check_equals(gh.getCount(), 0);
  368. gh = new TextSnapshot(this, true);
  369. check_equals(gh.toString(), "[object Object]");
  370. check_equals(gh.getCount.toString(), "[type Function]");
  371. check_equals(gh.getCount(), undefined);
  372. */
  373. #if !flash9
  374. var ts:TextSnapshot = _root.getTextSnapshot();
  375. #else
  376. //In flash9
  377. //getTextSnapshot has been changed to flash.text.TextSnapshot.getSelectedText().
  378. //var ts:TextSnapshot = _root.getTextSnapshot();
  379. #end
  380. #if !flash9
  381. if (untyped __instanceof__(textsnapshotobj,TextSnapshot) ){
  382. DejaGnu.pass("textsnapshotobj is an instance of 'TextSnapshot'.");
  383. } else {
  384. DejaGnu.fail("textsnapshotobj is not an instance of 'TextSnapshot'.");
  385. }
  386. if (untyped !ts.hasOwnProperty("findText")) {
  387. DejaGnu.pass("ts.'findText' property does not exists.");
  388. } else {
  389. DejaGnu.fail("ts.'findText' property exists. Wrong!");
  390. }
  391. if (untyped !ts.hasOwnProperty("getCount")) {
  392. DejaGnu.pass("ts.'getCount' property does not exists.");
  393. } else {
  394. DejaGnu.fail("ts.'getCount' property exists. Wrong!");
  395. }
  396. if (untyped !ts.hasOwnProperty("getSelected")) {
  397. DejaGnu.pass("ts.'getSelected' property does not exists.");
  398. } else {
  399. DejaGnu.fail("ts.'getSelected' property exists. Wrong!");
  400. }
  401. if (untyped !ts.hasOwnProperty("getSelectedText")) {
  402. DejaGnu.pass("ts.'getSelectedText property does not exists.");
  403. } else {
  404. DejaGnu.fail("ts.'getSelectedText property exists. Wrong!");
  405. }
  406. if (untyped !ts.hasOwnProperty("getText")) {
  407. DejaGnu.pass("ts.'getText property does not exists.");
  408. } else {
  409. DejaGnu.fail("ts.'getText' property exists. Wrong!");
  410. }
  411. if (untyped !ts.hasOwnProperty("setSelectColor")) {
  412. DejaGnu.pass("ts.'setSelectColor' property does not exists.");
  413. } else {
  414. DejaGnu.fail("ts.'setSelectColor' property exists. Wrong!");
  415. }
  416. if (untyped !Tts.hasOwnProperty("hitTestTextNearPos")) {
  417. DejaGnu.pass("ts.'hitTestTextNearPos' property does not exists.");
  418. } else {
  419. DejaGnu.fail("ts.'hitTestTextNearPos' property exists. Wrong!");
  420. }
  421. if (untyped !ts.hasOwnProperty("setSelected")) {
  422. DejaGnu.pass("ts.'setSelected' property does not exists.");
  423. } else {
  424. DejaGnu.fail("ts.'setSelected' property exists. Wrong!");
  425. }
  426. // DejaGnu.note("ts 1"+untyped __typeof__(ts.getCount() ) );
  427. // DejaGnu.note("ts 1"+untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getCount"), [0]) ) );
  428. // DejaGnu.note("ts 1"+Std.string(untyped __typeof__(ts.getCount('a')) ));
  429. // DejaGnu.note("ts 1"+Std.string(untyped __typeof__(ts.getCount(true)) ));
  430. // DejaGnu.note("ts 1"+Std.string(untyped __typeof__(ts.getCount(0,1)) ));
  431. // DejaGnu.note("ts 1"+typeof(ts.getCount()) );
  432. if (Std.string( untyped __typeof__(ts.getCount() ) )=="number"){
  433. DejaGnu.pass("ts.'getCount()' returns a number.");
  434. } else {
  435. DejaGnu.fail("ts.'getCount()' does not returns a number!");
  436. }
  437. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getCount"), [0]) ) )=="undefined"){
  438. DejaGnu.pass("ts.'getCount(0)' returns 'undefined'.");
  439. } else {
  440. DejaGnu.fail("ts.'getCount(0)' does not return 'undefined'!");
  441. }
  442. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getCount"), ["a"]) ) )=="undefined"){
  443. DejaGnu.pass("ts.'getCount(''a'')' returns 'undefined'.");
  444. } else {
  445. DejaGnu.fail("ts.'getCount(''a'')' does not return 'undefined'!");
  446. }
  447. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getCount"), [true]) ) )=="undefined"){
  448. DejaGnu.pass("ts.'getCount(true)' returns 'undefined'.");
  449. } else {
  450. DejaGnu.fail("ts.'getCount(true)' does not return 'undefined'!");
  451. }
  452. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getCount"), [0,1]) ) )=="undefined"){
  453. DejaGnu.pass("ts.'getCount(0,1)' returns 'undefined'.");
  454. } else {
  455. DejaGnu.fail("ts.'getCount(0,1)' does not return 'undefined'!");
  456. }
  457. if ( ts.getCount() ==0){
  458. DejaGnu.pass("ts.'getCount()' returns 0.");
  459. } else {
  460. DejaGnu.fail("ts.'getCount()' does not returns 0!");
  461. }
  462. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), []) ) )=="undefined"){
  463. DejaGnu.pass("ts.'findText()' returns 'undefined'.");
  464. } else {
  465. DejaGnu.fail("ts.'findText()' does not return 'undefined'!");
  466. }
  467. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), ["a"]) ) )=="undefined"){
  468. DejaGnu.pass("ts.'findText(''a'')' returns 'undefined'.");
  469. } else {
  470. DejaGnu.fail("ts.'findText(''a'')' does not return 'undefined'!");
  471. }
  472. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1]) ) )=="undefined"){
  473. DejaGnu.pass("ts.'findText(1)' returns 'undefined'.");
  474. } else {
  475. DejaGnu.fail("ts.'findText(1)' does not return 'undefined'!");
  476. }
  477. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1,"a"]) ) )=="undefined"){
  478. DejaGnu.pass("ts.'findText(1,''a'')' returns 'undefined'.");
  479. } else {
  480. DejaGnu.fail("ts.'findText(1,''a'')' does not return 'undefined'!");
  481. }
  482. // Test with no text.
  483. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1,"a",true]) ) )=="number"){
  484. DejaGnu.pass("ts.'findText(1,''a'',true)' returns a 'number'.");
  485. } else {
  486. DejaGnu.fail("ts.'findText(1,''a'',true)' does not return a 'number'!");
  487. }
  488. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1,"a",1]) ) )=="number"){
  489. DejaGnu.pass("ts.'findText(1,''a'',1)' returns a 'number'.");
  490. } else {
  491. DejaGnu.fail("ts.'findText(1,''a'',1)' does not return a 'number'!");
  492. }
  493. // Test with no test
  494. // Si built dateObj as new Date();
  495. var dateObj:Date=untyped __new__(Date,[]);
  496. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1,"a", dateObj] ) ) )=="number"){
  497. DejaGnu.pass("ts.'findText(1,''a'',new Date())' returns a 'number'.");
  498. } else {
  499. DejaGnu.fail("ts.'findText(1,''a'',new Date())' does not return a 'number'!");
  500. }
  501. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1,"a", dateObj] ) ) )=="number"){
  502. DejaGnu.pass("ts.'findText(1,''a'',new Date())' returns a 'number'.");
  503. } else {
  504. DejaGnu.fail("ts.'findText(1,''a'',new Date())' does not return a 'number'!");
  505. }
  506. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), ["6","a", dateObj] ) ) )=="number"){
  507. DejaGnu.pass("ts.'findText(''6'',''a'',new Date())' returns a 'number'.");
  508. } else {
  509. DejaGnu.fail("ts.'findText(''6'',''a'',new Date())' does not return a 'number'!");
  510. }
  511. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), ["b","a", dateObj] ) ) )=="number"){
  512. DejaGnu.pass("ts.'findText(''b'',''a'',new Date())' returns a 'number'.");
  513. } else {
  514. DejaGnu.fail("ts.'findText(''b'',''a'',new Date())' does not return a 'number'!");
  515. }
  516. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [-1,"a", dateObj] ) ) )=="number"){
  517. DejaGnu.pass("ts.'findText(-1,''a'',new Date())' returns a 'number'.");
  518. } else {
  519. DejaGnu.fail("ts.'findText(-1,''a'',new Date())' does not return a 'number'!");
  520. }
  521. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [Infinity, "a", dateObj] ) ) )=="number"){
  522. DejaGnu.pass("ts.'findText(Infinity,''a'',new Date())' returns a 'number'.");
  523. } else {
  524. DejaGnu.fail("ts.'findText(Infinity,''a'',new Date())' does not return a 'number'!");
  525. }
  526. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [-1,"a", dateObj,"e"] ) ) )=="undefined"){
  527. DejaGnu.pass("ts.'findText(-1,''a'',new Date(),''e'')' returns 'undefined'.");
  528. } else {
  529. DejaGnu.fail("ts.'findText(-1,''a'',new Date(),''e'')' does not return 'undefined'!");
  530. }
  531. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"findText"), [Infinity, "a", dateObj,3] ) ) )=="undefined"){
  532. DejaGnu.pass("ts.'findText(Infinity,''a'',new Date(),3)' returns 'undefined'.");
  533. } else {
  534. DejaGnu.fail("ts.'findText(Infinity,''a'',new Date(),3)' does not return 'undefined'!");
  535. }
  536. if ( Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1,"a", true] ) ==-1){
  537. DejaGnu.pass("ts.findText(1, ''a'', true), returns -1.");
  538. } else {
  539. DejaGnu.fail("ts.findText(1, ''a'', true) does not return -1.");
  540. }
  541. if ( Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1,"a", 1] ) ==-1){
  542. DejaGnu.pass("ts.findText(1, ''a'', 1), returns -1.");
  543. } else {
  544. DejaGnu.fail("ts.findText(1, ''a'', 1) does not return -1.");
  545. }
  546. if ( Reflect.callMethod(ts, Reflect.field(ts,"findText"), [1,"a", dateObj] ) ==-1){
  547. DejaGnu.pass("ts.findText(1, ''a'', new Date() ) returns -1.");
  548. } else {
  549. DejaGnu.fail("ts.findText(1, ''a'', new Date() ) does not return -1.");
  550. }
  551. if ( Reflect.callMethod(ts, Reflect.field(ts,"findText"), ["6","a", false] ) ==-1){
  552. DejaGnu.pass("ts.findText(''6'', ''a'', false), returns -1.");
  553. } else {
  554. DejaGnu.fail("ts.findText(''6'', ''a'', false) does not return -1.");
  555. }
  556. if ( Reflect.callMethod(ts, Reflect.field(ts,"findText"), ["6","a", true] ) ==-1){
  557. DejaGnu.pass("ts.findText(''6'', ''a'', true), returns -1.");
  558. } else {
  559. DejaGnu.fail("ts.findText(''6'', ''a'', true) does not return -1.");
  560. }
  561. if ( Reflect.callMethod(ts, Reflect.field(ts,"findText"), [-1,"a", dateObj] ) ==-1){
  562. DejaGnu.pass("ts.findText(-1, ''a'', new Date() ) returns -1.");
  563. } else {
  564. DejaGnu.fail("ts.findText(-1, ''a'', new Date() ) does not return -1.");
  565. }
  566. if ( Reflect.callMethod(ts, Reflect.field(ts,"findText"), [untyped Infinity,"a", dateObj] ) ==-1){
  567. DejaGnu.pass("ts.findText(Infinity, ''a'', new Date() ) returns -1.");
  568. } else {
  569. DejaGnu.fail("ts.findText(Infinity, ''a'', new Date() ) does not return -1.");
  570. }
  571. // Shouldn't work with dynamic text.
  572. _root.createTextField("tf", 10, 30, 30, 100, 100);
  573. _root.tf.text = "ghjkab";
  574. ts = _root.getTextSnapshot();
  575. if ( ts.getCount() ==0){
  576. DejaGnu.pass("ts.getCount() returns 0.");
  577. } else {
  578. DejaGnu.fail("ts.getCount() does not return 0.");
  579. }
  580. if ( ts.findText(1,"a",true) ==-1){
  581. DejaGnu.pass("ts.findText(1,''a'',true) returns -1.");
  582. } else {
  583. DejaGnu.fail("ts.findText(1,''a'',true) does not return -1.");
  584. }
  585. if ( ts.findText(1,"a",false) ==-1){
  586. DejaGnu.pass("ts.findText(1,''a'',false) returns 0.");
  587. } else {
  588. DejaGnu.fail("ts.findText(1,''a'',false) does not return 0.");
  589. }
  590. //getSelected
  591. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [] ) ) )=="undefined"){
  592. DejaGnu.pass("ts.'getSelected()' returns 'undefined'.");
  593. } else {
  594. DejaGnu.fail("ts.'getSelected()' does not return 'undefined'!");
  595. }
  596. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [0] ) ) )=="undefined"){
  597. DejaGnu.pass("ts.'getSelected(0)' returns 'undefined'.");
  598. } else {
  599. DejaGnu.fail("ts.'getSelected(0)' does not return 'undefined'!");
  600. }
  601. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), ["a"] ) ) )=="undefined"){
  602. DejaGnu.pass("ts.'getSelected(''a'')' returns 'undefined'.");
  603. } else {
  604. DejaGnu.fail("ts.'getSelected(''a'')' does not return 'undefined'!");
  605. }
  606. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [dateObj] ) ) )=="undefined"){
  607. DejaGnu.pass("ts.'getSelected(new Date())' returns 'undefined'.");
  608. } else {
  609. DejaGnu.fail("ts.'getSelected(new Date())' does not return 'undefined'!");
  610. }
  611. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [[0,1]] ) ) )=="undefined"){
  612. DejaGnu.pass("ts.'getSelected([0,1])' returns 'undefined'.");
  613. } else {
  614. DejaGnu.fail("ts.'getSelected([0,1])' does not return 'undefined'!");
  615. }
  616. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [[0,1],2] ) ) )=="boolean"){
  617. DejaGnu.pass("ts.'getSelected([0,1],2)' returns a 'boolean'.");
  618. } else {
  619. DejaGnu.fail("ts.'getSelected([0,1],2)' does not return a 'boolean'!");
  620. }
  621. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [0,1] ) ) )=="boolean"){
  622. DejaGnu.pass("ts.'getSelected(0,1)' returns a 'boolean'.");
  623. } else {
  624. DejaGnu.fail("ts.'getSelected(0,1)' does not return a 'boolean'!");
  625. }
  626. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [1,0] ) ) )=="boolean"){
  627. DejaGnu.pass("ts.'getSelected(1,0)' returns a 'boolean'.");
  628. } else {
  629. DejaGnu.fail("ts.'getSelected(1,0)' does not return a 'boolean'!");
  630. }
  631. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [-1,3] ) ) )=="boolean"){
  632. DejaGnu.pass("ts.'getSelected(-1,3)' returns a 'boolean'.");
  633. } else {
  634. DejaGnu.fail("ts.'getSelected(-1,3)' does not return a 'boolean'!");
  635. }
  636. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [1,0] ) ) )=="boolean"){
  637. DejaGnu.pass("ts.'getSelected(1,0)' returns a 'boolean'.");
  638. } else {
  639. DejaGnu.fail("ts.'getSelected(1,0)' does not return a 'boolean'!");
  640. }
  641. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [1,0] ) ) )=="boolean"){
  642. DejaGnu.pass("ts.'getSelected(1,0)' returns a 'boolean'.");
  643. } else {
  644. DejaGnu.fail("ts.'getSelected(1,0)' does not return a 'boolean'!");
  645. }
  646. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [0,"a"] ) ) )=="boolean"){
  647. DejaGnu.pass("ts.'getSelected(0,''a'')' returns a 'boolean'.");
  648. } else {
  649. DejaGnu.fail("ts.'getSelected(0,''a'')' does not return a 'boolean'!");
  650. }
  651. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), ["b",0] ) ) )=="boolean"){
  652. DejaGnu.pass("ts.'getSelected(''b'',0)' returns a 'boolean'.");
  653. } else {
  654. DejaGnu.fail("ts.'getSelected(''b'',0)' does not return a 'boolean'!");
  655. }
  656. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [true,false] ) ) )=="boolean"){
  657. DejaGnu.pass("ts.'getSelected(true,false)' returns a 'boolean'.");
  658. } else {
  659. DejaGnu.fail("ts.'getSelected(true,false)' does not return a 'boolean'!");
  660. }
  661. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [0,10,10] ) ) )=="undefined"){
  662. DejaGnu.pass("ts.'getSelected(0,10,10)' returns 'undefined'.");
  663. } else {
  664. DejaGnu.fail("ts.'getSelected(0,10,10)' does not return 'undefined'!");
  665. }
  666. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [0,10,true] ) ) )=="undefined"){
  667. DejaGnu.pass("ts.'getSelected(0,10,true)' returns 'undefined'.");
  668. } else {
  669. DejaGnu.fail("ts.'getSelected(0,10,true)' does not return 'undefined'!");
  670. }
  671. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelected"), [0,10,"a"] ) ) )=="undefined"){
  672. DejaGnu.pass("ts.'getSelected(0,10,''a'')' returns 'undefined'.");
  673. } else {
  674. DejaGnu.fail("ts.'getSelected(0,10,''a'')' does not return 'undefined'!");
  675. }
  676. //getSelectedText
  677. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [] ) ) )=="string"){
  678. DejaGnu.pass("ts.'getSelectedText()' returns a 'string'.");
  679. } else {
  680. DejaGnu.fail("ts.'getSelectedText()' does not return a 'string'!");
  681. }
  682. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [0] ) ) )=="string"){
  683. DejaGnu.pass("ts.'getSelectedText(0)' returns a 'string'.");
  684. } else {
  685. DejaGnu.fail("ts.'getSelectedText(0)' does not return a 'string'!");
  686. }
  687. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), ["a"] ) ) )=="string"){
  688. DejaGnu.pass("ts.'getSelectedText(''a'')' returns a 'string'.");
  689. } else {
  690. DejaGnu.fail("ts.'getSelectedText(''a'')' does not return a 'string'!");
  691. }
  692. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [dateObj] ) ) )=="string"){
  693. DejaGnu.pass("ts.'getSelectedText(new Date())' returns a 'string'.");
  694. } else {
  695. DejaGnu.fail("ts.'getSelectedText(new Date())' does not return a 'string'!");
  696. }
  697. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [[0,2]] ) ) )=="string"){
  698. DejaGnu.pass("ts.'getSelectedText([0,2])' returns a 'string'.");
  699. } else {
  700. DejaGnu.fail("ts.'getSelectedText([0,2])' does not return a 'string'!");
  701. }
  702. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [0,1] ) ) )=="undefined"){
  703. DejaGnu.pass("ts.'getSelectedText(0,1)' returns 'undefined'.");
  704. } else {
  705. DejaGnu.fail("ts.'getSelectedText(0,1)' does not return 'undefined'!");
  706. }
  707. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [1,0] ) ) )=="undefined"){
  708. DejaGnu.pass("ts.'getSelectedText(1,0)' returns 'undefined'.");
  709. } else {
  710. DejaGnu.fail("ts.'getSelectedText(1,0)' does not return 'undefined'!");
  711. }
  712. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [-1,3] ) ) )=="undefined"){
  713. DejaGnu.pass("ts.'getSelectedText(-1,3)' returns 'undefined'.");
  714. } else {
  715. DejaGnu.fail("ts.'getSelectedText(-1,3)' does not return 'undefined!");
  716. }
  717. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [1,0] ) ) )=="undefined"){
  718. DejaGnu.pass("ts.'getSelectedText(1,0)' returns 'undefined'");
  719. } else {
  720. DejaGnu.fail("ts.'getSelectedText(1,0)' does not return 'undefined'!");
  721. }
  722. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [1,0] ) ) )=="undefined"){
  723. DejaGnu.pass("ts.'getSelectedText(1,0)' returns 'undefined'.");
  724. } else {
  725. DejaGnu.fail("ts.'getSelectedText(1,0)' does not return 'undefined'!");
  726. }
  727. if (Std.string( untyped __typeof__(Reflect.callMethod(ts,Reflect.field(ts,"getSelectedText"), [0,"a"] ) ) )=="undefined"){
  728. DejaGnu.pass("ts.'getSelectedText(0,''a'')' returns 'undefined'. ");
  729. } else {
  730. DejaGnu.fail("ts.'getSelectedText(0,''a'')' does not return 'undefined'.!");
  731. }
  732. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), ["b",0] ) ) )=="undefined"){
  733. DejaGnu.pass("ts.'getSelectedText(''b'',0)' returns 'undefined'.");
  734. } else {
  735. DejaGnu.fail("ts.'getSelectedText(''b'',0)' does not return 'undefined'!");
  736. }
  737. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [true,false] ) ) )=="undefined"){
  738. DejaGnu.pass("ts.'getSelectedText(true,false)' returns 'undefined'.");
  739. } else {
  740. DejaGnu.fail("ts.'getSelectedText(true,false)' does not return 'undefined'!");
  741. }
  742. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [0,10,10] ) ) )=="undefined"){
  743. DejaGnu.pass("ts.'getSelectedText(0,10,10)' returns 'undefined'.");
  744. } else {
  745. DejaGnu.fail("ts.'getSelectedText(0,10,10)' does not return 'undefined'!");
  746. }
  747. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [0,10,true] ) ) )=="undefined"){
  748. DejaGnu.pass("ts.'getSelectedText(0,10,true)' returns 'undefined'.");
  749. } else {
  750. DejaGnu.fail("ts.'getSelectedText(0,10,true)' does not return 'undefined'!");
  751. }
  752. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getSelectedText"), [0,10,"a"] ) ) )=="undefined"){
  753. DejaGnu.pass("ts.'getSelectedText(0,10,''a'')' returns 'undefined'.");
  754. } else {
  755. DejaGnu.fail("ts.'getSelectedText(0,10,''a'')' does not return 'undefined'!");
  756. }
  757. //getText
  758. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [] ) ) )=="undefined"){
  759. DejaGnu.pass("ts.'getText()' returns 'undefined'.");
  760. } else {
  761. DejaGnu.fail("ts.'getText()' does not return 'undefined'!");
  762. }
  763. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [0] ) ) )=="undefined"){
  764. DejaGnu.pass("ts.'getText(0)' returns 'undefined'.");
  765. } else {
  766. DejaGnu.fail("ts.'getText(0)' does not return 'undefined'!");
  767. }
  768. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), ["a"] ) ) )=="undefined"){
  769. DejaGnu.pass("ts.'getText(''a'')' returns 'undefined'.");
  770. } else {
  771. DejaGnu.fail("ts.'getText(''a'')' does not return 'undefined'!");
  772. }
  773. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [dateObj] ) ) )=="undefined"){
  774. DejaGnu.pass("ts.'getText(new Date())' returns 'undefined'.");
  775. } else {
  776. DejaGnu.fail("ts.'getText(new Date())' does not return 'undefined'!");
  777. }
  778. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [0,1] ) ) )=="string"){
  779. DejaGnu.pass("ts.'getText(0,1)' returns a 'string'.");
  780. } else {
  781. DejaGnu.fail("ts.'getText(0,1)' does not return 'string'!");
  782. }
  783. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [1,0] ) ) )=="string"){
  784. DejaGnu.pass("ts.'getText(1,0)' returns a 'string'.");
  785. } else {
  786. DejaGnu.fail("ts.'getText(1,0)' does not return 'string'!");
  787. }
  788. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [-1,3] ) ) )=="string"){
  789. DejaGnu.pass("ts.'getText(-1,3)' returns a 'string'.");
  790. } else {
  791. DejaGnu.fail("ts.'getText(-1,3)' does not return 'string'!");
  792. }
  793. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [1,0] ) ) )=="string"){
  794. DejaGnu.pass("ts.'getText(1,0)' returns a 'string'.");
  795. } else {
  796. DejaGnu.fail("ts.'getText(1,0)' does not return 'string'!");
  797. }
  798. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [1,0] ) ) )=="string"){
  799. DejaGnu.pass("ts.'getText(1,0)' returns a 'string'.");
  800. } else {
  801. DejaGnu.fail("ts.'getText(1,0)' does not return 'string'!");
  802. }
  803. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [0,"a"] ) ) )=="string"){
  804. DejaGnu.pass("ts.'getText(0,''a'')' returns a 'string'.");
  805. } else {
  806. DejaGnu.fail("ts.'getText(0,''a'')' does not return 'string'!");
  807. }
  808. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), ["b",0] ) ) )=="string"){
  809. DejaGnu.pass("ts.'getText(''b'',0)' returns a 'string'.");
  810. } else {
  811. DejaGnu.fail("ts.'getText(''b'',0)' does not return 'string'!");
  812. }
  813. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [true,false] ) ) )=="string"){
  814. DejaGnu.pass("ts.'getText(true,false)' returns a 'string'.");
  815. } else {
  816. DejaGnu.fail("ts.'getText(true,false)' does not return 'string'!");
  817. }
  818. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [0,10,10] ) ) )=="string"){
  819. DejaGnu.pass("ts.'getText(0,10,10)' returns a 'string'.");
  820. } else {
  821. DejaGnu.fail("ts.'getText(0,10,10)' does not return 'string'!");
  822. }
  823. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [0,10,true] ) ) )=="string"){
  824. DejaGnu.pass("ts.'getText(0,10,true)' returns a 'string'.");
  825. } else {
  826. DejaGnu.fail("ts.'getText(0,10,true)' does not return 'string'!");
  827. }
  828. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [0,10,"a",11] ) ) )=="undefined"){
  829. DejaGnu.pass("ts.'getText(0,10,''a'',11)' returns 'undefined'.");
  830. } else {
  831. DejaGnu.fail("ts.'getText(0,10,''a'',11)' does not return 'undefined'!");
  832. }
  833. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [0,10,10,"hello"] ) ) )=="undefined"){
  834. DejaGnu.pass("ts.'getText(0,10,10,''hello'')' returns 'undefined'.");
  835. } else {
  836. DejaGnu.fail("ts.'getText(0,10,10,''hello'')' does not return 'undefined'!");
  837. }
  838. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [0,10,true,[3,4]] ) ) )=="undefined"){
  839. DejaGnu.pass("ts.'getText(0,10,true,[3,4])' returns 'undefined'.");
  840. } else {
  841. DejaGnu.fail("ts.'getText(0,10,true,[3,4])' does not return 'undefined'!");
  842. }
  843. //setSelectColor()
  844. // setSelectColor(). Returns void
  845. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelectColor"), [] ) ) )=="undefined"){
  846. DejaGnu.pass("ts.'setSelectColor()' returns 'undefined'.");
  847. } else {
  848. DejaGnu.fail("ts.'setSelectColor()' does not return 'undefined'!");
  849. }
  850. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelectColor"), [0] ) ) )=="undefined"){
  851. DejaGnu.pass("ts.'setSelectColor(0)' returns 'undefined'.");
  852. } else {
  853. DejaGnu.fail("ts.'setSelectColor(0)' does not return 'undefined'!");
  854. }
  855. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelectColor"), [0,4] ) ) )=="undefined"){
  856. DejaGnu.pass("ts.'setSelectColor(0,4)' returns 'undefined'.");
  857. } else {
  858. DejaGnu.fail("ts.'setSelectColor(0,4)' does not return 'undefined'!");
  859. }
  860. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelectColor"), [0,5,6] ) ) )=="undefined"){
  861. DejaGnu.pass("ts.'setSelectColor(0,5,6)' returns 'undefined'.");
  862. } else {
  863. DejaGnu.fail("ts.'setSelectColor(0,5,6)' does not return 'undefined'!");
  864. }
  865. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelectColor"), [0,5,true] ) ) )=="undefined"){
  866. DejaGnu.pass("ts.'setSelectColor(0,5,true)' returns 'undefined'.");
  867. } else {
  868. DejaGnu.fail("ts.'setSelectColor(0,5,true)' does not return 'undefined'!");
  869. }
  870. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelectColor"), [0,5,8,5] ) ) )=="undefined"){
  871. DejaGnu.pass("ts.'setSelectColor(0,5,8,5)' returns 'undefined'.");
  872. } else {
  873. DejaGnu.fail("ts.'setSelectColor(0,5,8,5)' does not return 'undefined'!");
  874. }
  875. //hitTestTextNearPos()
  876. //getText
  877. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [] ) ) )=="undefined"){
  878. DejaGnu.pass("ts.'hitTestTextNearPos()' returns 'undefined'.");
  879. } else {
  880. DejaGnu.fail("ts.'hitTestTextNearPos()' does not return 'undefined'!");
  881. }
  882. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0] ) ) )=="undefined"){
  883. DejaGnu.pass("ts.'hitTestTextNearPos(0)' returns 'undefined'.");
  884. } else {
  885. DejaGnu.fail("ts.'hitTestTextNearPos(0)' does not return 'undefined'!");
  886. }
  887. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), ["a"] ) ) )=="undefined"){
  888. DejaGnu.pass("ts.'hitTestTextNearPos(''a'')' returns 'undefined'.");
  889. } else {
  890. DejaGnu.fail("ts.'hitTestTextNearPos(''a'')' does not return 'undefined'!");
  891. }
  892. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [dateObj] ) ) )=="undefined"){
  893. DejaGnu.pass("ts.'hitTestTextNearPos(new Date())' returns 'undefined'.");
  894. } else {
  895. DejaGnu.fail("ts.'hitTestTextNearPos(new Date())' does not return 'undefined'!");
  896. }
  897. // DejaGnu.note(" *** " +Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0,1] ) ) ) );
  898. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0,1] ) ) )=="number"){
  899. DejaGnu.xpass("ts.'hitTestTextNearPos(0,1)' returns a 'number'.");
  900. } else {
  901. DejaGnu.xfail("ts.'hitTestTextNearPos(0,1)' does not return 'number'!");
  902. }
  903. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [1,0] ) ) )=="number"){
  904. DejaGnu.xpass("ts.'hitTestTextNearPos(1,0)' returns a 'number'.");
  905. } else {
  906. DejaGnu.xfail("ts.'hitTestTextNearPos(1,0)' does not return 'number'!");
  907. }
  908. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [-1,3] ) ) )=="number"){
  909. DejaGnu.xpass("ts.'hitTestTextNearPos(-1,3)' returns a 'number'.");
  910. } else {
  911. DejaGnu.xfail("ts.'hitTestTextNearPos(-1,3)' does not return 'number'!");
  912. }
  913. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"getText"), [1,0] ) ) )=="number"){
  914. DejaGnu.xpass("ts.'getText(1,0)' returns a 'number'.");
  915. } else {
  916. DejaGnu.xfail("ts.'getText(1,0)' does not return 'number'!");
  917. }
  918. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [1,0] ) ) )=="number"){
  919. DejaGnu.xpass("ts.'hitTestTextNearPos(1,0)' returns a 'number'.");
  920. } else {
  921. DejaGnu.xfail("ts.'hitTestTextNearPos(1,0)' does not return 'number'.!");
  922. }
  923. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0,"a"] ) ) )=="number"){
  924. DejaGnu.xpass("ts.'hitTestTextNearPos(0,''a'')' returns a 'number'.");
  925. } else {
  926. DejaGnu.xfail("ts.'hitTestTextNearPos(0,''a'')' does not return 'number'!");
  927. }
  928. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), ["b",0] ) ) )=="number"){
  929. DejaGnu.xpass("ts.'hitTestTextNearPos(''b'',0)' returns a 'number'.");
  930. } else {
  931. DejaGnu.xfail("ts.'hitTestTextNearPos(''b'',0)' does not return 'number'!");
  932. }
  933. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [true,false] ) ) )=="number"){
  934. DejaGnu.xpass("ts.'hitTestTextNearPos(true,false)' returns a 'number'.");
  935. } else {
  936. DejaGnu.xfail("ts.'hitTestTextNearPos(true,false)' does not return 'number'!");
  937. }
  938. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0,10,10] ) ) )=="number"){
  939. DejaGnu.xpass("ts.'hitTestTextNearPos(0,10,10)' returns a 'number'.");
  940. } else {
  941. DejaGnu.xfail("ts.'hitTestTextNearPos(0,10,10)' does not return 'number'!");
  942. }
  943. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0,10,true] ) ) )=="number"){
  944. DejaGnu.xpass("ts.'hitTestTextNearPos(0,10,true)' returns a 'number'.");
  945. } else {
  946. DejaGnu.xfail("ts.'hitTestTextNearPos(0,10,true)' does not return 'number'!");
  947. }
  948. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0,10,"a",11] ) ) )=="undefined"){
  949. DejaGnu.pass("ts.'hitTestTextNearPos(0,10,''a'',11)' returns 'undefined'.");
  950. } else {
  951. DejaGnu.fail("ts.'hitTestTextNearPos(0,10,''a'',11)' does not return 'undefined'!");
  952. }
  953. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0,10,10,"hello"] ) ) )=="undefined"){
  954. DejaGnu.pass("ts.'hitTestTextNearPos(0,10,10,''hello'';)' returns 'undefined'.");
  955. } else {
  956. DejaGnu.fail("ts.'hitTestTextNearPos(0,10,10,''hello'';)' does not return 'undefined'!");
  957. }
  958. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"hitTestTextNearPos"), [0,10,true,[3,4]] ) ) )=="undefined"){
  959. DejaGnu.pass("ts.'hitTestTextNearPos(0,10,true,[3,4])' returns 'undefined'.");
  960. } else {
  961. DejaGnu.fail("ts.'hitTestTextNearPos(0,10,true,[3,4])' does not return 'undefined'!");
  962. }
  963. //setSelected()
  964. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [] ) ) )=="undefined"){
  965. DejaGnu.pass("ts.'setSelected()' returns 'undefined'.");
  966. } else {
  967. DejaGnu.fail("ts.'setSelected()' does not return a 'string'!");
  968. }
  969. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [0] ) ) )=="undefined"){
  970. DejaGnu.pass("ts.'setSelected(0)' returns 'undefined'.");
  971. } else {
  972. DejaGnu.fail("ts.'setSelected(0)' does not return 'undefined'!");
  973. }
  974. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), ["a"] ) ) )=="undefined"){
  975. DejaGnu.pass("ts.'setSelected(''a'')' returns 'undefined'.");
  976. } else {
  977. DejaGnu.fail("ts.'setSelected(''a'')' does not return 'undefined'!");
  978. }
  979. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [dateObj] ) ) )=="undefined"){
  980. DejaGnu.pass("ts.'setSelected(new Date())' returns a 'undefined'.");
  981. } else {
  982. DejaGnu.fail("ts.'setSelected(new Date())' does not return a 'undefined'!");
  983. }
  984. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [0,1] ) ) )=="undefined"){
  985. DejaGnu.pass("ts.'setSelected(0,1)' returns a 'undefined'.");
  986. } else {
  987. DejaGnu.fail("ts.'setSelected(0,1)' does not return a 'undefined'!");
  988. }
  989. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [1,0] ) ) )=="undefined"){
  990. DejaGnu.pass("ts.'setSelected(1,0)' returns 'undefined'.");
  991. } else {
  992. DejaGnu.fail("ts.'setSelected(1,0)' does not return 'undefined'!");
  993. }
  994. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [-1,3] ) ) )=="undefined"){
  995. DejaGnu.pass("ts.'setSelected(-1,3)' returns 'undefined'.");
  996. } else {
  997. DejaGnu.fail("ts.'setSelected(-1,3)' does not return 'undefined!");
  998. }
  999. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [1,0] ) ) )=="undefined"){
  1000. DejaGnu.pass("ts.'setSelected(1,0)' returns 'undefined'");
  1001. } else {
  1002. DejaGnu.fail("ts.'setSelected(1,0)' does not return 'undefined'!");
  1003. }
  1004. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [1,0] ) ) )=="undefined"){
  1005. DejaGnu.pass("ts.'setSelected(1,0)' returns 'undefined'.");
  1006. } else {
  1007. DejaGnu.fail("ts.'setSelected(1,0)' does not return 'undefined'!");
  1008. }
  1009. if (Std.string( untyped __typeof__(Reflect.callMethod(ts,Reflect.field(ts,"setSelected"), [0,"a"] ) ) )=="undefined"){
  1010. DejaGnu.pass("ts.'setSelected(0,''a'')' returns 'undefined'. ");
  1011. } else {
  1012. DejaGnu.fail("ts.'setSelected(0,''a'')' does not return 'undefined'.!");
  1013. }
  1014. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), ["b",0] ) ) )=="undefined"){
  1015. DejaGnu.pass("ts.'setSelected(''b'',0)' returns 'undefined'.");
  1016. } else {
  1017. DejaGnu.fail("ts.'setSelected(''b'',0)' does not return 'undefined'!");
  1018. }
  1019. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [true,false] ) ) )=="undefined"){
  1020. DejaGnu.pass("ts.'setSelected(true,false)' returns 'undefined'.");
  1021. } else {
  1022. DejaGnu.fail("ts.'setSelected(true,false)' does not return 'undefined'!");
  1023. }
  1024. if (Std.string( untyped __typeof__(Reflect.callMethod(ts, Reflect.field(ts,"setSelected"), [0,10,10] ) ) )=="undefined"){
  1025. DejaGnu.pass("ts.'setSelected(0,10,10)' returns 'undefined'.");
  1026. } else {
  1027. DejaGnu.fail("ts.'setSelected(0,10,10)' does not return 'undefined'!");
  1028. }
  1029. if (Std.string( untyped __typeof__(Reflect.ca