package cn.com.poc.thirdparty.resource.demand.ai.function;

import cn.com.poc.thirdparty.resource.demand.ai.function.calculator.CalculatorFunction;
import cn.com.yict.framemax.core.spring.SingleContextInitializer;
import com.googlecode.aviator.AviatorEvaluator;
import org.junit.runner.RunWith;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

/**
 * @author alex.yao
 * @date 2025/3/21
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(initializers = SingleContextInitializer.class)
@WebAppConfiguration
public class AviatorFunctionTest {

    @Test
    public void test_aviator() {
        System.out.println(AviatorEvaluator.compile("6%3").execute().toString());
    }
}
