Testing in Rust

แชร์
ฝัง

ความคิดเห็น • 37

  • @letsgetrusty
    @letsgetrusty  3 ปีที่แล้ว +6

    📝 Get your *FREE Rust cheat sheet* : www.letsgetrusty.com/cheatsheet

    • @exoticcoder5365
      @exoticcoder5365 3 ปีที่แล้ว +1

      Signed up ! Good work !

    • @sparky173j
      @sparky173j 2 ปีที่แล้ว

      I learned about a few new things by reading this cheat sheet. Thanks for putting it together and sharing it

  • @1234fewgfwe
    @1234fewgfwe 4 หลายเดือนก่อน +2

    reading the Rust Book can be boring and sometimes confusing. But seeing this guy making examples makes learning Rust so easy :D

  • @jonasschade
    @jonasschade 3 ปีที่แล้ว +14

    Thanks a lot for your videos! :D
    You are doing a particularly good job explaining everything well enough without going into unnecessary details.
    As someone who already knows a couple of different programming languages, your videos really helped me to understand the things which differ in Rust.
    The quality of your videos is good, and they are well enough structured to easily skip chapters / parts which are already familiar.

  • @_ender
    @_ender 3 ปีที่แล้ว +9

    Thank you. I really appreciate these videos. Rust is awesome and i am glad that you are helping explain the rust book.

  • @Gruby7C1h
    @Gruby7C1h 2 ปีที่แล้ว +3

    One thing that might bite you: expect works as contains instead of equal! So panic!("not too much"); matches: #[should_panic(expected = "too much")]

    • @d3stinYwOw
      @d3stinYwOw 23 วันที่ผ่านมา

      Thanks, because I was wondering if there's something like 'contains' parameter instead of equals

  • @meka4996
    @meka4996 3 ปีที่แล้ว +4

    Your videos are so good that they actually make me want to learn Rust!

  • @HenriqueAraujo174
    @HenriqueAraujo174 ปีที่แล้ว +1

    You make Rust looks easy, thanks for your videos

  • @pedrobmorales
    @pedrobmorales 2 ปีที่แล้ว +2

    Thank you! These videos are super informative and have helped me immensely in understanding Rust. Could you make a video covering mocking traits and structs? I've been trying to mock stuff like reqwest::Client or lapin::Connection but I have a hard time because these are in external crates. I've been writing code that takes references to the above, but I wonder if it's possible to create a &reqwest::Client which would be a mock object.

  • @inx1819
    @inx1819 3 ปีที่แล้ว +7

    I'm surprised you don't get more views and subscribers. I subbed, I hope you blow up one day!

    • @camilo1u2b
      @camilo1u2b 2 ปีที่แล้ว

      not many people learning rust for now I guess

  • @StellarWeb008
    @StellarWeb008 8 หลายเดือนก่อน

    Sir would you please consider making a video on "measuring" tests, that would be very helpful

  • @minastaros
    @minastaros ปีที่แล้ว

    Thank you very much for these videos, it's a pleasure to learn that way! However, one objection concerning the test cases themselves: you should always check the boundary cases, since even the best borrow checker does not prevent you from one of the most often made error: off by one. What if your test checks that 200 is correctly filtered out, but does not discover that 100 may be filtered out as well (because else if in new() were >= by mistake)? Also, your test case checks -2 , but are you sure about 0? And is 1 in?

  • @kitgary
    @kitgary 3 ปีที่แล้ว +2

    This is the best Rust series on TH-cam! You deserve more views and subscriptions! Good job!

  • @Nanagos
    @Nanagos 2 ปีที่แล้ว +2

    Now I just need something that will test my testing code 😅

  • @GolangDojo
    @GolangDojo 3 ปีที่แล้ว +2

    Love that into boi

  • @andresmontoya7852
    @andresmontoya7852 3 ปีที่แล้ว +4

    Thanks! What are the extensions you use for vscode? For rust

  • @exoticcoder5365
    @exoticcoder5365 3 ปีที่แล้ว +1

    Great Series !

  • @TopGearScooter
    @TopGearScooter 3 ปีที่แล้ว +1

    How did you get those inline parameters in your editor?

  • @sahilverma4077
    @sahilverma4077 3 ปีที่แล้ว +1

    can you please add a list of frameworks and resources to learn those frameworks in the cheatsheet

    • @letsgetrusty
      @letsgetrusty  3 ปีที่แล้ว +2

      Hmm not sure if it makes sense to add them to a cheatsheet but I'll consider it. I'm going to make a video about this as well.

    • @sahilverma4077
      @sahilverma4077 3 ปีที่แล้ว +1

      @@letsgetrusty oh, a video will be better, attach linkes to the resources in the description please

  • @eduardofernandezdiaz5264
    @eduardofernandezdiaz5264 2 ปีที่แล้ว

    How do you mock IO calls during testing

  • @redemption5294
    @redemption5294 3 ปีที่แล้ว +1

    Can we develop full GUI desktop applications using rust?

    • @letsgetrusty
      @letsgetrusty  3 ปีที่แล้ว +3

      The infrastructure for creating GUI apps is still in the early stages of being built out. For more info check out www.areweguiyet.com/

    • @GAGONMYCOREY
      @GAGONMYCOREY 3 ปีที่แล้ว

      Also if you are making a bigboy app you can do rust-wasm + electron. This way it can look good and be powerful still 😎

    • @arya_bakh
      @arya_bakh 2 ปีที่แล้ว

      gtk supports rust bindings and it has a great guide

    • @abdullahmertozdemir9437
      @abdullahmertozdemir9437 ปีที่แล้ว

      he actually made full stack rust video recently, in case you are not aware (a year later)

  • @real50cent
    @real50cent ปีที่แล้ว

    Bogdan-goth-post-punker-version

  • @johnbaxter7582
    @johnbaxter7582 ปีที่แล้ว

    has anyone ever told you that you look like dustycloud?

  • @RichardBurgess-v2h
    @RichardBurgess-v2h 11 หลายเดือนก่อน +1

    First thing I was struck with: No Negation assert. One of the most useful activities in ANY programming language can be coding boolean functions to handle decisions on states that likely 1) occur more than once, 2) are potentially buggy because of the complexity of conditional constructs, 3) represent something that is easy to encapsulate and unittest, making them a very good candidate for doing so. Yet, and Rust isn't the only language I've run into this with, documentation on negation or even presence of negation assertions is missing or stupidly absent. Sure I can do assert!(!something), but that's about as bug prone as you can get. Come on you guys. No negate!(something) macro???? Really? I just spent another half hour looking after I looked a half hour last night when I was tired. If it is there, fine, but why not clearly in the docs??? If not, PLEASE!!!!

    • @gusslx
      @gusslx 8 หลายเดือนก่อน +1

      Why would assert!(!something) would be bug prone?