add-ktnip-ksp-tests

Add and integrate KSP processor tests for the ktnip processor across K1 and K2 compilers.

247|18|Updated May 26, 2022
One-click install
npx skills add https://github.com/vendelieu/telegram-bot --skill add-ktnip-ksp-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-ktnip-ksp-tests
Source: https://github.com/vendelieu/telegram-bot/tree/main/.cursor/skills/library-dev/add-ktnip-ksp-tests
Command: npx skills add https://github.com/vendelieu/telegram-bot --skill add-ktnip-ksp-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of adding and verifying tests for the ktnip KSP processor, ensuring robust code generation for the telegram-bot library.

Core Features & Use Cases

  • Test Data Creation: Facilitates the creation of Kotlin source files for testing KSP processor behavior.
  • Automated Test Integration: Guides the integration of new tests into existing KSP processor test suites (K1 and K2).
  • Custom Assertion Support: Allows for advanced testing scenarios using custom compilation checks.
  • Use Case: When developing a new annotation processor for the telegram-bot library, use this Skill to quickly set up and run tests for the ktnip KSP processor, verifying its output against predefined test data.

Quick Start

Create a new Kotlin source file in ktnip/src/jvmTest/resources/test-data/ named NewFeature.kt with valid handlers and annotations to be tested.

Frequently Asked Questions about add-ktnip-ksp-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add tests for a Kotlin KSP processor?

To add KSP processor tests, create a Kotlin source file in `ktnip/src/jvmTest/resources/test-data/` with valid handlers and annotations to be tested. This Skill guides integration of new tests into existing KSP processor test suites.

Can I test KSP code generation across both K1 and K2 compilers?

Yes, you can test KSP code generation across K1 and K2 compilers. This Skill facilitates integration of new tests into existing test suites, supporting processor behavior verification across both compiler versions.

How do I verify generated Kotlin files like ActivitiesData.kt in a KSP test?

You verify generated Kotlin files like ActivitiesData.kt by using custom assertion support within the test suite. This Skill allows advanced testing scenarios using custom compilation checks against predefined test data.

What is the best way to test new annotations in a telegram-bot KSP processor?

The best way to test new annotations is to set up a test data source file and run the ktnip KSP processor against it. This verifies code generation output and processor behavior for the telegram-bot library.

Does this KSP testing approach support custom compilation assertions?

Yes, this KSP testing approach supports custom compilation assertions. It allows for advanced testing scenarios using custom compilation checks to validate generated files and processor behavior.

Why do I need test data files for KSP processor verification?

You need test data files to provide valid handlers and annotations for the KSP processor to act upon. These source files serve as input to verify code generation and processor behavior against expected outputs.