test: Add Solidity test case and fixture to TestRepoMapAllLanguages

This commit is contained in:
Paul Gauthier (aider) 2025-03-12 15:21:45 -07:00
parent a776d70e0d
commit 315f8093c6
2 changed files with 22 additions and 0 deletions

View file

@ -315,6 +315,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
"properties": ("properties", "database.url"), "properties": ("properties", "database.url"),
"r": ("r", "calculate"), "r": ("r", "calculate"),
"racket": ("rkt", "greet"), "racket": ("rkt", "greet"),
"solidity": ("sol", "SimpleStorage"),
} }
fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages" fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages"

View file

@ -0,0 +1,21 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract SimpleStorage {
uint256 private value;
event ValueChanged(uint256 newValue);
constructor(uint256 initialValue) {
value = initialValue;
}
function setValue(uint256 newValue) public {
value = newValue;
emit ValueChanged(newValue);
}
function getValue() public view returns (uint256) {
return value;
}
}