Тёмный

Write Unit Tests in Rust 🦀 Rust Programming Tutorial for Developers 

Trevor Sullivan
Подписаться 15 тыс.
Просмотров 3 тыс.
50% 1

In this video, we'll be exploring how you can write unit tests in Rust. Unit tests help you to write more robust code, and release better quality software. Rust makes writing unit tests incredibly easy, since tests just Rust functions. There are a couple of attributes you'll want to be aware of, and several methods of structuring your test code. You can incorporate your tests into the same code file that defines the code that will be tested, or you can separate your tests into separate modules.
🚨📦 Help support this channel - shop through my Amazon storefront!
⬇️⬇️⬇️
www.amazon.com/shop/trevorsul...
⬆️⬆️⬆️
🤯 Rust Programming Playlist 🦀 • Rust Programming Tutor...
📖 How to Write Rust Unit Tests 📦➡️ doc.rust-lang.org/book/ch11-0...
Visual Studio Code ➡️ code.visualstudio.com
Rust Website ➡️ rust-lang.org
Rustup Installer ➡️ rustup.rs
Rust Docs ➡️ doc.rust-lang.org/book
Please follow me on these other social channels!
➡️ trevorsullivan.net
➡️ github.com/pcgeek86
➡️ / pcgeek86
➡️ / trevorsullivan
➡️ / trevorsoftware
➡️ tiktok.com/pcgeek86
All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement.
#rustlang #rust #rustdev #opensource #software #linux #devops #programming #rusty #dev #coding #codinglife #code #coder #ubuntu #ubuntulinux #appdev #developer

Наука

Опубликовано:

 

28 окт 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 25   
@frezze9314
@frezze9314 10 дней назад
Excellent material. Have about 8 months of Rust exposure. This helps solidify the concepts.
@shahidyousuf9464
@shahidyousuf9464 Месяц назад
Kindly provide a detailed video on lifetimes. Appreciate the effort you put in to make our learning effortless.
@MegaAnufriev
@MegaAnufriev 6 месяцев назад
It would be great to see a video on mocking in rust. Which mocking libraries are best for most common scenarios. Is mocking idiomatic in rust at all?
@eligbuefelix7988
@eligbuefelix7988 8 месяцев назад
I love this channel, thanks a lot Trevor
@wagnernoise
@wagnernoise 8 месяцев назад
Thanks for the video, really great explanation!
@EddieKingara
@EddieKingara Месяц назад
My Brudda!! May the good lord bless you in every way possible!!
@yasin5058
@yasin5058 8 месяцев назад
Great video. I‘d love to watch a video about integration tests,
@saurabtharu7252
@saurabtharu7252 8 месяцев назад
Hey Trevor, please make a video on error reporting library named "miette" btw really appreciate your contents👌. They have always been so much helpful for me 😇
@theintjengineer
@theintjengineer 8 месяцев назад
You're killing with these videos👌🏽 Keep them coming and let's hope the algorithm blesses you🙌🏽 Thank you so much.
@TrevorSullivan
@TrevorSullivan 8 месяцев назад
Thank you so much for your support! ♥️
@theintjengineer
@theintjengineer 8 месяцев назад
@@TrevorSullivan, why don't you create a D*ïs*ćord Server? [not sure RU-vid allows these names here haha] Let's build a community, Mate🙌🏽 Your content is top-notch and you're knowledgeable in several areas. I can't see this channel not booming 💣💥👌🏽 I, personally, loved that Rust and AWS Mixup you introduced. I'm sure many people will want to see more on that. If you need help or something [not on Rust or AWS though, since I'm learning that from you😂], just lemme know and I'll send you an email/add you somewhere, whatever. I'm really rooting for you. Cheers.
@TrevorSullivan
@TrevorSullivan 8 месяцев назад
@@theintjengineer you rock, thank you for the idea and being willing to support the community! Since I haven't had much time to focus on RU-vid for the last month, I'm not sure adding more overhead is a great idea right now. Depending on how things go long-term, that could definitely be part of the picture though! Chat can sometimes be a bit much to keep on top of, but a discussion forum could be helpful. Do you like Discourse? What topics are you most comfortable with (if not AWS and Rust)?
@theintjengineer
@theintjengineer 8 месяцев назад
- I guess CMake Discourse is the only Discourse I have ever used haha. Though I didn't actually dislike it. I found it ok. So, that wouldn't be a problem. - Electrical Engineering, C++ and, a couple of months ago, I started getting into Cybersecurity, so, I know a bit about that as well. But again, the day only has 24h, right?!! Haha There's way more I'd like to learn, but I'll focus on a Cloud Technology for now and some DevOps stuff, like Docker. That's stuff I don't yet know and which I'd like to have fundamental knowledge of. Anyways. I'll keep following the channel and let's see how this all goes. Cheers.
@TrevorSullivan
@TrevorSullivan 8 месяцев назад
@@theintjengineer Those are some awesome skills. I wish I had more background in hardware, honestly. You could start your own RU-vid channel. :) Docker is a great tool to learn. I wouldn't worry too much about Kubernetes, as it's often overkill for whatever devs are trying to accomplish. Check out some git servers though, like OneDev, Gitea, Forgejo, and similar tool. Check out Terraform for deploying cloud resources en masse. Check out PowerShell for gluing services together easily. There's a ton to learn out there! I hear you about only having 24h each day. 😆🦀
@datawolk
@datawolk 7 месяцев назад
Nice one. Could you make a video about a multi file/module project? Proper imports etc
@TrevorSullivan
@TrevorSullivan 7 месяцев назад
That is an excellent topic! I already have a video on modules, but there is a definite need to go into more depth on nested crates, workspaces, and import/use statements. I agree wholeheartedly!!
@TrevorSullivan
@TrevorSullivan 7 месяцев назад
@datawolk Just published a new video about multi-crate Rust projects! Check out the playlist!
@datawolk
@datawolk 7 месяцев назад
Thanks a lot! Never heard of workspaces before.
@prajganesh
@prajganesh 3 месяца назад
Now that you wrote a few AWS videos with Rust, what's you take on it? I'm still debating if I should play with Rust or Golang. I do mostly for fun to learn different things. But still not able to decide between Rust and Golang.
@TrevorSullivan
@TrevorSullivan 3 месяца назад
Hey @prajganesh, great question. I have to say that I really like Rust, after working with it for ~9 months now. I would strongly recommend it to anyone who's interested in software development. The efficiency of CPU and memory resources is incredible. Also, specifically around AWS, check out the cold start performance of Rust compared to Golang on this website: maxday.github.io/lambda-perf/ Rust is almost 3x faster than Go at cold starts! If you need responsive applications that "feel" fast to your users, Rust is the way to go.
@prajganesh
@prajganesh 3 месяца назад
It's funny as I was watching interview :) For me it's more to create some proof of concept. I don't intend to create any production code. But youtube is full of Python and Golang, so Rust is a niche space
@TrevorSullivan
@TrevorSullivan 3 месяца назад
@@prajganesh Rust is definitely more niche, I agree, but there's lots of momentum behind it. 🦀🙂 Microsoft, Amazon, and Google are all investing in it.
@TrevorSullivan
@TrevorSullivan 8 месяцев назад
🚨📦 Help support this channel - shop through my Amazon storefront! ⬇⬇⬇ www.amazon.com/shop/trevorsullivan ⬆⬆⬆
@user-ui8my9zs7o
@user-ui8my9zs7o 6 месяцев назад
Where do you put test files at?
@TheInspctrcat
@TheInspctrcat 8 месяцев назад
I guess more idiomatic way is format macro
Далее
My little bro is funny😁  @artur-boy
00:18
Просмотров 4,2 млн
Rust Programming: TypeState Builder Pattern Explained
14:30
How to run C program in command prompt
0:58
Просмотров 241 тыс.