可用的回归测试通过的标准版本
This commit is contained in:
@@ -14,4 +14,4 @@ import zc.test as test
|
||||
import zc.logic_test as logic
|
||||
import zc.class_test as class_test
|
||||
|
||||
def main() -> stdint.INT | t.State: pass
|
||||
def main() -> stdint.INT: pass
|
||||
|
||||
@@ -6,21 +6,21 @@ Module: stdio
|
||||
|
||||
import t, c
|
||||
|
||||
def printf(fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport | t.State: pass
|
||||
def printf(fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def fprintf(stream: t.CVoid | t.CPtr, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport | t.State: pass
|
||||
def fprintf(stream: t.CVoid | t.CPtr, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def sprintf(buf: t.CChar | t.CPtr, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport | t.State: pass
|
||||
def sprintf(buf: t.CChar | t.CPtr, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def snprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport | t.State: pass
|
||||
def snprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def puts(s: t.CChar | t.CConst | t.CPtr) -> t.CInt | t.CExtern | t.CExport | t.State: pass
|
||||
def puts(s: t.CChar | t.CConst | t.CPtr) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def fputs(s: t.CChar | t.CConst | t.CPtr, stream: t.CVoid | t.CPtr) -> t.CInt | t.CExtern | t.CExport | t.State: pass
|
||||
def fputs(s: t.CChar | t.CConst | t.CPtr, stream: t.CVoid | t.CPtr) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def fgets(buf: t.CChar | t.CPtr, size: t.CInt, stream: t.CVoid | t.CPtr) -> t.CChar | t.CPtr | t.CExtern | t.CExport | t.State: pass
|
||||
def fgets(buf: t.CChar | t.CPtr, size: t.CInt, stream: t.CVoid | t.CPtr) -> t.CChar | t.CPtr | t.CExtern | t.CExport: pass
|
||||
|
||||
def fflush(stream: t.CVoid | t.CPtr) -> t.CInt | t.CExtern | t.CExport | t.State: pass
|
||||
def fflush(stream: t.CVoid | t.CPtr) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
|
||||
stdin: t.CExtern | t.CVoid | t.CPtr
|
||||
|
||||
@@ -7,32 +7,32 @@ Module: zc.test
|
||||
import config
|
||||
import t, c
|
||||
|
||||
def AboutSizeTWhileTest(length: t.CSizeT) -> t.CVoid | t.State: pass
|
||||
def AboutSizeTWhileTest(length: t.CSizeT) -> t.CInt: pass
|
||||
|
||||
def MathBasicTest(x: t.CInt, y: t.CInt) -> t.CInt | t.State: pass
|
||||
def MathBasicTest(x: t.CInt, y: t.CInt) -> t.CInt: pass
|
||||
|
||||
def MathAdvancedTest(value: t.CInt) -> t.CInt | t.State: pass
|
||||
def MathAdvancedTest(value: t.CInt) -> t.CInt: pass
|
||||
|
||||
def WhileWithElifElseTest(start: t.CInt, end: t.CInt) -> t.CVoid | t.State: pass
|
||||
def WhileWithElifElseTest(start: t.CInt, end: t.CInt) -> t.CInt: pass
|
||||
|
||||
def NestedWhileWithMacrosTest(outer_limit: t.CInt, inner_limit: t.CInt) -> t.CVoid | t.State: pass
|
||||
def NestedWhileWithMacrosTest(outer_limit: t.CInt, inner_limit: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ComplexConditionTest(a: t.CInt, b: t.CInt, c_val: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ComplexConditionTest(a: t.CInt, b: t.CInt, c_val: t.CInt) -> t.CInt: pass
|
||||
|
||||
def RetryLoopTest(retry_count: t.CInt) -> t.CInt | t.State: pass
|
||||
def RetryLoopTest(retry_count: t.CInt) -> t.CInt: pass
|
||||
|
||||
def BitwiseOperationsTest(value: t.CInt) -> t.CInt | t.State: pass
|
||||
def BitwiseOperationsTest(value: t.CInt) -> t.CInt: pass
|
||||
|
||||
def CompoundAssignmentMathTest(a: t.CInt, b: t.CInt) -> t.CInt | t.State: pass
|
||||
def CompoundAssignmentMathTest(a: t.CInt, b: t.CInt) -> t.CInt: pass
|
||||
|
||||
def PowerAndModuloTest(base: t.CInt, exponent: t.CInt) -> t.CInt | t.State: pass
|
||||
def PowerAndModuloTest(base: t.CInt, exponent: t.CInt) -> t.CInt: pass
|
||||
|
||||
def MixedArithmeticTest(x: t.CInt, y: t.CInt, z: t.CInt) -> t.CInt | t.State: pass
|
||||
def MixedArithmeticTest(x: t.CInt, y: t.CInt, z: t.CInt) -> t.CInt: pass
|
||||
|
||||
def MathWithWhileLoopTest(start: t.CInt, count: t.CInt) -> t.CInt | t.State: pass
|
||||
def MathWithWhileLoopTest(start: t.CInt, count: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ComplexNestedMathTest(a: t.CInt, b: t.CInt) -> t.CInt | t.State: pass
|
||||
def ComplexNestedMathTest(a: t.CInt, b: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ConditionalMathChainTest(value: t.CInt) -> t.CInt | t.State: pass
|
||||
def ConditionalMathChainTest(value: t.CInt) -> t.CInt: pass
|
||||
|
||||
def BitManipulationMathTest(value: t.CInt) -> t.CInt | t.State: pass
|
||||
def BitManipulationMathTest(value: t.CInt) -> t.CInt: pass
|
||||
|
||||
Binary file not shown.
@@ -19,48 +19,48 @@ class Student(t.Object):
|
||||
name: t.CChar | t.CPtr
|
||||
age: t.CInt
|
||||
score: t.CInt
|
||||
def __init__(self: Student, n: t.CChar | t.CPtr, a: t.CInt, s: t.CInt) -> t.CVoid | t.State: pass
|
||||
def get_age(self: Student) -> t.CInt | t.State: pass
|
||||
def get_score(self: Student) -> t.CInt | t.State: pass
|
||||
def __init__(self: Student, n: t.CChar | t.CPtr, a: t.CInt, s: t.CInt) -> t.CInt: pass
|
||||
def get_age(self: Student) -> t.CInt: pass
|
||||
def get_score(self: Student) -> t.CInt: pass
|
||||
class Counter(t.Object):
|
||||
value: t.CInt
|
||||
def __init__(self: Counter, initial: t.CInt) -> t.CVoid | t.State: pass
|
||||
def increment(self: Counter) -> t.CVoid | t.State: pass
|
||||
def get_value(self: Counter) -> t.CInt | t.State: pass
|
||||
def __init__(self: Counter, initial: t.CInt) -> t.CInt: pass
|
||||
def increment(self: Counter) -> t.CInt: pass
|
||||
def get_value(self: Counter) -> t.CInt: pass
|
||||
class StackObj(t.Object):
|
||||
data: t.CInt
|
||||
next_ptr: t.CVoid | t.CPtr
|
||||
|
||||
def TestBasicDataClass() -> t.CVoid | t.State: pass
|
||||
def TestBasicDataClass() -> t.CInt: pass
|
||||
|
||||
def TestPoint3DClass() -> t.CVoid | t.State: pass
|
||||
def TestPoint3DClass() -> t.CInt: pass
|
||||
|
||||
def TestStudentClass() -> t.CVoid | t.State: pass
|
||||
def TestStudentClass() -> t.CInt: pass
|
||||
|
||||
def TestCounterClass() -> t.CVoid | t.State: pass
|
||||
def TestCounterClass() -> t.CInt: pass
|
||||
|
||||
def TestStackAllocation() -> t.CVoid | t.State: pass
|
||||
def TestStackAllocation() -> t.CInt: pass
|
||||
|
||||
def TestHeapAllocation() -> t.CVoid | t.State: pass
|
||||
def TestHeapAllocation() -> t.CInt: pass
|
||||
|
||||
def TestHeapObjectWithInit() -> t.CVoid | t.State: pass
|
||||
def TestHeapObjectWithInit() -> t.CInt: pass
|
||||
|
||||
def TestMultipleStackObjects() -> t.CVoid | t.State: pass
|
||||
def TestMultipleStackObjects() -> t.CInt: pass
|
||||
|
||||
def TestImplicitInitCall() -> t.CVoid | t.State: pass
|
||||
def TestImplicitInitCall() -> t.CInt: pass
|
||||
|
||||
def TestClassWithBitFields() -> t.CVoid | t.State: pass
|
||||
def TestClassWithBitFields() -> t.CInt: pass
|
||||
|
||||
def TestIntArray() -> t.CVoid | t.State: pass
|
||||
def TestIntArray() -> t.CInt: pass
|
||||
|
||||
def TestFloatArray() -> t.CVoid | t.State: pass
|
||||
def TestFloatArray() -> t.CInt: pass
|
||||
|
||||
def TestCharArray() -> t.CVoid | t.State: pass
|
||||
def TestCharArray() -> t.CInt: pass
|
||||
|
||||
def TestNestedArray() -> t.CVoid | t.State: pass
|
||||
def TestNestedArray() -> t.CInt: pass
|
||||
|
||||
def TestArrayWithStruct() -> t.CVoid | t.State: pass
|
||||
def TestArrayWithStruct() -> t.CInt: pass
|
||||
|
||||
def TestArrayPointer() -> t.CVoid | t.State: pass
|
||||
def TestArrayPointer() -> t.CInt: pass
|
||||
|
||||
def TestDynamicString() -> t.CVoid | t.State: pass
|
||||
def TestDynamicString() -> t.CInt: pass
|
||||
|
||||
@@ -7,48 +7,48 @@ Module: zc.logic_test
|
||||
import config
|
||||
import t, c
|
||||
|
||||
def ForRangeBasicTest(stop: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForRangeBasicTest(stop: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForRangeWithStartStop(start: t.CInt, stop: t.CInt, step: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForRangeWithStartStop(start: t.CInt, stop: t.CInt, step: t.CInt) -> t.CInt: pass
|
||||
|
||||
def NestedForRangeTest(rows: t.CInt, cols: t.CInt) -> t.CVoid | t.State: pass
|
||||
def NestedForRangeTest(rows: t.CInt, cols: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForWithIfBreakTest(data_size: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForWithIfBreakTest(data_size: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForWithIfContinueTest(n: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForWithIfContinueTest(n: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForWithElifBranchTest(value: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForWithElifBranchTest(value: t.CInt) -> t.CInt: pass
|
||||
|
||||
def WhileWithIfElifElseTest(iterations: t.CInt) -> t.CVoid | t.State: pass
|
||||
def WhileWithIfElifElseTest(iterations: t.CInt) -> t.CInt: pass
|
||||
|
||||
def WhileWithNestedIfTest(limit: t.CInt) -> t.CVoid | t.State: pass
|
||||
def WhileWithNestedIfTest(limit: t.CInt) -> t.CInt: pass
|
||||
|
||||
def WhileWithMatchCaseTest(value: t.CInt) -> t.CVoid | t.State: pass
|
||||
def WhileWithMatchCaseTest(value: t.CInt) -> t.CInt: pass
|
||||
|
||||
def WhileWithMatchCaseNoBreakTest(value: t.CInt) -> t.CVoid | t.State: pass
|
||||
def WhileWithMatchCaseNoBreakTest(value: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ComplexForWhileMatchTest(outer_limit: t.CInt, inner_limit: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ComplexForWhileMatchTest(outer_limit: t.CInt, inner_limit: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForWithCaseAndNoBreakTest(n: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForWithCaseAndNoBreakTest(n: t.CInt) -> t.CInt: pass
|
||||
|
||||
def WhileWithBreakConditionTest(limit: t.CInt) -> t.CVoid | t.State: pass
|
||||
def WhileWithBreakConditionTest(limit: t.CInt) -> t.CInt: pass
|
||||
|
||||
def NestedWhileWithMultipleBreakPoints(depth: t.CInt, width: t.CInt) -> t.CVoid | t.State: pass
|
||||
def NestedWhileWithMultipleBreakPoints(depth: t.CInt, width: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForWithMatchCaseInLoopTest(iterations: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForWithMatchCaseInLoopTest(iterations: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ComplexLogicWithElifChains(a: t.CInt, b: t.CInt, c_val: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ComplexLogicWithElifChains(a: t.CInt, b: t.CInt, c_val: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForRangeWithStepAndCondition(n: t.CInt, step: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForRangeWithStepAndCondition(n: t.CInt, step: t.CInt) -> t.CInt: pass
|
||||
|
||||
def MatchCaseWithGuardConditions(value: t.CInt) -> t.CVoid | t.State: pass
|
||||
def MatchCaseWithGuardConditions(value: t.CInt) -> t.CInt: pass
|
||||
|
||||
def WhileWithMultipleMatchCases(iterations: t.CInt) -> t.CVoid | t.State: pass
|
||||
def WhileWithMultipleMatchCases(iterations: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForWhileMixWithBreakAndContinue(n: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForWhileMixWithBreakAndContinue(n: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ComplexCaseMatchingWithRanges(start: t.CInt, end: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ComplexCaseMatchingWithRanges(start: t.CInt, end: t.CInt) -> t.CInt: pass
|
||||
|
||||
def WhileWithElifInElifChain(limit: t.CInt) -> t.CVoid | t.State: pass
|
||||
def WhileWithElifInElifChain(limit: t.CInt) -> t.CInt: pass
|
||||
|
||||
def ForWithCaseNoBreakNested(inner_limit: t.CInt) -> t.CVoid | t.State: pass
|
||||
def ForWithCaseNoBreakNested(inner_limit: t.CInt) -> t.CInt: pass
|
||||
|
||||
Reference in New Issue
Block a user