• R/O
  • SSH

Commit

Tags
No Tags

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

Revisión655b2a8b6a00156540ebd742df1efeedb463dd95 (tree)
Tiempo2023-10-03 03:48:31
AutorAlbert Mietus < albert AT mietus DOT nl >
CommiterAlbert Mietus < albert AT mietus DOT nl >

Log Message

ASIS/BUSY: Protocol-with-parms: SlowStart & StartSieve reference(s) added (TDD:Oke)

Cambiar Resumen

Diferencia incremental

diff -r 7e2dbbfb3f5a -r 655b2a8b6a00 Makefile
--- a/Makefile Fri Sep 29 12:09:40 2023 +0200
+++ b/Makefile Mon Oct 02 20:48:31 2023 +0200
@@ -29,7 +29,7 @@
2929 include Mk/testing.mk
3030 include Mk/helpful.mk
3131
32-diff_TestDoubles:
32+diff_TestDoubles:
3333 diff -w -rs TestDoubles/reference/ TestDoubles/_generated/
3434
3535 missing: missing_visitor missing_serialization
diff -r 7e2dbbfb3f5a -r 655b2a8b6a00 TestDoubles/AIGR/protocols/Sieve.py
--- a/TestDoubles/AIGR/protocols/Sieve.py Fri Sep 29 12:09:40 2023 +0200
+++ b/TestDoubles/AIGR/protocols/Sieve.py Mon Oct 02 20:48:31 2023 +0200
@@ -15,7 +15,6 @@
1515 typedParameters=(TypedParameter(name='queue_max', type=int),),
1616 events=[
1717 Event(name='setMax', return_type=None, typedParameters=(TypedParameter(name='queue_max', type=int),))],
18- #parameters
1918 )
2019
2120
diff -r 7e2dbbfb3f5a -r 655b2a8b6a00 TestDoubles/reference/protocols/SlowStart.rpy
--- a/TestDoubles/reference/protocols/SlowStart.rpy Fri Sep 29 12:09:40 2023 +0200
+++ b/TestDoubles/reference/protocols/SlowStart.rpy Mon Oct 02 20:48:31 2023 +0200
@@ -3,7 +3,6 @@
33 # (C) Albert Mietus, 2023. Part of Castle/CCastle project
44
55 ####
6-
76 from CC import buildin
87 from CC import base
98
@@ -18,14 +17,15 @@
1817 CC_P_SlowStart_setMax = 0
1918
2019
21-
20+cc_P_SlowStart = buildin.CC_B_Protocol(name="SlowStart",
21+ parameters=(
22+ ('queue_max', int),
23+ ),
24+ kind=buildin.ProtocolKind.Event,
25+ inherit_from=cc_P_Protocol,
26+ events=[])
2227
23-cc_P_SlowStart = buildin.CC_B_Protocol(name = "SlowStart",
24- parameters = [('queue_max', int)],
25- kind = buildin.ProtocolKind.Event,
26- inherit_from=cc_P_Protocol
27- events = [])
28-cc_P_SlowStart.events.append( buildin.CC_B_P_EventID(name="setMax",
29- seqNo=CC_P_SlowStart_setMax
30- parameters = [('queue_max', int)],
31- part_of=cc_P_SlowStart))
28+cc_P_SlowStart.events.append(buildin.CC_B_P_EventID(name="setMax",
29+ seqNo=CC_P_SlowStart_setMax,
30+ part_of=cc_P_SlowStart))
31+
diff -r 7e2dbbfb3f5a -r 655b2a8b6a00 TestDoubles/reference/protocols/StartSieve.rpy
--- a/TestDoubles/reference/protocols/StartSieve.rpy Fri Sep 29 12:09:40 2023 +0200
+++ b/TestDoubles/reference/protocols/StartSieve.rpy Mon Oct 02 20:48:31 2023 +0200
@@ -19,15 +19,14 @@
1919
2020
2121 cc_P_StartSieve = buildin.CC_B_Protocol(name="StartSieve",
22- kind=buildin.ProtocolKind.Event,
23- inherit_from=cc_P_Protocol
24- events = [])
22+ kind=buildin.ProtocolKind.Event,
23+ inherit_from=cc_P_Protocol,
24+ events=[])
25+
2526 cc_P_StartSieve.events.append(buildin.CC_B_P_EventID(name="runTo",
26- seqNo=CC_P_StartSieve_runTo,
27- part_of=cc_P_StartSieve ))
27+ seqNo=CC_P_StartSieve_runTo,
28+ part_of=cc_P_StartSieve))
2829 cc_P_StartSieve.events.append(buildin.CC_B_P_EventID(name="newMax",
29- seqNo=CC_P_StartSieve_newMax,
30- part_of=cc_P_StartSieve ))
30+ seqNo=CC_P_StartSieve_newMax,
31+ part_of=cc_P_StartSieve))
3132
32-
33-
diff -r 7e2dbbfb3f5a -r 655b2a8b6a00 castle/writers/RPy/templates/ProtocolDataStructures.jinja2
--- a/castle/writers/RPy/templates/ProtocolDataStructures.jinja2 Fri Sep 29 12:09:40 2023 +0200
+++ b/castle/writers/RPy/templates/ProtocolDataStructures.jinja2 Mon Oct 02 20:48:31 2023 +0200
@@ -18,21 +18,19 @@
1818 {% if proto.typedParameters %}
1919 parameters=(
2020 {% for parm in proto.typedParameters %}
21- ('{{ parm.name}}' , {{ Str_or_Type(parm.type) }}),
21+ ('{{ parm.name}}', {{ Str_or_Type(parm.type) }}),
2222 {% endfor %}
23- ), ### XXX ToDo: parms: tuple, namedType, strings, ... (see event -- use macro?)
23+ ), {#- XXX ToDo: parms: tuple, namedType, strings, ... (see event -- use macro?) #}
24+
2425 {% endif %}
25- kind=buildin.{{proto.kind}},
26- inherit_from={{m.ProtocolName(proto.based_on.name)}}
27- events = []) {#- filled in below -- see design notes // limitation #}
26+ kind=buildin.{{proto.kind}},
27+ inherit_from={{m.ProtocolName(proto.based_on.name)}},
28+ events=[])
2829
2930 {% for e in proto.events %}
3031 {{- m.ProtocolName(proto.name) }}.events.append(buildin.CC_B_P_EventID(name="{{- e.name -}}",
31- seqNo={{- m.EventIndexName(proto.name, e.name) }},
32- part_of={{ m.ProtocolName(proto.name) }} ))
32+ seqNo={{- m.EventIndexName(proto.name, e.name) }},
33+ part_of={{ m.ProtocolName(proto.name) }}))
3334 {% endfor %} {#- event #}
3435
35-{% endfor %} {# protocols #}
36-
37-
38-
36+{% endfor %} {#- protocols #}
diff -r 7e2dbbfb3f5a -r 655b2a8b6a00 pytst/writers/RPy/test_99_SieveMoats.py
--- a/pytst/writers/RPy/test_99_SieveMoats.py Fri Sep 29 12:09:40 2023 +0200
+++ b/pytst/writers/RPy/test_99_SieveMoats.py Mon Oct 02 20:48:31 2023 +0200
@@ -24,7 +24,7 @@
2424 assert filecmp.cmp(gen_file, ref_file), f"The generated file ({gen_file}) and the reference ({ref_file}) are not the same"
2525
2626
27-@pytest.mark.skip("Need to test AIGR.protocols:: parameters first (and writer for it to)")
27+#@pytest.mark.skip("Need to test AIGR.protocols:: parameters first (and writer for it to)")
2828 def test_03_SlowStart(T_Protocol):
2929 ref_file = 'TestDoubles/reference/protocols/SlowStart.rpy'
3030 gen_file = 'Testdoubles/_generated/protocols/SlowStart.rpy'