-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing quickstart example, adding plot
- Loading branch information
1 parent
02d9d88
commit a366d6c
Showing
13 changed files
with
891 additions
and
68 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/test-*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# This file is machine-generated - editing it directly is not advised | ||
|
||
julia_version = "1.9.1" | ||
manifest_format = "2.0" | ||
project_hash = "9042cdb9122bd0327898aff0f2e2ca16784d4306" | ||
|
||
[[deps.ANSIColoredPrinters]] | ||
git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" | ||
uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" | ||
version = "0.0.1" | ||
|
||
[[deps.Base64]] | ||
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" | ||
|
||
[[deps.Dates]] | ||
deps = ["Printf"] | ||
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
|
||
[[deps.DocStringExtensions]] | ||
deps = ["LibGit2"] | ||
git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" | ||
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" | ||
version = "0.9.3" | ||
|
||
[[deps.Documenter]] | ||
deps = ["ANSIColoredPrinters", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] | ||
git-tree-sha1 = "39fd748a73dce4c05a9655475e437170d8fb1b67" | ||
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
version = "0.27.25" | ||
|
||
[[deps.IOCapture]] | ||
deps = ["Logging", "Random"] | ||
git-tree-sha1 = "d75853a0bdbfb1ac815478bacd89cd27b550ace6" | ||
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" | ||
version = "0.2.3" | ||
|
||
[[deps.InteractiveUtils]] | ||
deps = ["Markdown"] | ||
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" | ||
|
||
[[deps.JSON]] | ||
deps = ["Dates", "Mmap", "Parsers", "Unicode"] | ||
git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" | ||
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" | ||
version = "0.21.4" | ||
|
||
[[deps.LibGit2]] | ||
deps = ["Base64", "NetworkOptions", "Printf", "SHA"] | ||
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" | ||
|
||
[[deps.Logging]] | ||
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" | ||
|
||
[[deps.Markdown]] | ||
deps = ["Base64"] | ||
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" | ||
|
||
[[deps.Mmap]] | ||
uuid = "a63ad114-7e13-5084-954f-fe012c677804" | ||
|
||
[[deps.NetworkOptions]] | ||
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" | ||
version = "1.2.0" | ||
|
||
[[deps.Parsers]] | ||
deps = ["Dates", "PrecompileTools", "UUIDs"] | ||
git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" | ||
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" | ||
version = "2.7.2" | ||
|
||
[[deps.PrecompileTools]] | ||
deps = ["Preferences"] | ||
git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" | ||
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" | ||
version = "1.2.0" | ||
|
||
[[deps.Preferences]] | ||
deps = ["TOML"] | ||
git-tree-sha1 = "7eb1686b4f04b82f96ed7a4ea5890a4f0c7a09f1" | ||
uuid = "21216c6a-2e73-6563-6e65-726566657250" | ||
version = "1.4.0" | ||
|
||
[[deps.Printf]] | ||
deps = ["Unicode"] | ||
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
|
||
[[deps.REPL]] | ||
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] | ||
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" | ||
|
||
[[deps.Random]] | ||
deps = ["SHA", "Serialization"] | ||
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
|
||
[[deps.SHA]] | ||
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" | ||
version = "0.7.0" | ||
|
||
[[deps.SafeTestsets]] | ||
git-tree-sha1 = "81ec49d645af090901120a1542e67ecbbe044db3" | ||
uuid = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" | ||
version = "0.1.0" | ||
|
||
[[deps.Serialization]] | ||
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" | ||
|
||
[[deps.Sockets]] | ||
uuid = "6462fe0b-24de-5631-8697-dd941f90decc" | ||
|
||
[[deps.TOML]] | ||
deps = ["Dates"] | ||
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" | ||
version = "1.0.3" | ||
|
||
[[deps.Test]] | ||
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] | ||
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[[deps.UUIDs]] | ||
deps = ["Random", "SHA"] | ||
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" | ||
|
||
[[deps.Unicode]] | ||
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#= | ||
This file is part of OpenModelica. | ||
Copyright (c) 1998-2023, Open Source Modelica Consortium (OSMC), | ||
c/o Linköpings universitet, Department of Computer and Information Science, | ||
SE-58183 Linköping, Sweden. | ||
All rights reserved. | ||
THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE | ||
GPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. | ||
ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES | ||
RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, | ||
ACCORDING TO RECIPIENTS CHOICE. | ||
The OpenModelica software and the OSMC (Open Source Modelica Consortium) | ||
Public License (OSMC-PL) are obtained from OSMC, either from the above | ||
address, from the URLs: http://www.openmodelica.org or | ||
http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica | ||
distribution. GNU version 3 is obtained from: | ||
http://www.gnu.org/copyleft/gpl.html. The New BSD License is obtained from: | ||
http://www.opensource.org/licenses/BSD-3-Clause. | ||
This program is distributed WITHOUT ANY WARRANTY; without even the implied | ||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS | ||
EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE | ||
CONDITIONS OF OSMC-PL. | ||
=# | ||
|
||
using Test | ||
import OMJulia | ||
|
||
@testset "OpenModelica" begin | ||
@testset "OMCSession" begin | ||
olddir = pwd() | ||
try | ||
workdir = abspath(joinpath(@__DIR__, "test-session")) | ||
rm(workdir, recursive=true, force=true) | ||
mkpath(workdir) | ||
cd(workdir) | ||
|
||
omc = OMJulia.OMCSession() | ||
version = OMJulia.sendExpression(omc, "getVersion()") | ||
@test startswith(version, "v1.") | ||
a = OMJulia.sendExpression(omc, "model a end a;") | ||
@test a == [:a] | ||
|
||
classNames = OMJulia.sendExpression(omc, "getClassNames()") | ||
@test classNames == [:a] | ||
@test true == OMJulia.sendExpression(omc, "loadModel(Modelica)") | ||
res = OMJulia.sendExpression(omc, "simulate(Modelica.Electrical.Analog.Examples.CauerLowPassAnalog)") | ||
@test isfile(res["resultFile"]) | ||
@test occursin("The simulation finished successfully.", res["messages"]) | ||
|
||
@test 3 == OMJulia.sendExpression(omc, "1+2") | ||
|
||
ret = OMJulia.sendExpression(omc, "quit()", parsed=false) | ||
@test ret == "quit requested, shutting server down\n" | ||
finally | ||
cd(olddir) | ||
end | ||
end | ||
end |
Oops, something went wrong.