Skip to content

ChatGPT powered Rust proc macro that generates code at compile-time.

License

Notifications You must be signed in to change notification settings

retrage/gpt-macro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpt-auto-test

ChatGPT powered Rust macro that automatically generates test cases for given function.

Usage

See this example:

use gpt_auto_test::auto_test;

#[auto_test(test_valid, test_div_by_zero)]
fn div_u32(a: u32, b: u32) -> u32 {
    if b == 0 {
        panic!("attempt to divide by zero");
    }
    a / b
}

Get ChatGPT API key and set it to your environment variable OPENAI_API_KEY before run.

License

gpt-auto-test is released under the MIT license.

About

ChatGPT powered Rust proc macro that generates code at compile-time.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages