⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 core_typecheck.py

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 PY
字号:
#!/usr/bin/python# Copyright 2003 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # This tests the typechecking facilities.import BoostBuildt = BoostBuild.Tester(pass_toolset=0)t.write("file.jam", """module .typecheck {    rule [path] ( x )    {        if ! [ MATCH "^(::)" : $(x) ]         {            ECHO "Error: $(x) is not a path" ;            return true ;        }    }}rule do ( [path] a ){}do $(ARGUMENT) ;actions dummy { } dummy all ;""")t.run_build_system("-ffile.jam -sARGUMENT=::a/b/c")t.run_build_system("-ffile.jam -sARGUMENT=a/b/c", status=1,                   stdout="""Error: a/b/c is not a pathfile.jam:18: in module scope*** argument error* rule do ( [path] a )* called with: ( a/b/c )* true afile.jam:16:see definition of rule 'do' being called""")t.cleanup()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -