• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2


Commit MetaInfo

修訂b68129d38b7967c3852e0fc8d6fbf83fad522332 (tree)
時間2024-03-08 23:45:19
作者Albert Mietus < albert AT mietus DOT nl >
CommiterAlbert Mietus < albert AT mietus DOT nl >

Log Message

ProtocolWrapper.getattr, now tested

Change Summary

差異

diff -r 0f9bda061905 -r b68129d38b79 base_packages/castle-aigr/pytst/test_2c_GenericProtocols.py
--- a/base_packages/castle-aigr/pytst/test_2c_GenericProtocols.py Fri Mar 08 15:29:58 2024 +0100
+++ b/base_packages/castle-aigr/pytst/test_2c_GenericProtocols.py Fri Mar 08 15:45:19 2024 +0100
@@ -84,6 +84,11 @@
8484 def test_GenericProtocol_kind_b(base, sub_b):
8585 assert_GP_kind(base, sub_b)
8686
87+def test_GenericProtocol_delegate(base):
88+ """The GenericProtocol delegates all methods to it `based_on` protocol. By examples ``._noEvents()``.
89+ We use that to verify delegation"""
90+ specialised = ProtocolWrapper("", based_on=base, arguments=(Argument(value=1),))
91+ assert specialised._noEvents() == 0 #Note: the number is less relevant, goal is to check _noEvents is send to base
8792
8893 def assert_GP_name(base, sub):
8994 assert "Wrapper" in sub.based_on.name