feat: Add Dart language support to TestRepoMapAllLanguages

This commit is contained in:
Paul Gauthier (aider) 2025-03-12 15:06:27 -07:00
parent 9451f0abe4
commit 24d2b683c8
2 changed files with 22 additions and 0 deletions

View file

@ -288,6 +288,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
"c": ("c", "main"),
"cpp": ("cpp", "main"),
"d": ("d", "main"),
"dart": ("dart", "Person"),
"elixir": ("ex", "Greeter"),
"java": ("java", "Greeting"),
"javascript": ("js", "Person"),

21
tests/fixtures/languages/dart/test.dart vendored Normal file
View file

@ -0,0 +1,21 @@
// A simple Dart class for testing ctags detection
class Person {
String name;
int age;
Person(this.name, this.age);
void greet() {
print('Hello, my name is $name and I am $age years old.');
}
bool isAdult() {
return age >= 18;
}
}
void main() {
var person = Person('John', 30);
person.greet();
print('Is adult: ${person.isAdult()}');
}