From 368343fdf2f505dad7bea017be7a07cf65df8c61 Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Mon, 12 Feb 2024 09:32:14 -0500 Subject: [PATCH 1/9] Update lint_vba.yml --- .github/workflows/lint_vba.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index 664c405..0c182af 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -12,5 +12,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Build Grammar + run: | + wget https://raw.githubusercontent.com/Beakerboy/grammars-v4/coverage/vba/vba_cc/vba_cc.g4 + antlr4 -Dlanguage=Python3 -o deliverables -listener -visitor vba_cc.g4 + stubgen ./deliverables -o ./deliverables + mv deliverables/*.py src/vba_precompiler/grammar + mv deliverables/*.pyi src/vba_precompiler/grammar + - name: Precompile + run: | + python -m pip install --upgrade pip + pip install 'vba_precompiler @ git+https://github.com/Beakerboy/VBA-Precompiler@dev' + python -m vba_precompiler ./src + rm -rf ./src - name: Lint uses: Vba-actions/lint-vba@main From b394933dab81a572956bb78b20f8fc6bb25e04c2 Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Mon, 12 Feb 2024 09:33:53 -0500 Subject: [PATCH 2/9] Update lint_vba.yml --- .github/workflows/lint_vba.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index 0c182af..eaeba61 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -14,6 +14,7 @@ jobs: - uses: actions/checkout@v3 - name: Build Grammar run: | + python -m pip install antlr4-python3-runtime wget https://raw.githubusercontent.com/Beakerboy/grammars-v4/coverage/vba/vba_cc/vba_cc.g4 antlr4 -Dlanguage=Python3 -o deliverables -listener -visitor vba_cc.g4 stubgen ./deliverables -o ./deliverables From b14b208db3b45cda3e6b22917858bef683400838 Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Mon, 12 Feb 2024 09:35:53 -0500 Subject: [PATCH 3/9] Update lint_vba.yml --- .github/workflows/lint_vba.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index eaeba61..4217d64 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -15,6 +15,7 @@ jobs: - name: Build Grammar run: | python -m pip install antlr4-python3-runtime + python -m pip install antlr4-tools wget https://raw.githubusercontent.com/Beakerboy/grammars-v4/coverage/vba/vba_cc/vba_cc.g4 antlr4 -Dlanguage=Python3 -o deliverables -listener -visitor vba_cc.g4 stubgen ./deliverables -o ./deliverables From 2176252e8886806ab667c7198f28bf74e81947e5 Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Mon, 12 Feb 2024 09:37:15 -0500 Subject: [PATCH 4/9] Update lint_vba.yml --- .github/workflows/lint_vba.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index 4217d64..fb64507 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -18,7 +18,6 @@ jobs: python -m pip install antlr4-tools wget https://raw.githubusercontent.com/Beakerboy/grammars-v4/coverage/vba/vba_cc/vba_cc.g4 antlr4 -Dlanguage=Python3 -o deliverables -listener -visitor vba_cc.g4 - stubgen ./deliverables -o ./deliverables mv deliverables/*.py src/vba_precompiler/grammar mv deliverables/*.pyi src/vba_precompiler/grammar - name: Precompile From 0e9b7d9a209ee07d4565ce180897578364b32d10 Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Mon, 12 Feb 2024 11:26:59 -0500 Subject: [PATCH 5/9] Update lint_vba.yml --- .github/workflows/lint_vba.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index fb64507..aea0faa 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -12,14 +12,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Build Grammar - run: | - python -m pip install antlr4-python3-runtime - python -m pip install antlr4-tools - wget https://raw.githubusercontent.com/Beakerboy/grammars-v4/coverage/vba/vba_cc/vba_cc.g4 - antlr4 -Dlanguage=Python3 -o deliverables -listener -visitor vba_cc.g4 - mv deliverables/*.py src/vba_precompiler/grammar - mv deliverables/*.pyi src/vba_precompiler/grammar - name: Precompile run: | python -m pip install --upgrade pip From 58853c5a2115791c200d9dcf4fb40cf4c276119c Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Tue, 13 Feb 2024 11:37:35 -0500 Subject: [PATCH 6/9] Update lint_vba.yml --- .github/workflows/lint_vba.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index aea0faa..62310c8 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -19,4 +19,4 @@ jobs: python -m vba_precompiler ./src rm -rf ./src - name: Lint - uses: Vba-actions/lint-vba@main + uses: Vba-actions/lint-vba@dev From 783452c00fd65fee1330044526df003817f9c4ab Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Tue, 13 Feb 2024 12:22:05 -0500 Subject: [PATCH 7/9] Update lint_vba.yml --- .github/workflows/lint_vba.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index 62310c8..c37fa23 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -18,5 +18,6 @@ jobs: pip install 'vba_precompiler @ git+https://github.com/Beakerboy/VBA-Precompiler@dev' python -m vba_precompiler ./src rm -rf ./src + cat ./build/Modules/ObjectIntrospection.bas - name: Lint uses: Vba-actions/lint-vba@dev From 78b5962ce926bdbe3d0d189ddde3b6fa7837c5d2 Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Tue, 13 Feb 2024 14:21:19 -0500 Subject: [PATCH 8/9] Update lint_vba.yml --- .github/workflows/lint_vba.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index c37fa23..62310c8 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -18,6 +18,5 @@ jobs: pip install 'vba_precompiler @ git+https://github.com/Beakerboy/VBA-Precompiler@dev' python -m vba_precompiler ./src rm -rf ./src - cat ./build/Modules/ObjectIntrospection.bas - name: Lint uses: Vba-actions/lint-vba@dev From be5eeec81319d6a5bf5c400c5708575b01d35fa1 Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Sat, 17 May 2025 08:47:04 -0400 Subject: [PATCH 9/9] Reformatted example and fixed a naming error (#24) * Fixed misnamed initialization * changed function call to sub call * added file headers --- .github/workflows/lint_vba.yml | 2 +- examples/ClassModules/TestCaseStub.cls | 4 ++-- examples/Modules/ProjectUnitTests.bas | 1 + testing/ClassModules/PostLogTests.cls | 2 +- testing/Modules/VBAUnitTesterUnitTests.bas | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint_vba.yml b/.github/workflows/lint_vba.yml index 62310c8..f8ed1c7 100644 --- a/.github/workflows/lint_vba.yml +++ b/.github/workflows/lint_vba.yml @@ -15,7 +15,7 @@ jobs: - name: Precompile run: | python -m pip install --upgrade pip - pip install 'vba_precompiler @ git+https://github.com/Beakerboy/VBA-Precompiler@dev' + pip install 'vba_precompiler @ git+https://github.com/Beakerboy/VBA-Precompiler' python -m vba_precompiler ./src rm -rf ./src - name: Lint diff --git a/examples/ClassModules/TestCaseStub.cls b/examples/ClassModules/TestCaseStub.cls index 01a7e39..40011b0 100644 --- a/examples/ClassModules/TestCaseStub.cls +++ b/examples/ClassModules/TestCaseStub.cls @@ -45,6 +45,6 @@ End Sub ' Sub: MyFirstTest ' All test subs should end with "Test" and include at least one assertion. Sub MyFirstTest() - AssertTrue(2 = 1 + 1, "AssertTrue that one plus one equals two") - AssertEquals(1 + 1, 2, "AssertEquals that one plus one equals two") + AssertTrue 2 = 1 + 1, "AssertTrue that one plus one equals two" + AssertEquals 1 + 1, 2, "AssertEquals that one plus one equals two" End Sub diff --git a/examples/Modules/ProjectUnitTests.bas b/examples/Modules/ProjectUnitTests.bas index b802b91..8daac2d 100644 --- a/examples/Modules/ProjectUnitTests.bas +++ b/examples/Modules/ProjectUnitTests.bas @@ -1,3 +1,4 @@ +Attribute VB_Name = "ProjectUnitTests" Public Function RunTests() Dim TestConfig As iTestableProject diff --git a/testing/ClassModules/PostLogTests.cls b/testing/ClassModules/PostLogTests.cls index 7d0d0fa..ab85bb8 100644 --- a/testing/ClassModules/PostLogTests.cls +++ b/testing/ClassModules/PostLogTests.cls @@ -34,7 +34,7 @@ End Function ' Function: iTestCase_GetObject ' Returns this object Function iTestCase_GetObject() - Set iTestCase_GetObject = New PostLogChecks + Set iTestCase_GetObject = New PostLogTests End Function ' Function: ErrorLoggedTest diff --git a/testing/Modules/VBAUnitTesterUnitTests.bas b/testing/Modules/VBAUnitTesterUnitTests.bas index b8b7cc6..c5ae63d 100644 --- a/testing/Modules/VBAUnitTesterUnitTests.bas +++ b/testing/Modules/VBAUnitTesterUnitTests.bas @@ -1,3 +1,4 @@ +Attribute VB_Name = "VBAUnitTesterUnitTests" Public Function RunTests() Dim TestConfig As iTestableProject