aboutsummaryrefslogblamecommitdiffstats
path: root/testing/tests/operators.rs
blob: 240fd5236229272dbac48bee65f4511fef1ce24c (plain) (tree)
1
2
3
4
5
6
7
8
9






                           

                                    





             

                                                   
                                                                      
 
extern crate askama;
#[macro_use]
extern crate askama_derive;

use askama::Template;

#[derive(Template)]
#[template(path = "operators.html")]
struct OperatorsTemplate {
    a: usize,
    b: usize,
    c: usize,
}

#[test]
fn test_operators() {
    let t = OperatorsTemplate { a: 1, b: 1, c: 2 };
    assert_eq!(t.render(), "tf\ntf\ntf\ntf\ntf\ntf\nmul\ndiv\nmod\n");
}