PageRenderTime 54ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1.3.35/Examples/test-suite/chicken/clientdata_prop_runme_proxy.ss

#
Scheme | 95 lines | 81 code | 11 blank | 3 comment | 0 complexity | 56a894a403a551aa751aaea36e6a2734 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. (require 'clientdata_prop_a)
  2. (require 'clientdata_prop_b)
  3. (define a (make <A>))
  4. (test-A a)
  5. (test-tA a)
  6. (test-t2A a)
  7. (test-t3A a)
  8. (fA a)
  9. (define b (make <B>))
  10. (test-A b)
  11. (test-tA b)
  12. (test-t2A b)
  13. (test-t3A b)
  14. (test-B b)
  15. (fA b)
  16. (fB b)
  17. (define c (make <C>))
  18. (test-A c)
  19. (test-tA c)
  20. (test-t2A c)
  21. (test-t3A c)
  22. (test-C c)
  23. (fA c)
  24. (fC c)
  25. (define d (make <D>))
  26. (test-A d)
  27. (test-tA d)
  28. (test-t2A d)
  29. (test-t3A d)
  30. (test-D d)
  31. (test-tD d)
  32. (test-t2D d)
  33. (fA d)
  34. (fD d)
  35. ;; here are the real tests... if the clientdata is correctly
  36. ;; propegated, new-tA, new-t2A, should all return wrapped proxy's
  37. ;; of class <A>
  38. (define a2 (new-tA))
  39. (if (not (eq? (class-of a2) <A>))
  40. (error "Error 1"))
  41. (test-A a2)
  42. (test-tA a2)
  43. (test-t2A a2)
  44. (test-t3A a2)
  45. (fA a2)
  46. (define a3 (new-t2A))
  47. (if (not (eq? (class-of a3) <A>))
  48. (error "Error 2"))
  49. (test-A a3)
  50. (test-tA a3)
  51. (test-t2A a3)
  52. (test-t3A a3)
  53. (fA a3)
  54. (define a4 (new-t3A))
  55. (if (not (eq? (class-of a4) <A>))
  56. (error "Error 3"))
  57. (test-A a4)
  58. (test-tA a4)
  59. (test-t2A a4)
  60. (test-t3A a4)
  61. (fA a4)
  62. (define d2 (new-tD))
  63. (if (not (eq? (class-of d2) <D>))
  64. (error "Error 4"))
  65. (test-A d2)
  66. (test-tA d2)
  67. (test-t2A d2)
  68. (test-t3A d2)
  69. (test-D d2)
  70. (test-tD d2)
  71. (fA d2)
  72. (fD d2)
  73. (define d3 (new-t2D))
  74. (if (not (eq? (class-of d3) <D>))
  75. (error "Error 5"))
  76. (test-A d3)
  77. (test-tA d3)
  78. (test-t2A d3)
  79. (test-t3A d3)
  80. (test-D d3)
  81. (test-tD d3)
  82. (fA d3)
  83. (fD d3)
  84. (exit 0)