Skip to Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
19.11 將 Wolfram Workbench 的 MUnit 套件整合至前端介面
|
769
以下是使用驅動器的基本使用範例,我故意使用錯誤的預期結果使得
ID2
與
ID4
的測試
失敗。[Page-771]
討論說明
以上所使用的驅動器因過於簡陋而無法支援 Workbench 的單元測試功能,如果你有雄
心壯志的話,甚至可以設計比 Workbench 更強大的除錯器,完全依你的需求而定,最
重要是要先熟悉
MUnit
應用程式介面(Application Program Interface,API)的用法,
雖然
MUnit
套件的說明文件很簡略,但此套件的程式碼設計得十分容易使用。例如,
執行
?"MUnit`*"
可列出套件中所有的公開函式,為了節省文字空間,以下只列出
T
開
頭的指令,點 選輸出項 目即可看到 該指令或 選 項的用途,而 最重要的 指 令是選擇 器
(selector),例如
TestID
等,因為這用來擷取
TestResultObject
的內部資訊,這個物
件是由
Test
或
TestMatch
等測試指令所輸出。
ch19.indd 769 2014/4/2 下午 05:10:52
770
|
第十九章
檢視一下
MUnit
套件中的指令,使我激發起建立測試群組的想法,如同訣竅 19.10 所
述, 不
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mathematica Cookbook

Mathematica Cookbook

Sal Mangano
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9789863470106