From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2JGvBJnSQGYBbgAAqHPOHw:P1 (envelope-from ) for ; Sun, 12 May 2024 16:30:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2JGvBJnSQGYBbgAAqHPOHw (envelope-from ) for ; Sun, 12 May 2024 16:30:49 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=VtFizXgI; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b=w192MFT3; dmarc=pass (policy=none) header.from=maniero.me; arc=pass ("mailchannels.net:s=arc-2022:i=1"); spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht ARC-Seal: i=2; s=key1; d=johnnyrichard.com; t=1715524249; a=rsa-sha256; cv=pass; b=P7Cg/SipuOBdPlU8QVaOH8kI714AHiMlVKFdMPOzKVud7NhvdTO4pGcIoUqE3F5ZazN4mB DV32bEP+MNhVte0m+kRF8tN2PZX7HwNff0gR/Qp1gAghT+02ApDUaeCorJKmR+KQNul5Da V6UWzapAHqxjYrvI3S97sv7WZJ6o/8xSt0VjROGQ4VKWssLweZ5wrX/e6BVO/uYyK4pJr8 psYNaZuTipgKoOPKq95I/I97g+nYnVDkm3OjSNsTNyhdu8Px08uCgGZ8NVUsl+oFybiWP2 DrqNGtAA6aq+CFyGLd9NlYkg/7UbZ+JtIlqPTqpMV+CB6Aa43A+cP5i2NXXQpw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=VtFizXgI; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b=w192MFT3; dmarc=pass (policy=none) header.from=maniero.me; arc=pass ("mailchannels.net:s=arc-2022:i=1"); spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1715524249; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=/VZqK5y+Y+wO7Nq20qzNGe9CqHKBJyv96InbrNKhnnU=; b=ZyZKJWNUpNLOwaVMgybN2eUsAS0vNe/vlBXdKl8Ff1m2upTgACUEXhIraEGR6GWvYKW7b7 CR/a57F9p/Fd2NOwE95ZXHv8tqI0/YIJBQEo78VzAStSRDpOEyyPWwVxIzcO47DrNMOAWM AYj76ku6uTw1OKSZ05ua9zg9NTaYwzygU23XAaBXs7ebSf8X8EvXg9cY7iRuNHWUJBkxRe UttO9zJkecoAIQApfZFtrwpugKS7AMH7yfMFnsmXur4LIdjy77Ti8ldtySz0vNnBlHNy49 4syAOa2pe4Uv1ZJdddUdrZpQFD4Xs8WuQPiIYa4B/eypU6VeqgXnYRaiH6Q+vA== Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B7F0727245 for ; Sun, 12 May 2024 16:30:45 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=5v2QuhHG1N2Sot6cmBiUiDx2xFfk7+8BKwMg0POCyUI=; c=simple/simple; d=lists.sr.ht; h=From:To:Cc:Subject:Date:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1715524245; v=1; b=VtFizXgI8FCgWs46BQiNGQX2TnaMVf2Vpn4SeY22Dkfhlnf5gC506TtAiKcTiuZQEWQrOgKy 26+F3tGo6j00pzDtXCV27s1dwZKp1XwBChq1hFGjtRnLPaxvCVSsip/oqs+iiDIboe4BHIhSW6A HozLaC6WaEGNBTH69+enuSio4RQpeWr9g1bMg3u9WrmutvLJPqsX+5y6mKZPvqUyvxZZZquARvO Gvo9qBrX4HOuxeq+4Y8aZCzhVltc8eilqz6JSj9vf7mTpDe1cgJLzMRSuMG6CItw6hg/0I3MraY As6X4m3dmRxvDgxdjrhrEfKLlnEGwJityoxKjQ60uIKYQ== Received: from lists.sr.ht (unknown [IPv6:2a03:6000:1813:1337::154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 01FBB20130 for ; Sun, 12 May 2024 14:30:45 +0000 (UTC) Received: from crab.ash.relay.mailchannels.net (crab.ash.relay.mailchannels.net [23.83.222.42]) by mail-a.sr.ht (Postfix) with ESMTPS id 0405020119 for <~johnnyrichard/olang-devel@lists.sr.ht>; Sun, 12 May 2024 14:30:43 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 778ED94143D for <~johnnyrichard/olang-devel@lists.sr.ht>; Sun, 12 May 2024 14:30:42 +0000 (UTC) Received: from nl-srv-smtpout1.hostinger.io (unknown [127.0.0.6]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 750429414CA for <~johnnyrichard/olang-devel@lists.sr.ht>; Sun, 12 May 2024 14:30:40 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1715524240; a=rsa-sha256; cv=none; b=GHHA+4S73kq1TlukvjBlZbpskvLKZBLcbgwBKeBVap6jx0R4S7ujM1zRQc8rLP9ACvSYe1 wVBH9SaMl6+3DSBlGi5LD2uUaJosEoHEzl5CVqPOpM2jNaeVl2vd3XUpFIRHnT9wCwGdfo 8HgSvA/Bp+tcFqV3LHywDZUPtWVDImz+GZcuNxbJUY0+BDitzIU6XMWJsuUa2LanBEZbIm sJm1sQK+LKL2fvkL4aLaR8r4nuFFdqpu170NwiuzMLEjG2uyxTwqGuvToYMYYw679Whw6Y WXrAN80fHLtQp/W+hrAgrzm6C6GvfaNtOLdQ9qy5LZUdILxVJfv2kuYqLm0wSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1715524240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=/VZqK5y+Y+wO7Nq20qzNGe9CqHKBJyv96InbrNKhnnU=; b=slj6vDH7cSPUYarUlr2e6QYAaGaCo9nKOFxMWzR9jDaA0vqrbm2Fj7wAFXizJcTaVmIqtl zAcztUR1QOCdg5++MzUPy2v1RgRuN9rpLUtjL4NeMr1VVNVRrNQhchZr8XemBRMYRsF+PK QJ+oQP9E33onKkn2ohjvjP8I1xH4kWW3Ewv58+MZdh6tP882jw4p2GNTYhIg0aSB77WZf9 z/e4t+MiW0pl0cXQca4Pqcnnhm3e0zfYM04pJcOTipPIG3zpVsP55NCvbO2EeXEBoVFsf/ kNvceLo66+WzWUsv2jcLaI1JGXcv8XckMwmUhX0iiFbh/ebWl4SGn0Bxwys6Vw== ARC-Authentication-Results: i=1; rspamd-5d55749bb4-tvg5b; auth=pass smtp.auth=hostingeremail smtp.mailfrom=carlos@maniero.me X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|carlos@maniero.me X-MailChannels-Auth-Id: hostingeremail X-Suffer-Thoughtful: 22b077fe13727f7c_1715524240963_923341494 X-MC-Loop-Signature: 1715524240963:4155156886 X-MC-Ingress-Time: 1715524240963 Received: from nl-srv-smtpout1.hostinger.io (nl-srv-smtpout1.hostinger.io [145.14.150.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.107.104.18 (trex/6.9.2); Sun, 12 May 2024 14:30:40 +0000 From: Carlos Maniero DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maniero.me; s=hostingermail1; t=1715524239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/VZqK5y+Y+wO7Nq20qzNGe9CqHKBJyv96InbrNKhnnU=; b=w192MFT3sAV16CdyEgBTkXTQw4NdzhHV6oSK07mGgoMlSBp41Qjb7hiPI/epu4baRIACWF GezPycFZyFNLo9611DyTfh+N0jVLiQQXjpRA6LAhROT8Kof/k9wdhnj3LFst+RpesqCIjl LJIyT2bDRzjLtdGOxAL5GJHjfwkj7b079N9sXnmvYmbLsHprPxuG0IN1kgiFvB/rB+PlqA 7q3S8cwnqn01tO7BJvZVtaNebDbGsN6eGdyOU0jX/n7LjQSc6XJNF+A6AKq0AKY1mDHbRO a3iKTuc8wKp/xXd22zJB+jws6EPBr2aWlb4DYVbIXJ0o4bo8xLn5cFQcYEhzSw== To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Carlos Maniero Subject: [PATCH olang 0/4] comment based integration tests Date: Sun, 12 May 2024 11:30:29 -0300 Message-Id: <20240512143033.229961-1-carlos@maniero.me> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-Envelope: MS4xfDWWYihUvHHjUNGe5yC+m2dGhYOG3OAheuVTrjp6mqyq/AlEc3r3G+w9DFzb0TAgo9LnMZMTZMbQaRtdsH8LNfQhHzEavYIUBcJu/z7wzqu0k/GcmNfk pi64MD6H7m/cuqWIUNpEEsUmWTLrYGCTozB7vwSGAHJvePQaOVU9BhWEUmk0zJkYePSHJ0be9qCPsmjU7oeiA8Ga3VAufP266S/WtBPbaKUzmnq2wrqWX5ai X-CM-Analysis: v=2.4 cv=WIUtXWsR c=1 sm=1 tr=0 ts=6640d28f a=WwxFCuf3mf1fs3oSi6/dng==:117 a=WwxFCuf3mf1fs3oSi6/dng==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=tVdHGC1m805ge17psUgA:9 a=BXDaF_L80NY05PYiAFlV:22 X-AuthUser: carlos@maniero.me List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Country: NL X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: B7F0727245 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.58 X-Spam-Score: -9.58 X-TUID: TtfZpilHs4rM The old munit based integration tests was replaced by a new mechanism that makes testing more tasteful and easy to perform. To create an integration tests you just need to create a olang file at *tests/integration/tests* directory. The assertions are performed thought a couple of comments. # spec: some text to describe what are you testing # compiler_exit: the compilers exit code # compiler_output: the compilers output, %empty% for empty output # program_exit: the program exit code # ast: the ast output # tokens: the tokens This patchset also includes parser tests errors and creates a TODO mechanism that can be used to track what need to be implemented. Carlos Maniero (4): tests: add comment based integration tests mechanism tests: remove previous integration tests structure tests: include integration tests for function parser errors tests: print integration tests TODOs Makefile | 1 - tests/integration/Makefile | 33 +-- tests/integration/cli_runner.c | 100 --------- tests/integration/cli_runner.h | 32 --- tests/integration/cli_test.c | 132 ------------ tests/integration/proc_exec.c | 63 ------ tests/integration/proc_exec.h | 37 ---- tests/integration/test.sh | 195 ++++++++++++++++++ tests/integration/tests/0001_main_exit.ol | 27 +++ .../tests/0002_fn_without_fn_keyword.ol | 8 + .../integration/tests/0003_fn_without_type.ol | 8 + .../tests/0004_fn_without_type_colon.ol | 8 + .../0005_fn_without_open_curly_brackets.ol | 8 + .../0006_fn_without_close_curly_brackets.ol | 7 + .../tests/0007_fn_without_return.ol | 8 + 15 files changed, 277 insertions(+), 390 deletions(-) delete mode 100644 tests/integration/cli_runner.c delete mode 100644 tests/integration/cli_runner.h delete mode 100644 tests/integration/cli_test.c delete mode 100644 tests/integration/proc_exec.c delete mode 100644 tests/integration/proc_exec.h create mode 100755 tests/integration/test.sh create mode 100644 tests/integration/tests/0001_main_exit.ol create mode 100644 tests/integration/tests/0002_fn_without_fn_keyword.ol create mode 100644 tests/integration/tests/0003_fn_without_type.ol create mode 100644 tests/integration/tests/0004_fn_without_type_colon.ol create mode 100644 tests/integration/tests/0005_fn_without_open_curly_brackets.ol create mode 100644 tests/integration/tests/0006_fn_without_close_curly_brackets.ol create mode 100644 tests/integration/tests/0007_fn_without_return.ol -- 2.34.1