Add example of trees for testing
This commit is contained in:
parent
40cc8d00b6
commit
a343d62078
12
mapytex/calculus/core/test/__init__.py
Normal file
12
mapytex/calculus/core/test/__init__.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim:fenc=utf-8
|
||||||
|
#
|
||||||
|
# Copyright © 2017 lafrite <lafrite@Poivre>
|
||||||
|
#
|
||||||
|
# Distributed under terms of the MIT license.
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Reglages pour 'vim'
|
||||||
|
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
|
||||||
|
# cursor: 16 del
|
24
mapytex/calculus/core/test/example_tree.py
Normal file
24
mapytex/calculus/core/test/example_tree.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# vim:fenc=utf-8
|
||||||
|
#
|
||||||
|
# Copyright © 2017 lafrite <lafrite@Poivre>
|
||||||
|
#
|
||||||
|
# Distributed under terms of the MIT license.
|
||||||
|
|
||||||
|
"""
|
||||||
|
Example of trees
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from ..tree import Tree
|
||||||
|
|
||||||
|
simple_numeric = Tree.from_str("1+2*3")
|
||||||
|
|
||||||
|
big_sum = Tree.from_str("1+2+3+4+5+6+7+8+9")
|
||||||
|
big_minus = Tree.from_str("1-2-3-4-5-6-7-8-9")
|
||||||
|
big_mult = Tree.from_str("1*2*3*4*5*6*7*8*9")
|
||||||
|
big_sum_of_times = Tree.from_str("1*2+3*4+5*6+7*8+9*10")
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Reglages pour 'vim'
|
||||||
|
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
|
||||||
|
# cursor: 16 del
|
Loading…
Reference in New Issue
Block a user