This directory contains test code examples in various programming languages for testing the Repo Map generator's multi-language support and language filtering functionality.
test-multilang/
├── cpp/ # C++ test files
├── docker-compose.yml # Container orchestration
├── go/ # Go test files
├── html/ # HTML test files
├── java/ # Java test files
├── javascript/ # JavaScript test files
├── kotlin/ # Kotlin test files
├── python/ # Python test files
├── react/ # React component test files
├── typescript/ # TypeScript test files
├── vue/ # Vue component test files
└── README.md # This file
These test files serve multiple purposes:
- Language Support Validation: Verify that the Repo Map generator correctly recognizes and parses different programming languages
- Symbol Extraction Testing: Ensure that classes, functions, interfaces, and other code symbols are properly extracted
- Language Filtering Testing: Test the new language filtering feature that allows analyzing only specific languages
- Output Format Verification: Validate the formatting and display of analysis results
- User.ts - Complete user model file, including:
- Interface definitions (
IUser,UserProfile) - Type aliases (
UserStatus) - Enums (
UserRole) - Class implementation (
User) - Abstract class (
BaseUserService) - Utility functions and constants
- Interface definitions (
- UserService.ts - User service class, demonstrating:
- Decorator usage
- Generic and advanced types
- Asynchronous methods
- Configuration interface
- Higher-order functions
- user.js - ES6+ user model, demonstrating:
- Class definition and static methods
- Getter/Setter
- Factory functions
- Higher-order functions and functional programming
- Asynchronous functions
- userService.js - User service, demonstrating:
- Event emitter pattern
- Class inheritance
- Promise and async/await
- Modular design
- Decorator functions (Higher-order function implementation)
- utils.js - Utility functions collection, including:
- Debounce and throttle functions
- Deep copy implementation
- Array, object, string utility functions
- Date and math utility functions
- Validation functions
- Storage and asynchronous utility functions
- UserCard.tsx - User card component (TypeScript + JSX)
- UserForm.jsx - User form component (JavaScript + JSX)
- HelloWorld.vue - Basic Vue component
- UserCard.vue - User display component
- UserList.vue - User list component
- user.py - User class and data structures, demonstrating modern Python features
- user_service.py - User service class with async support
- utils.py - Utility functions collection
- User.java - User entity class with modern Java features
- UserController.java - REST controller with Spring annotations
- UserRepository.java - Repository interface with JPA annotations
- UserService.java - Service layer with business logic
- User.kt - Data class, enum, companion object, showcasing Kotlin modern features
- UserRepository.kt - Interface and in-memory implementation, demonstrating Kotlin's concise syntax
- UserService.kt - Service class with suspend functions and coroutine features
- user.go - User struct and methods, demonstrating Go struct definition and methods
- user_service.go - Service struct with business logic methods
- repository.go - Repository interface and in-memory implementation, showcasing Go interface design
- User.h - User class header file, showcasing modern C++ features (C++11/14/17)
- UserRepository.h - Repository interface header file with templates and smart pointers
- UserService.cpp - Service class implementation, demonstrating complete class implementation
- index.html - Main page with semantic HTML structure
- dashboard.html - Dashboard interface with data visualization elements
# Test only Python files
node apps/analyzer/dist/code-analyzer/repomap/cli.js test-multilang --language python
# Test only TypeScript files
node apps/analyzer/dist/code-analyzer/repomap/cli.js test-multilang --language typescript
# Test only Java files
node apps/analyzer/dist/code-analyzer/repomap/cli.js test-multilang --language java# Run test suite in analyzer directory
cd apps/analyzer
node test-repomap.js --language python
node test-repomap.js --language typescript
node test-repomap.js --language java# Test all languages
node test-repomap.js
# Test with different token limits
node test-repomap.js --language typescript --max-tokens 4096When running language filtering tests, you should see output similar to:
📊 Statistics:
- File count: 3
- Total symbols: 15
- Estimated tokens: 245
- Filter language: typescript
- File extensions: .ts, .tsx
When adding new language support to the Repo Map generator:
- Add corresponding test files to a new directory
- Include examples of common language constructs (classes, functions, interfaces, etc.)
- Update this README with the new language section
- Add the language to the automated test suite
These test files help ensure:
- Parser Accuracy: All symbols are correctly identified and extracted
- Language Recognition: File extensions are properly mapped to languages
- Output Consistency: Results are formatted consistently across languages
- Feature Completeness: All language-specific features are properly supported