我正在尝试使用Makefile class GraphGen: Gen<ReversibleDirectedGraph<Int>> {
override fun constants() =
listOf(
ReversibleDirectedGraph(emptySet(),emptySet()),ReversibleDirectedGraph(setOf(0),setOf(0 to 0)),ReversibleDirectedGraph(setOf(0,1),setOf(0 to 1))
)
override fun random(): Sequence<ReversibleDirectedGraph<Int>> = generateSequence {
val vertexGen = Gen.choose(0,20)
val vertices = Gen.set(vertexGen).random().first()
val vertexList = vertices.toList()
val edgeGen = Gen.set(Gen.pair(Gen.from(vertexList),Gen.from(vertexList))).random()
// On rare occasions,this throws an exception with origin and bound,probably due
// to the number of sets. In those cases,we use an emptySet instead as a placeholder.
val edges = try { edgeGen.first() } catch (e: IllegalArgumentException) { null }
ReversibleDirectedGraph(vertices,edges?: emptySet())
}
}
class ReversibleDirectedGraphTest: StringSpec() {
init {
"reversibleDirectedGraphTest" {
forAll(GraphGen()) { g -> g.reverse().reverse() == g }
}
}
}
执行make命令。我在此makefile命令中遇到错误:
make build
我得到:build:
./folder/file.exe file.config
我尝试执行此操作时出现相同的错误:
The command "." is either misspelled or could not be found.
我已在Windows 10上安装了Cygwin,并且已在Path中定义了所有环境变量:
- CYGWIN_HOME = C:\ cygwin64
- 路径=%CYGWIN_HOME%\ bin;%CYGWIN_HOME%\ sbin;%CYGWIN_HOME%\ usr \ bin;%CYGWIN_HOME%\ usr \ sbin;%CYGWIN_HOME%\ usr \ local \ bin;%CYGWIN_HOME%\ usr \ local \ sbin; C:\ MinGW \ bin;。;
因此Cygwin无法识别“。”之类的命令。或在尝试执行命令“ make”时使用“ \”。我还安装了cat: '\': Is a directory
make × ERR cat ../../../vendor/js-aruco/src/aruco.js \
,但是它不起作用。
有什么想法吗?